@webex/plugin-meetings 3.12.0-llmrefactor.13 → 3.12.0-llmrefactor.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/manifest.json +1312 -0
- package/.sdd/templates/.source.json +30 -0
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
- package/.sdd/templates/component-repo/template-map.json +112 -0
- package/AGENTS.md +130 -4
- package/ai-docs/ARCHITECTURE.md +207 -0
- package/ai-docs/CONTRACTS.md +267 -0
- package/ai-docs/DATA_MODEL.md +64 -0
- package/ai-docs/GETTING_STARTED.md +73 -0
- package/ai-docs/GLOSSARY.md +56 -0
- package/ai-docs/REVIEW_CHECKLIST.md +45 -0
- package/ai-docs/RULES.md +79 -0
- package/ai-docs/SECURITY.md +74 -0
- package/ai-docs/SERVICE_STATE.md +59 -0
- package/ai-docs/SPEC_INDEX.md +85 -0
- package/ai-docs/TEST_INDEX.md +45 -0
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
- package/ai-docs/patterns/defensive-error-propagation.md +55 -0
- package/ai-docs/patterns/event-scope-emission.md +46 -0
- package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
- package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
- package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +46 -12
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/in-meeting-actions.js +2 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +4 -0
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +3 -1
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +8 -4
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +20 -20
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
- package/src/annotation/ai-docs/annotation-spec.md +236 -0
- package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
- package/src/interpretation/index.ts +38 -1
- package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
- package/src/media/ai-docs/media-spec.md +267 -0
- package/src/meeting/ai-docs/meeting-spec.md +401 -0
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +4 -0
- package/src/meeting/util.ts +5 -2
- package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +4 -0
- package/src/member/ai-docs/member-spec.md +196 -0
- package/src/members/ai-docs/members-spec.md +256 -0
- package/src/metrics/ai-docs/metrics-spec.md +185 -0
- package/src/multistream/ai-docs/multistream-spec.md +292 -0
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
- package/src/reachability/ai-docs/reachability-spec.md +261 -0
- package/src/reactions/ai-docs/reactions-spec.md +198 -0
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
- package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
- package/src/roap/ai-docs/roap-spec.md +241 -0
- package/src/webinar/ai-docs/webinar-spec.md +243 -0
- package/test/unit/spec/interpretation/index.ts +93 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +5 -0
- package/test/unit/spec/meeting/utils.js +26 -15
- package/test/unit/spec/meetings/index.js +11 -0
|
@@ -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`
|
|
@@ -0,0 +1,243 @@
|
|
|
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
|
+
# CONTROLS OPTIONS MANAGER — 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/controls-options-manager/`.
|
|
13
|
+
|
|
14
|
+
## Metadata
|
|
15
|
+
|
|
16
|
+
| Field | Value |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Module id | `controls-options-manager` |
|
|
19
|
+
| Source path(s) | `src/controls-options-manager/` |
|
|
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 manager/types/enums/constants/utilities and tests |
|
|
36
|
+
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
37
|
+
|
|
38
|
+
## Overview
|
|
39
|
+
|
|
40
|
+
`src/controls-options-manager/` contains 5 direct source/reference file(s) and has 2 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
|
+
Validates requested meeting-control mutations against display hints, builds the declared control bodies, and sends them through the owning Meeting request object.
|
|
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/controls-options-manager/
|
|
54
|
+
├── constants.ts — module constants and wire values
|
|
55
|
+
├── enums.ts — declared action/control enum values
|
|
56
|
+
├── index.ts — module facade/controller or primary exports
|
|
57
|
+
├── types.ts — module type declarations
|
|
58
|
+
├── util.ts — normalization/helper functions
|
|
59
|
+
└── ai-docs/controls-options-manager-spec.md — canonical module specification
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Key Files (source of truth)
|
|
63
|
+
|
|
64
|
+
| File | Holds |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `src/controls-options-manager/constants.ts` | module constants and wire values |
|
|
67
|
+
| `src/controls-options-manager/enums.ts` | declared action/control enum values |
|
|
68
|
+
| `src/controls-options-manager/index.ts` | module facade/controller or primary exports |
|
|
69
|
+
| `src/controls-options-manager/types.ts` | module type declarations |
|
|
70
|
+
| `src/controls-options-manager/util.ts` | normalization/helper functions |
|
|
71
|
+
| `test/unit/spec/controls-options-manager/index.js` and 1 sibling test file(s) | mirrored characterization/unit coverage |
|
|
72
|
+
|
|
73
|
+
## Public Surface
|
|
74
|
+
|
|
75
|
+
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
76
|
+
|---|---|---|---|---|---|---|
|
|
77
|
+
| `controls-options-manager.1` | SDK / configuration | `set()`, `setLocusUrl()`, `setDisplayHints()`, `getLocusUrl()`, and `getDisplayHints()` | Hold current/main Locus URLs and display hints used to authorize later control mutations. | Preserve current setter/getter semantics; no normalized query projection is exposed. | `src/controls-options-manager/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
78
|
+
| `controls-options-manager.2` | SDK / remote | `update(ControlConfig[])` | Validate each scoped mutation with `Utils.canUpdate()` and send the generated requests sequentially. | Unknown scopes and denied capabilities both throw synchronously while the batch is mapped; preserve request ordering and the returned request promise. | `src/controls-options-manager/index.ts`, `src/controls-options-manager/util.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
79
|
+
| `controls-options-manager.3` | SDK / remote | `setMuteOnEntry()`, `setDisallowUnmute()`, and `setMuteAll()` | Build the audio-control bodies permitted by current display hints and route them to main/breakout Locus context. | Preserve body keys, capability checks, and breakout authorization selection. | `src/controls-options-manager/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
80
|
+
| `controls-options-manager.4` | exported predicates | `Utils.canSetMuteOnEntry()`, `canUnsetMuteOnEntry()`, `canSetDisallowUnmute()`, `canUnsetDisallowUnmute()`, `canSetMuted()`, `canUnsetMuted()`, `hasHints()`, `hasPolicies()`, `canUpdateAudio()`, `canUpdateRaiseHand()`, `canUpdateReactions()`, `canUpdateShareControl()`, `canUpdateViewTheParticipantsList()`, `canUpdateVideo()`, `canUpdateAnnotation()`, `canUpdateRemoteDesktopControl()`, and `canUpdatePollingQA()` | Centralize capability interpretation for every supported control family. | These are static utilities, not manager instance query APIs. | `src/controls-options-manager/util.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
81
|
+
| `controls-options-manager.5` | exported routing utilities | `Utils.canUpdate()`, `isAudioControl()`, `isBreakoutLocusUrl()`, and `getControlsRequestParams()` | Select the permitted control family, request URL, and request body for each mutation. | Preserve scope matching and main-versus-breakout routing rules. | `src/controls-options-manager/util.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
82
|
+
| `controls-options-manager.6` | exported class/constants/types | `ControlsOptionsManager`, `ENABLED`, `CAN_SET`, `CAN_UNSET`, `AUDIO_CONTROL_BODY_KEYS`, `Control`, `Setting`, `ControlProperties`, `AudioProperties`, `RaiseHandProperties`, `ReactionsProperties`, `ShareControlProperties`, `VideoProperties`, `ViewTheParticipantListProperties`, `AnnotationProperties`, `RemoteDesktopControlProperties`, `PollingQAProperties`, `Properties`, and `ControlConfig` | Share the exact configuration vocabulary accepted by `update()`. | Raw control/setting/body-key values and discriminated property shapes are compatibility-sensitive. | `src/controls-options-manager/index.ts`, `src/controls-options-manager/constants.ts`, `src/controls-options-manager/enums.ts`, `src/controls-options-manager/types.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
83
|
+
|
|
84
|
+
### Emitted events
|
|
85
|
+
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
| Event literal | Constant / expression | Emission evidence |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| `meeting:actionsUpdate` | `EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE` | `src/meeting/index.ts` |
|
|
91
|
+
| `meeting:controls:ai-summary-notification:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_AI_SUMMARY_NOTIFICATION_UPDATED` | `src/meeting/index.ts` |
|
|
92
|
+
| `meeting:controls:annotation:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_ANNOTATION_UPDATED` | `src/meeting/index.ts` |
|
|
93
|
+
| `meeting:controls:auto-end-meeting-warning:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_AUTO_END_MEETING_WARNING_UPDATED` | `src/meeting/index.ts` |
|
|
94
|
+
| `meeting:controls:disallow-unmute:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_DISALLOW_UNMUTE_UPDATED` | `src/meeting/index.ts` |
|
|
95
|
+
| `meeting:controls:meeting-full:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_MEETING_FULL_UPDATED` | `src/meeting/index.ts` |
|
|
96
|
+
| `meeting:controls:mute-on-entry:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_MUTE_ON_ENTRY_UPDATED` | `src/meeting/index.ts` |
|
|
97
|
+
| `meeting:controls:polling-qa:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_POLLING_QA_UPDATED` | `src/meeting/index.ts` |
|
|
98
|
+
| `meeting:controls:practice-session-status:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_PRACTICE_SESSION_STATUS_UPDATED` | `src/meeting/index.ts` |
|
|
99
|
+
| `meeting:controls:raise-hand:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_RAISE_HAND_UPDATED` | `src/meeting/index.ts` |
|
|
100
|
+
| `meeting:controls:reactions:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_REACTIONS_UPDATED` | `src/meeting/index.ts` |
|
|
101
|
+
| `meeting:controls:remote-desktop-control:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_REMOTE_DESKTOP_CONTROL_UPDATED` | `src/meeting/index.ts` |
|
|
102
|
+
| `meeting:controls:share-control:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_SHARE_CONTROL_UPDATED` | `src/meeting/index.ts` |
|
|
103
|
+
| `meeting:controls:stage-view:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_STAGE_VIEW_UPDATED` | `src/meeting/index.ts` |
|
|
104
|
+
| `meeting:controls:video:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_VIDEO_UPDATED` | `src/meeting/index.ts` |
|
|
105
|
+
| `meeting:controls:view-the-participants-list:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_VIEW_THE_PARTICIPANTS_LIST_UPDATED` | `src/meeting/index.ts` |
|
|
106
|
+
| `meeting:controls:webcast:updated` | `EVENT_TRIGGERS.MEETING_CONTROLS_WEBCAST_UPDATED` | `src/meeting/index.ts` |
|
|
107
|
+
| `meeting:layout:update` | `EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE` | `src/meeting/index.ts` |
|
|
108
|
+
|
|
109
|
+
Compatibility notes:
|
|
110
|
+
- Prefer additive fields/options and preserve current return and rejection semantics. Internal helpers are not public merely because they are exported within the source directory.
|
|
111
|
+
|
|
112
|
+
## Requires (dependencies)
|
|
113
|
+
|
|
114
|
+
Locus controls, control/setting enums, constants, utility normalization, parent meeting request access, and role/capability state.
|
|
115
|
+
|
|
116
|
+
## Requirements
|
|
117
|
+
|
|
118
|
+
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
119
|
+
|---|---|---|---|---|---|---|
|
|
120
|
+
| `CONTROLS-OPTIONS-MANAGER-R-001` | `update` validates each `ControlConfig` scope and display-hint capability, builds one request body per control, and sends them sequentially. | Invalid or unauthorized shared-control mutations must fail before they reach Locus, and accepted mutations must preserve caller order. | `src/controls-options-manager/index.ts`, `src/controls-options-manager/util.ts` | `test/unit/spec/controls-options-manager/index.js` | none | PRESENT |
|
|
121
|
+
| `CONTROLS-OPTIONS-MANAGER-R-002` | `ControlsOptionsManager` exposes URL/hint accessors and mutation methods; `canSet*`, `canUnset*`, and `canUpdate*` predicates are static methods on `util.ts`, not instance query APIs or normalized properties. | Consumers must not depend on an availability/current-value surface the manager does not implement. | `src/controls-options-manager/index.ts`, `src/controls-options-manager/util.ts` | `test/unit/spec/controls-options-manager/index.js`, `test/unit/spec/controls-options-manager/util.js` | none | PRESENT |
|
|
122
|
+
| `CONTROLS-OPTIONS-MANAGER-R-003` | Missing `locusUrl` returns a rejected promise, an unknown scope or failed `canUpdate` check throws synchronously in `update`, and legacy audio setters reject unauthorized values; the module allocates no listener or timer. | Callers must distinguish validation throws from returned request rejections and must not expect cleanup behavior the module does not own. | `src/controls-options-manager/` | `test/unit/spec/controls-options-manager/index.js` | none | PRESENT |
|
|
123
|
+
|
|
124
|
+
## Design Overview
|
|
125
|
+
|
|
126
|
+
`index.ts` stores request context, validates mutations using static predicates from `util.ts`, builds control request bodies, and sends them through `request` or `locusDeltaRequest`. It exposes no normalized-control property or enabled-state query surface and owns no listeners or timers.
|
|
127
|
+
|
|
128
|
+
## Data Flow
|
|
129
|
+
|
|
130
|
+
```mermaid
|
|
131
|
+
flowchart LR
|
|
132
|
+
Caller[Meeting / consumer] --> Manager[index.ts mutation methods]
|
|
133
|
+
Hints[display hints + current controls callback] --> Manager
|
|
134
|
+
Types[constants.ts / enums.ts / types.ts] --> Util[util.ts capability and request helpers]
|
|
135
|
+
Manager --> Util
|
|
136
|
+
Util --> Body[control-setting request params]
|
|
137
|
+
Body --> Parent[Meeting request owner]
|
|
138
|
+
Parent --> Locus[Locus controls endpoint]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Sequence Diagram(s)
|
|
142
|
+
|
|
143
|
+
Sequence coverage:
|
|
144
|
+
|
|
145
|
+
| Operation group | Diagram | Failure coverage |
|
|
146
|
+
|---|---|---|
|
|
147
|
+
| UC-1…UC-4 — control mutation operation groups | Control mutation primary sequence | unknown scope, denied display hint, missing Locus URL, and request rejection |
|
|
148
|
+
| UC-1…UC-4 — control mutation alternate/failure paths | Control mutation alternate/failure sequence | unknown control/setting, absent capability, or malformed Locus control data |
|
|
149
|
+
|
|
150
|
+
### Control mutation primary sequence
|
|
151
|
+
|
|
152
|
+
```mermaid
|
|
153
|
+
sequenceDiagram
|
|
154
|
+
participant P as Meeting parent
|
|
155
|
+
participant M as ControlsOptionsManager
|
|
156
|
+
participant U as util.ts
|
|
157
|
+
P->>M: update(...ControlConfig)
|
|
158
|
+
M->>U: canUpdate(control, displayHints)
|
|
159
|
+
U-->>M: allowed or denied
|
|
160
|
+
M->>U: getControlsRequestParams(body, locus URLs)
|
|
161
|
+
U-->>M: PATCH request params
|
|
162
|
+
M->>P: request/locusDeltaRequest(params)
|
|
163
|
+
P-->>M: request outcome
|
|
164
|
+
M-->>P: sequential update promise outcome
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Control mutation alternate/failure sequence
|
|
168
|
+
|
|
169
|
+
```mermaid
|
|
170
|
+
sequenceDiagram
|
|
171
|
+
participant C as Caller / current input owner
|
|
172
|
+
participant M as ControlsOptionsManager
|
|
173
|
+
C->>M: request control mutation
|
|
174
|
+
alt locusUrl missing
|
|
175
|
+
M--xC: rejected promise
|
|
176
|
+
else scope unknown or capability denied by update
|
|
177
|
+
M--xC: synchronous Error / PermissionError
|
|
178
|
+
else accepted
|
|
179
|
+
M-->>C: owning request promise outcome
|
|
180
|
+
end
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Class / Component Relationships
|
|
184
|
+
|
|
185
|
+
```mermaid
|
|
186
|
+
classDiagram
|
|
187
|
+
class Locus
|
|
188
|
+
class Util
|
|
189
|
+
class Manager
|
|
190
|
+
class Types
|
|
191
|
+
class Body
|
|
192
|
+
class Parent
|
|
193
|
+
Manager --> Util
|
|
194
|
+
Types --> Util
|
|
195
|
+
Manager --> Body
|
|
196
|
+
Body --> Parent
|
|
197
|
+
Parent --> Locus
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The arrows identify ownership and delegation inside `src/controls-options-manager/`; files that only declare types or constants are not presented as transports.
|
|
201
|
+
|
|
202
|
+
## Use Cases
|
|
203
|
+
|
|
204
|
+
- **UC-1:** Refresh current/main Locus URLs and display hints, then read those raw values without expecting a normalized control projection. Evidence: `src/controls-options-manager/index.ts`.
|
|
205
|
+
- **UC-2:** Validate and sequentially send a batch of scoped `ControlConfig` mutations using `Utils.canUpdate()` and `getControlsRequestParams()`. Evidence: `src/controls-options-manager/index.ts`, `src/controls-options-manager/util.ts`.
|
|
206
|
+
- **UC-3:** Build mute-on-entry and disallow-unmute bodies only when the matching set/unset display hints permit the requested value. Evidence: `src/controls-options-manager/index.ts`, `src/controls-options-manager/util.ts`.
|
|
207
|
+
- **UC-4:** Route mute-all to the appropriate main or breakout Locus authorization context and preserve permission/request failures. Evidence: `src/controls-options-manager/index.ts`, `src/controls-options-manager/util.ts`.
|
|
208
|
+
|
|
209
|
+
## State Model
|
|
210
|
+
|
|
211
|
+
The manager stores current/main Locus URLs, display hints, and callbacks for current controls/webinar status. It does not maintain a normalized control projection.
|
|
212
|
+
|
|
213
|
+
## Business Rules & Invariants
|
|
214
|
+
|
|
215
|
+
- A setting can be changed only when its control advertises the matching capability; request body keys use the declared control/setting map. Enforced under `src/controls-options-manager/`.
|
|
216
|
+
|
|
217
|
+
## Error Handling & Failure Modes
|
|
218
|
+
|
|
219
|
+
| Condition | Signal | Caller recovery |
|
|
220
|
+
|---|---|---|
|
|
221
|
+
| `locusUrl` is absent | Rejected `ParameterError` promise. | Set the current Locus URL before retrying. |
|
|
222
|
+
| Scope is unknown or `Util.canUpdate` denies it | Synchronous `Error` or `PermissionError` from `update`. | Correct the scope/properties or wait for matching display hints. |
|
|
223
|
+
| Request dependency rejects | Returned update/audio-control promise rejects. | Preserve the dependency error; retry only under caller policy. |
|
|
224
|
+
|
|
225
|
+
## Pitfalls
|
|
226
|
+
|
|
227
|
+
- The static `Util.canSet*`/`canUnset*`/`canUpdate*` predicates are implementation helpers, not instance query methods on `ControlsOptionsManager`.
|
|
228
|
+
- Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
|
|
229
|
+
|
|
230
|
+
## Test-Case Strategy (module)
|
|
231
|
+
|
|
232
|
+
Use the current mirrored suites: `test/unit/spec/controls-options-manager/index.js`, `test/unit/spec/controls-options-manager/util.js`. Characterize the controls-options-manager-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
233
|
+
|
|
234
|
+
| Behavior / Requirement | Existing test evidence | Gap |
|
|
235
|
+
|---|---|---|
|
|
236
|
+
| `CONTROLS-OPTIONS-MANAGER-R-001` | `test/unit/spec/controls-options-manager/index.js` | cover every `Control`/`Setting` capability predicate and route |
|
|
237
|
+
| `CONTROLS-OPTIONS-MANAGER-R-002` | `test/unit/spec/controls-options-manager/index.js` | cover mixed-control batches and prove request order plus main/breakout URL selection |
|
|
238
|
+
| `CONTROLS-OPTIONS-MANAGER-R-003` | `test/unit/spec/controls-options-manager/index.js` | distinguish synchronous unknown-scope and permission errors from missing-URL and dependency promise rejections |
|
|
239
|
+
|
|
240
|
+
## Traceability
|
|
241
|
+
|
|
242
|
+
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
243
|
+
- Coverage state and contracts baseline: `../../../.sdd/manifest.json`
|