@webex/plugin-meetings 3.12.0-llmrefactor.14 → 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,241 @@
|
|
|
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
|
+
# ROAP — 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/roap/`.
|
|
13
|
+
|
|
14
|
+
## Metadata
|
|
15
|
+
|
|
16
|
+
| Field | Value |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Module id | `roap` |
|
|
19
|
+
| Source path(s) | `src/roap/` |
|
|
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 implementation and mirrored unit-test paths. Current code wins over retained prose when they conflict; commit and PR history are excluded by repository-owner decision. Missing test evidence is stated as a gap rather than inferred.
|
|
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 ROAP/request/TURN code and tests |
|
|
36
|
+
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
37
|
+
|
|
38
|
+
## Overview
|
|
39
|
+
|
|
40
|
+
`src/roap/` contains 4 direct source/reference file(s) and has 3 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
|
+
Sends outgoing ROAP media requests, processes their SDP responses, and performs TURN discovery for meeting media. Incoming Mercury ROAP routing and glare handling are owned by `MeetingsUtil` and `Meeting`.
|
|
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. Build target: `yarn workspace @webex/plugin-meetings build:src`.
|
|
49
|
+
|
|
50
|
+
## Folder / Package Structure
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
src/roap/
|
|
54
|
+
├── index.ts — module facade/controller or primary exports
|
|
55
|
+
├── request.ts — HTTP request boundary
|
|
56
|
+
├── turnDiscovery.ts — turnDiscovery implementation responsibility
|
|
57
|
+
├── types.ts — module type declarations
|
|
58
|
+
└── ai-docs/roap-spec.md — canonical module specification
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Key Files (source of truth)
|
|
62
|
+
|
|
63
|
+
| File | Holds |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `src/roap/index.ts` | module facade/controller or primary exports |
|
|
66
|
+
| `src/roap/request.ts` | HTTP request boundary |
|
|
67
|
+
| `src/roap/turnDiscovery.ts` | turnDiscovery implementation responsibility |
|
|
68
|
+
| `src/roap/types.ts` | module type declarations |
|
|
69
|
+
| `test/unit/spec/roap/index.ts` and 2 sibling test file(s) | mirrored characterization/unit coverage |
|
|
70
|
+
|
|
71
|
+
## Public Surface
|
|
72
|
+
|
|
73
|
+
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
74
|
+
|---|---|---|---|---|---|---|
|
|
75
|
+
| `roap.1` | SDK / remote | `Roap.sendRoapOK()`, `sendRoapAnswer()`, `sendRoapError()`, and `sendRoapMediaRequest()` | Build and send outgoing ROAP control/media messages through the current Locus media route. | Preserve message/action fields and returned promise behavior; inbound Mercury ordering is owned elsewhere. | `src/roap/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
76
|
+
| `roap.2` | request adapter | `RoapRequest.sendRoap()` | Issue the outgoing Locus media request and return its response/rejection to `Roap`. | Preserve request URL/body and direct promise propagation. | `src/roap/request.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
77
|
+
| `roap.3` | TURN discovery | `Roap.doTurnDiscovery()`, `generateTurnDiscoveryRequestMessage()`, `handleTurnDiscoveryHttpResponse()`, and `abortTurnDiscovery()` | Delegate TURN discovery lifecycle through the active `TurnDiscovery` instance. | Preserve skip-vs-rethrow distinctions and abort ownership. | `src/roap/index.ts`, `src/roap/turnDiscovery.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
78
|
+
| `roap.4` | TURN discovery component | `TurnDiscovery.handleTurnDiscoveryResponse()`, `generateTurnDiscoveryRequestMessage()`, `handleTurnDiscoveryHttpResponse()`, `abort()`, `sendRoapOK()`, `isSkipped()`, and `doTurnDiscovery()` | Generate the discovery offer, interpret HTTP results, and expose normalized TURN server information or skip reason. | HTTP 409/403 are rethrown; other handled discovery failures may resolve a skipped result. | `src/roap/turnDiscovery.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
79
|
+
| `roap.5` | exported contracts | `TurnDiscoveryResult`, `TurnServerInfo`, and `TurnDiscoverySkipReason` | Share the exact success/skip shape returned to Meeting negotiation. | Add fields and skip reasons compatibly; existing values are consumer-visible. | `src/roap/types.ts`, `src/roap/turnDiscovery.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
80
|
+
|
|
81
|
+
Compatibility notes:
|
|
82
|
+
- Prefer additive options and payload fields. Preserve method/event names, rejection semantics, and cleanup timing; route public changes through `src/index.ts` or the documented owning object.
|
|
83
|
+
|
|
84
|
+
## Requires (dependencies)
|
|
85
|
+
|
|
86
|
+
Meeting/Locus media request transport, SDP utilities, media connection, Webex TURN discovery, and sequence state.
|
|
87
|
+
|
|
88
|
+
## Requirements
|
|
89
|
+
|
|
90
|
+
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
91
|
+
|---|---|---|---|---|---|---|
|
|
92
|
+
| `ROAP-R-001` | Send outgoing ROAP media messages and process the returned response; inbound Mercury routing is outside `src/roap/`. | Ownership must match current call paths so changes to incoming sequence/glare logic are made in `MeetingsUtil` and `Meeting`, not in this sender. | `src/roap/index.ts`, `src/meetings/util.ts`, `src/meeting/index.ts` | `test/unit/spec/roap/index.ts`, `test/unit/spec/meeting/index.js` | none | PRESENT |
|
|
93
|
+
| `ROAP-R-002` | send Locus media requests and apply SDP answers. | Locus media requests and TURN discovery have different response and failure semantics during negotiation. | `src/roap/index.ts`, `src/roap/request.ts` | `test/unit/spec/roap/index.ts` | non-409/403 TURN failures need explicit skip-reason coverage | PRESENT |
|
|
94
|
+
| `ROAP-R-003` | Outgoing media-request failures reject their caller. TURN discovery rethrows HTTP 409/403, while other handled discovery failures resolve a result with `turnDiscoverySkippedReason`; this sender owns no inbound Mercury listener. | Negotiation code must distinguish direct request rejection from TURN skip results and the specific 409/403 rethrow path. | `src/roap/index.ts`, `src/roap/request.ts`, `src/roap/turnDiscovery.ts` | `test/unit/spec/roap/index.ts`, `test/unit/spec/roap/turnDiscovery.ts` | non-409/403 skip reasons need a complete matrix | PRESENT |
|
|
95
|
+
| `ROAP-R-004` | Incoming ROAP sequence and glare handling are delegated by `MeetingsUtil.handleRoapMercury()` to `Meeting.roapMessageReceived()`; `src/roap/types.ts` only declares TURN-discovery shapes. | Explicit cross-module ownership prevents passive TURN types from being mistaken for inbound negotiation guards. | `src/meetings/util.ts`, `src/meeting/index.ts`, `src/roap/types.ts` | `test/unit/spec/meeting/index.js` | none | PRESENT |
|
|
96
|
+
| `ROAP-R-005` | TURN discovery normalizes service results for the active media negotiation, rethrows 409/403, and reports other handled failures through the documented skip reason. | Media setup needs the correct relay configuration and an explicit skipped outcome rather than fabricated credentials or a blanket rejection claim. | `src/roap/turnDiscovery.ts`, `src/roap/request.ts` | `test/unit/spec/roap/turnDiscovery.ts`, `test/unit/spec/roap/request.ts` | none | PRESENT |
|
|
97
|
+
|
|
98
|
+
## Design Overview
|
|
99
|
+
|
|
100
|
+
`src/roap/index.ts` is the outgoing ROAP sender: it builds/sends Locus media requests through `request.ts` and handles the returned SDP answer. `turnDiscovery.ts` separately resolves TURN data. Incoming Mercury routing and glare handling belong to `MeetingsUtil` and `Meeting`, outside this module.
|
|
101
|
+
|
|
102
|
+
## Data Flow
|
|
103
|
+
|
|
104
|
+
```mermaid
|
|
105
|
+
flowchart LR
|
|
106
|
+
Meeting[Meeting outgoing negotiation] --> Roap[index.ts]
|
|
107
|
+
Roap --> Request[request.ts]
|
|
108
|
+
Request --> Locus[Locus media endpoint]
|
|
109
|
+
Locus --> Request
|
|
110
|
+
Request --> Roap
|
|
111
|
+
Roap --> Media[apply returned SDP answer]
|
|
112
|
+
Meeting --> Turn[turnDiscovery.ts]
|
|
113
|
+
Turn --> Discovery[Webex service discovery]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Sequence Diagram(s)
|
|
117
|
+
|
|
118
|
+
Sequence coverage:
|
|
119
|
+
|
|
120
|
+
| Operation group | Diagram | Failure coverage |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| UC-1…UC-4 — outgoing ROAP and TURN operation groups | Outgoing ROAP and TURN primary sequence | outgoing request rejection, TURN 409/403 rethrow, handled skip result, and abort |
|
|
123
|
+
| UC-1…UC-4 — outgoing ROAP and TURN alternate/failure paths | Outgoing ROAP and TURN alternate/failure sequence | missing media URL/payload, Locus media request rejection, invalid returned SDP, or TURN discovery failure |
|
|
124
|
+
|
|
125
|
+
### Outgoing ROAP and TURN primary sequence
|
|
126
|
+
|
|
127
|
+
```mermaid
|
|
128
|
+
sequenceDiagram
|
|
129
|
+
participant M as Meeting
|
|
130
|
+
participant R as Roap index.ts
|
|
131
|
+
participant Q as roap/request.ts
|
|
132
|
+
participant L as Locus media endpoint
|
|
133
|
+
M->>R: sendRoapMediaRequest(options)
|
|
134
|
+
R->>Q: send outgoing ROAP payload
|
|
135
|
+
Q->>L: HTTP media request
|
|
136
|
+
L-->>Q: response with SDP/ROAP or rejection
|
|
137
|
+
Q-->>R: response
|
|
138
|
+
R-->>M: processed outgoing result
|
|
139
|
+
Note over M: Incoming Mercury ROAP and glare are handled in MeetingsUtil/Meeting, not src/roap
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Outgoing ROAP and TURN alternate/failure sequence
|
|
143
|
+
|
|
144
|
+
```mermaid
|
|
145
|
+
sequenceDiagram
|
|
146
|
+
participant M as Meeting outgoing negotiation
|
|
147
|
+
participant R as Roap
|
|
148
|
+
participant Q as request.ts
|
|
149
|
+
participant L as Locus media endpoint
|
|
150
|
+
M->>R: sendRoapMediaRequest(options)
|
|
151
|
+
R->>Q: outgoing ROAP payload
|
|
152
|
+
alt media URL/payload is valid
|
|
153
|
+
Q->>L: HTTP media request
|
|
154
|
+
L-->>Q: ROAP/SDP response or rejection
|
|
155
|
+
Q-->>R: response or rejection
|
|
156
|
+
R-->>M: processed result or propagated rejection
|
|
157
|
+
else required media request context is missing
|
|
158
|
+
Q--xR: rejected promise from request.ts
|
|
159
|
+
R--xM: propagated rejection
|
|
160
|
+
end
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Class / Component Relationships
|
|
164
|
+
|
|
165
|
+
```mermaid
|
|
166
|
+
classDiagram
|
|
167
|
+
class Meeting
|
|
168
|
+
class Roap
|
|
169
|
+
class Request
|
|
170
|
+
class Locus
|
|
171
|
+
class Media
|
|
172
|
+
class Turn
|
|
173
|
+
class Discovery
|
|
174
|
+
Meeting --> Roap
|
|
175
|
+
Roap --> Request
|
|
176
|
+
Request --> Locus
|
|
177
|
+
Locus --> Request
|
|
178
|
+
Request --> Roap
|
|
179
|
+
Roap --> Media
|
|
180
|
+
Meeting --> Turn
|
|
181
|
+
Turn --> Discovery
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The arrows identify ownership and delegation inside `src/roap/`; files that only declare types or constants are not presented as transports.
|
|
185
|
+
|
|
186
|
+
## Use Cases
|
|
187
|
+
|
|
188
|
+
- **UC-1:** Send outgoing ROAP OK, answer, error, or media-request payloads through `RoapRequest.sendRoap()` and return the response/rejection. Evidence: `src/roap/index.ts`, `src/roap/request.ts`.
|
|
189
|
+
- **UC-2:** Generate a TURN discovery request, interpret its response, and expose normalized TURN server information. Evidence: `src/roap/turnDiscovery.ts`.
|
|
190
|
+
- **UC-3:** Abort an active discovery through the owning `Roap`/`TurnDiscovery` lifecycle. Evidence: `src/roap/index.ts`, `src/roap/turnDiscovery.ts`.
|
|
191
|
+
- **UC-4:** Distinguish 409/403 rethrows from other handled discovery outcomes that produce a skip reason, without assigning inbound Mercury/glare processing to this module. Evidence: `src/roap/turnDiscovery.ts`, `src/meeting/index.ts`, `src/meetings/util.ts`.
|
|
192
|
+
|
|
193
|
+
## State Model
|
|
194
|
+
|
|
195
|
+
ROAP sequence, pending offer/answer, negotiation state, and TURN discovery results are held per media negotiation.
|
|
196
|
+
|
|
197
|
+
## Business Rules & Invariants
|
|
198
|
+
|
|
199
|
+
- `src/roap/` owns outgoing request/response and TURN discovery only. Incoming Mercury sequencing/glare remains in `src/meetings/util.ts` and `src/meeting/index.ts`. Direct outgoing ROAP request failures reject; TURN discovery rethrows 409/403, while its other handled failures resolve a result containing `turnDiscoverySkippedReason`.
|
|
200
|
+
|
|
201
|
+
## Concurrency & Reactive Flow
|
|
202
|
+
|
|
203
|
+
- Each outgoing ROAP/TURN operation is represented by its returned promise and owns no inbound Mercury listener or persistent negotiation state. Incoming ROAP sequence/glare ordering remains in `MeetingsUtil.handleRoapMercury()` and `Meeting.roapMessageReceived()`.
|
|
204
|
+
|
|
205
|
+
## Protocol / Wire Format
|
|
206
|
+
|
|
207
|
+
- External payloads are parsed/serialized by files under `src/roap/` and existing Webex/media dependencies. Preserve current field names, enum/raw values, sequence identifiers, and compatibility behavior; do not treat the normalized client model as the wire schema.
|
|
208
|
+
|
|
209
|
+
## Error Handling & Failure Modes
|
|
210
|
+
|
|
211
|
+
| Condition | Signal | Caller recovery |
|
|
212
|
+
|---|---|---|
|
|
213
|
+
| Required Locus media request context/payload is absent | The request helper rejects rather than issuing an invalid outgoing ROAP request. | Supply the current media URL and ROAP payload. |
|
|
214
|
+
| Locus media request rejects, or TURN discovery encounters a handled failure | The media-request promise rejects; TURN 409/403 rethrows, while other handled discovery failures resolve with `turnDiscoverySkippedReason`. `src/roap/` has no inbound Mercury listener to clean up. | Branch on request rejection versus TURN rethrow/skip result in the Meeting negotiation flow. |
|
|
215
|
+
| Locus returns an accepted ROAP/SDP response | `Roap` processes and returns the outgoing operation result to Meeting. | Apply it only within the current Meeting negotiation. |
|
|
216
|
+
|
|
217
|
+
## Pitfalls
|
|
218
|
+
|
|
219
|
+
- Offer/answer messages are ordered protocol state. Retrying or applying a stale sequence can corrupt the peer connection.
|
|
220
|
+
- Public behavior may be reachable through a parent `Meeting`/`Meetings` object even when the source helper is not exported directly.
|
|
221
|
+
|
|
222
|
+
## Key Design Trade-off
|
|
223
|
+
|
|
224
|
+
- Explicit ROAP state preserves interoperability and recoverable errors but makes media setup sequential and stateful.
|
|
225
|
+
|
|
226
|
+
## Test-Case Strategy (module)
|
|
227
|
+
|
|
228
|
+
Use the current mirrored suites: `test/unit/spec/roap/index.ts`, `test/unit/spec/roap/request.ts`, `test/unit/spec/roap/turnDiscovery.ts`. Characterize the roap-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
229
|
+
|
|
230
|
+
| Behavior / Requirement | Existing test evidence | Gap |
|
|
231
|
+
|---|---|---|
|
|
232
|
+
| `ROAP-R-001` | `test/unit/spec/roap/index.ts` | cover outgoing ROAP, request adapter, TURN discovery, skip/rethrow, and abort groups |
|
|
233
|
+
| `ROAP-R-002` | `test/unit/spec/roap/index.ts` | non-409/403 TURN failures need explicit skip-reason coverage |
|
|
234
|
+
| `ROAP-R-003` | `test/unit/spec/roap/index.ts`, `test/unit/spec/roap/turnDiscovery.ts` | cover 409/403 rethrow, handled skip results, and abort as distinct outcomes |
|
|
235
|
+
| `ROAP-R-004` | `test/unit/spec/meeting/index.js` | keep inbound sequence/glare coverage with the owning Meeting module |
|
|
236
|
+
| `ROAP-R-005` | `test/unit/spec/roap/turnDiscovery.ts`, `test/unit/spec/roap/request.ts` | none |
|
|
237
|
+
|
|
238
|
+
## Traceability
|
|
239
|
+
|
|
240
|
+
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
241
|
+
- 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
|
+
# WEBINAR — 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/webinar/`.
|
|
13
|
+
|
|
14
|
+
## Metadata
|
|
15
|
+
|
|
16
|
+
| Field | Value |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Module id | `webinar` |
|
|
19
|
+
| Source path(s) | `src/webinar/` |
|
|
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 webinar controller, collection, 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/webinar/` contains 3 direct source/reference file(s) and has 3 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 webinar practice-session data-channel lifecycle, role/status projection, and host webcast controls including layout and attendee operations.
|
|
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/webinar/
|
|
54
|
+
├── collection.ts — module-owned collection
|
|
55
|
+
├── index.ts — module facade/controller or primary exports
|
|
56
|
+
├── utils.ts — normalization/helper functions
|
|
57
|
+
└── ai-docs/webinar-spec.md — canonical module specification
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Key Files (source of truth)
|
|
61
|
+
|
|
62
|
+
| File | Holds |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `src/webinar/collection.ts` | module-owned collection |
|
|
65
|
+
| `src/webinar/index.ts` | module facade/controller or primary exports |
|
|
66
|
+
| `src/webinar/utils.ts` | normalization/helper functions |
|
|
67
|
+
| `test/unit/spec/webinar/collection.ts` and 2 sibling test file(s) | mirrored characterization/unit coverage |
|
|
68
|
+
|
|
69
|
+
## Public Surface
|
|
70
|
+
|
|
71
|
+
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
72
|
+
|---|---|---|---|---|---|---|
|
|
73
|
+
| `webinar.1` | SDK / state | `cleanUp()`, `locusUrlUpdate()`, `updateWebcastUrl()`, `updateCanManageWebcast()`, `updateRoleChanged()`, `getValidatedWebinarMeeting()`, and `updateStatusByRole()` | Derive webinar and practice-session state for the owning meeting from current Locus inputs. | Preserve owner validation and current role/status transitions. | `src/webinar/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
74
|
+
| `webinar.2` | SDK / lifecycle | `isJoinPracticeSessionDataChannel()`, `ensurePracticeSessionDatachannelToken()`, `updatePSDataChannel()`, `cleanupPSDataChannel()`, `setPracticeSessionState()`, and `updatePracticeSessionStatus()` | Own the meeting-specific practice-session LLM token, socket, and relay listener lifecycle. | Replacement/cleanup must affect only the owning meeting's channel resources. | `src/webinar/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
75
|
+
| `webinar.3` | SDK / remote | `startWebcast()` and `stopWebcast()` | Start or stop webcast through the current webcast URL. | Current code validates URL/input but does not consult `canManageWebcast` locally. | `src/webinar/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
76
|
+
| `webinar.4` | SDK / remote | `queryWebcastLayout()` and `updateWebcastLayout()` | Read or update the webcast layout using the current webcast instance URL and the supplied layout fields. | These methods do not call `sanitizeParams()` or enforce `canManageWebcast`; preserve their direct request outcome. | `src/webinar/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
77
|
+
| `webinar.5` | SDK / remote | `viewAllWebcastAttendees()`, `searchWebcastAttendees()`, `expelWebcastAttendee()`, and `searchLargeScaleWebinarAttendees()` | Query, search, or expel webcast attendees through the configured service endpoint. | Standard search uses `encodeURIComponent`; only large-scale search calls `sanitizeParams()` before `URLSearchParams`. None enforces `canManageWebcast`. | `src/webinar/index.ts`, `src/webinar/utils.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
78
|
+
| `webinar.6` | exported helpers/models | `sanitizeParams()` and `WebinarCollection.set()` / `get()` | Sanitize request parameters and provide the collection registered by the `Webinar` plugin definition. | `index.ts` declares `collections: {webinar: WebinarCollection}` for framework-managed instantiation; controller methods do not explicitly call the collection's read/write methods. | `src/webinar/index.ts`, `src/webinar/utils.ts`, `src/webinar/collection.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
79
|
+
|
|
80
|
+
Compatibility notes:
|
|
81
|
+
- 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.
|
|
82
|
+
|
|
83
|
+
## Requires (dependencies)
|
|
84
|
+
|
|
85
|
+
Parent Meeting/Locus state, webinar service URLs, data-channel tokens/media, role/capability state, collection/request access, and metrics/events.
|
|
86
|
+
|
|
87
|
+
## Requirements
|
|
88
|
+
|
|
89
|
+
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
90
|
+
|---|---|---|---|---|---|---|
|
|
91
|
+
| `WEBINAR-R-001` | derive webinar role, practice-session, and webcast state. | Owns webinar practice-session data-channel lifecycle, role/status projection, and host webcast controls including layout and attendee operations. | `src/webinar/index.ts` | `test/unit/spec/webinar/index.ts` | none | PRESENT |
|
|
92
|
+
| `WEBINAR-R-002` | start/stop practice-session data channel and webcast. | Practice-channel and webcast operations use different owners and request paths, so their lifecycle and authorization behavior must stay distinct. | `src/webinar/index.ts` | `test/unit/spec/webinar/index.ts` | stored `canManageWebcast` is not read by webcast methods; retain as an authorization-gap characterization | PRESENT |
|
|
93
|
+
| `WEBINAR-R-003` | Invalid inputs and HTTP/channel failures remain visible; practice-session cleanup removes the relay listener/token ownership only for the meeting that owns the channel. | Practice resources are meeting-owned, while webcast authorization currently depends on the service rather than the stored capability. | `src/webinar/` | `test/unit/spec/webinar/index.ts` | none | PRESENT |
|
|
94
|
+
| `WEBINAR-R-004` | Practice-session data-channel token/connection state is created, replaced, and cleaned independently from the public meeting channel. | Practice participants must not receive or retain events on the wrong session transport. | `src/webinar/index.ts` | `test/unit/spec/webinar/index.ts` | none | PRESENT |
|
|
95
|
+
| `WEBINAR-R-005` | Webcast operations send the user token against the current webcast URL without reading `canManageWebcast`. `startWebcast()` validates `meeting`; large-scale attendee search validates the resolvable webinar meeting and attendee-search URL and sanitizes its optional query fields. Layout, standard view/search/expel, and stop operations perform no equivalent local validation/sanitization. | This preserves the method-specific enforcement boundary instead of generalizing the large-scale-search checks across unrelated operations. | `src/webinar/index.ts`, `src/webinar/utils.ts` | `test/unit/spec/webinar/index.ts`, `test/unit/spec/webinar/utils.ts` | Possible product authorization defect: confirm whether these operations should reject locally when `canManageWebcast` is false. | PRESENT |
|
|
96
|
+
| `WEBINAR-R-006` | Role and practice/webcast status updates refresh the controller before exposing the new state. | Consumer controls must follow the latest Locus role/status projection rather than stale local intent. | `src/webinar/index.ts` | `test/unit/spec/webinar/index.ts` | none | PRESENT |
|
|
97
|
+
|
|
98
|
+
## Design Overview
|
|
99
|
+
|
|
100
|
+
`Webinar` projects Locus role/practice/webcast data, owns the practice-session LLM data-channel token/listener lifecycle, and calls webcast/layout/attendee URLs directly. `utils.ts` sanitizes only large-scale attendee-search parameters. `index.ts` registers `WebinarCollection` through its WebexPlugin `collections` declaration for framework-managed instantiation, although controller methods do not explicitly read or populate it.
|
|
101
|
+
|
|
102
|
+
## Data Flow
|
|
103
|
+
|
|
104
|
+
```mermaid
|
|
105
|
+
flowchart LR
|
|
106
|
+
Locus[Locus webinar role/status/URLs] --> Controller[index.ts]
|
|
107
|
+
Caller[Meeting / webinar consumer] --> Controller
|
|
108
|
+
Controller --> LLM[practice-session LLM data channel]
|
|
109
|
+
Controller --> Service[webcast/layout/attendee HTTP URLs]
|
|
110
|
+
Framework[WebexPlugin collection lifecycle] --> Collection[collection.ts WebinarCollection]
|
|
111
|
+
Controller -. declares collection .-> Framework
|
|
112
|
+
Utils[utils.ts query sanitization] --> Service
|
|
113
|
+
Controller --> Caller
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Sequence Diagram(s)
|
|
117
|
+
|
|
118
|
+
Sequence coverage:
|
|
119
|
+
|
|
120
|
+
| Operation group | Diagram | Failure coverage |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| UC-1…UC-4 — webinar practice and webcast operation groups | Webinar practice and webcast primary sequence | invalid URL/input, practice-channel failure/cleanup, webcast rejection, and absent local capability guard |
|
|
123
|
+
| UC-1…UC-4 — webinar practice and webcast alternate/failure paths | Webinar practice and webcast alternate/failure sequence | missing webinar/service URL, invalid layout/search input, practice-channel ownership conflict, token refresh failure, or HTTP rejection |
|
|
124
|
+
|
|
125
|
+
### Webinar practice and webcast primary sequence
|
|
126
|
+
|
|
127
|
+
```mermaid
|
|
128
|
+
sequenceDiagram
|
|
129
|
+
participant C as Webinar consumer
|
|
130
|
+
participant W as Webinar index.ts
|
|
131
|
+
participant U as utils.ts
|
|
132
|
+
participant S as Webcast service URL
|
|
133
|
+
C->>W: start/stop webcast, layout, or attendee operation
|
|
134
|
+
W->>W: validate required meeting/URL/input
|
|
135
|
+
Note over W: canManageWebcast is stored but not read as a client-side gate
|
|
136
|
+
W->>U: sanitize only large-scale attendee-search parameters
|
|
137
|
+
W->>S: HTTP operation with user token
|
|
138
|
+
S-->>W: response or rejection
|
|
139
|
+
W-->>C: result
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Webinar practice and webcast alternate/failure sequence
|
|
143
|
+
|
|
144
|
+
```mermaid
|
|
145
|
+
sequenceDiagram
|
|
146
|
+
participant L as Locus webinar update
|
|
147
|
+
participant W as Webinar
|
|
148
|
+
participant P as Practice-session LLM channel
|
|
149
|
+
participant C as Meeting consumer
|
|
150
|
+
L-->>W: role/status/practice channel URL and token
|
|
151
|
+
alt update belongs to this meeting's practice session
|
|
152
|
+
W->>P: create/replace owned channel and relay listener
|
|
153
|
+
P-->>C: scoped practice-session events
|
|
154
|
+
else owning meeting cleans up or channel is replaced
|
|
155
|
+
W->>P: remove this meeting's relay listener/token ownership
|
|
156
|
+
end
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Class / Component Relationships
|
|
160
|
+
|
|
161
|
+
```mermaid
|
|
162
|
+
classDiagram
|
|
163
|
+
class Locus
|
|
164
|
+
class Controller
|
|
165
|
+
class Caller
|
|
166
|
+
class LLM
|
|
167
|
+
class Service
|
|
168
|
+
class Collection
|
|
169
|
+
class Utils
|
|
170
|
+
Locus --> Controller
|
|
171
|
+
Caller --> Controller
|
|
172
|
+
Controller --> LLM
|
|
173
|
+
Controller --> Service
|
|
174
|
+
Framework --> Collection
|
|
175
|
+
Controller ..> Framework : declares collection registration
|
|
176
|
+
Utils --> Service
|
|
177
|
+
Controller --> Caller
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The arrows identify ownership and delegation inside `src/webinar/`; files that only declare types or constants are not presented as transports.
|
|
181
|
+
|
|
182
|
+
## Use Cases
|
|
183
|
+
|
|
184
|
+
- **UC-1:** Project webinar role, webcast URL, practice status, and owner identity from Locus updates. Evidence: `src/webinar/index.ts`.
|
|
185
|
+
- **UC-2:** Acquire the practice-session token, connect/replace its LLM channel for the owning meeting, and remove its relay listener during cleanup. Evidence: `src/webinar/index.ts`.
|
|
186
|
+
- **UC-3:** Start/stop webcast or query/update layout after current URL/input checks; `canManageWebcast` is stored but not enforced by these methods. Evidence: `src/webinar/index.ts`.
|
|
187
|
+
- **UC-4:** View or expel attendees directly, standard-search with `encodeURIComponent`, or large-scale-search after `sanitizeParams()` and meeting/search-URL validation, while relying on service authorization. Evidence: `src/webinar/index.ts`, `src/webinar/utils.ts`.
|
|
188
|
+
|
|
189
|
+
## State Model
|
|
190
|
+
|
|
191
|
+
Webcast URL, management capability, role transition, practice-session status/channel/token, layout, attendee collection, and listeners are meeting scoped.
|
|
192
|
+
|
|
193
|
+
## Business Rules & Invariants
|
|
194
|
+
|
|
195
|
+
- Practice-channel replacement is meeting-owner scoped. Only `searchLargeScaleWebinarAttendees()` uses `sanitizeParams()`; standard attendee search URL-encodes its keyword, and layout/view/expel operations do neither. Webcast operations rely on server authorization and do not consult `canManageWebcast`. Evidence: `src/webinar/index.ts`, `src/webinar/utils.ts`.
|
|
196
|
+
|
|
197
|
+
## Concurrency & Reactive Flow
|
|
198
|
+
|
|
199
|
+
- Practice-session channel/listener/token ownership is keyed to the owning meeting and is detached when that meeting replaces or cleans up its practice channel. Webcast HTTP operations settle their returned promises; current code stores `canManageWebcast` but does not read it as a local authorization guard.
|
|
200
|
+
|
|
201
|
+
## State Machine
|
|
202
|
+
|
|
203
|
+
```mermaid
|
|
204
|
+
stateDiagram-v2
|
|
205
|
+
state "practiceSessionEnabled = false" as PracticeFalse
|
|
206
|
+
state "practiceSessionEnabled = true" as PracticeTrue
|
|
207
|
+
[*] --> PracticeFalse
|
|
208
|
+
PracticeFalse --> PracticeTrue: updatePracticeSessionStatus({enabled: true})
|
|
209
|
+
PracticeTrue --> PracticeFalse: updatePracticeSessionStatus({enabled: false})
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
The diagram is limited to the stored boolean projection in `src/webinar/index.ts`. Practice-channel creation/replacement is a side effect of `updatePracticeSessionStatus()`/`updatePSDataChannel()`, not a separately named controller state.
|
|
213
|
+
|
|
214
|
+
## Error Handling & Failure Modes
|
|
215
|
+
|
|
216
|
+
| Condition | Signal | Caller recovery |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| `startWebcast()` lacks a meeting, or large-scale search cannot resolve its webinar meeting/attendee-search URL | The async operation rejects before issuing its request. Layout, stop, standard view/search, and expel do not perform the same local validation. | Supply the method-specific required context; do not infer a shared validation gate. |
|
|
219
|
+
| Practice-session channel/token setup fails or its owning meeting cleans up | The failure remains visible; cleanup removes only that meeting's relay listener/token ownership. | Re-establish the practice channel for the owning meeting if still required. |
|
|
220
|
+
| Webcast HTTP request rejects | The returned promise rejects. `canManageWebcast` is not consulted as a client-side guard by these operations. | Handle the service rejection; treat local capability enforcement as the recorded product-decision gap. |
|
|
221
|
+
|
|
222
|
+
## Pitfalls
|
|
223
|
+
|
|
224
|
+
- Practice-session media/data-channel state differs from public webcast state. Reusing the ordinary meeting channel without cleanup can deliver events to the wrong session.
|
|
225
|
+
- Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
|
|
226
|
+
|
|
227
|
+
## Test-Case Strategy (module)
|
|
228
|
+
|
|
229
|
+
Use the current mirrored suites: `test/unit/spec/webinar/collection.ts`, `test/unit/spec/webinar/index.ts`, `test/unit/spec/webinar/utils.ts`. Characterize the webinar-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
230
|
+
|
|
231
|
+
| Behavior / Requirement | Existing test evidence | Gap |
|
|
232
|
+
|---|---|---|
|
|
233
|
+
| `WEBINAR-R-001` | `test/unit/spec/webinar/index.ts` | cover state, practice channel, webcast, layout, attendee, and standalone helper groups |
|
|
234
|
+
| `WEBINAR-R-002` | `test/unit/spec/webinar/index.ts` | cover start/stop, layout, search, pagination, and expel request inputs separately |
|
|
235
|
+
| `WEBINAR-R-003` | `test/unit/spec/webinar/index.ts` | prove practice cleanup is owner-scoped and webcast methods do not read `canManageWebcast` |
|
|
236
|
+
| `WEBINAR-R-004` | `test/unit/spec/webinar/index.ts` | verify token/channel replacement cleanup |
|
|
237
|
+
| `WEBINAR-R-005` | `test/unit/spec/webinar/index.ts`, `test/unit/spec/webinar/utils.ts` | characterize current no-client-gate behavior; capability enforcement remains a product-decision gap |
|
|
238
|
+
| `WEBINAR-R-006` | `test/unit/spec/webinar/index.ts` | none |
|
|
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`
|
|
@@ -159,6 +159,39 @@ describe('plugin-meetings', () => {
|
|
|
159
159
|
interpretation.updateInterpretation({siLanguages: [{languageName: 'en', languageCode: 1}]});
|
|
160
160
|
checkSILanguage(interpretation.siLanguages.en, {languageName: 'en', languageCode: 1});
|
|
161
161
|
});
|
|
162
|
+
it('stores siEnabled from the interpretation control', () => {
|
|
163
|
+
interpretation.updateInterpretation({siEnabled: true, siLanguages: []});
|
|
164
|
+
assert.equal(interpretation.siEnabled, true);
|
|
165
|
+
|
|
166
|
+
interpretation.updateInterpretation({siEnabled: false, siLanguages: []});
|
|
167
|
+
assert.equal(interpretation.siEnabled, false);
|
|
168
|
+
});
|
|
169
|
+
it('preserves siEnabled when preserveSiEnabled is set (meeting-info path)', () => {
|
|
170
|
+
interpretation.updateInterpretation({siEnabled: true, siLanguages: []});
|
|
171
|
+
assert.equal(interpretation.siEnabled, true);
|
|
172
|
+
|
|
173
|
+
// The meeting-info path passes only siLanguages; siEnabled must survive.
|
|
174
|
+
interpretation.updateInterpretation(
|
|
175
|
+
{siLanguages: [{languageName: 'en', languageCode: 1}]},
|
|
176
|
+
{preserveSiEnabled: true}
|
|
177
|
+
);
|
|
178
|
+
assert.equal(interpretation.siEnabled, true);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('resets siEnabled and siLanguages consistently for a delta without interpretation', () => {
|
|
182
|
+
interpretation.updateInterpretation({
|
|
183
|
+
siEnabled: true,
|
|
184
|
+
siLanguages: [{languageName: 'en', languageCode: 1}],
|
|
185
|
+
});
|
|
186
|
+
assert.equal(interpretation.siEnabled, true);
|
|
187
|
+
assert.equal(interpretation.siLanguages.length, 1);
|
|
188
|
+
|
|
189
|
+
// A locus delta carrying no interpretation resets both fields together, so we never
|
|
190
|
+
// land in the "SI on with zero languages" state.
|
|
191
|
+
interpretation.updateInterpretation(undefined);
|
|
192
|
+
assert.equal(interpretation.siEnabled, false);
|
|
193
|
+
assert.equal(interpretation.siLanguages.length, 0);
|
|
194
|
+
});
|
|
162
195
|
});
|
|
163
196
|
|
|
164
197
|
describe('#updateSelfInterpretation', () => {
|
|
@@ -361,6 +394,66 @@ describe('plugin-meetings', () => {
|
|
|
361
394
|
});
|
|
362
395
|
});
|
|
363
396
|
|
|
397
|
+
describe('#endSimultaneousInterpretation', () => {
|
|
398
|
+
it('makes the request as expected', async () => {
|
|
399
|
+
const mockResponse = {body: {locus: {url: 'locusUrl'}}};
|
|
400
|
+
webex.request.returns(Promise.resolve(mockResponse));
|
|
401
|
+
|
|
402
|
+
await interpretation.endSimultaneousInterpretation();
|
|
403
|
+
assert.calledOnceWithExactly(webex.request, {
|
|
404
|
+
method: 'PATCH',
|
|
405
|
+
uri: 'locusUrl/controls',
|
|
406
|
+
body: {
|
|
407
|
+
interpretation: {
|
|
408
|
+
siEnabled: false,
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
});
|
|
412
|
+
assert.calledOnceWithExactly(
|
|
413
|
+
mockMeeting.locusInfo.handleLocusAPIResponse,
|
|
414
|
+
mockMeeting,
|
|
415
|
+
mockResponse.body
|
|
416
|
+
);
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
it('rejects with error', async () => {
|
|
420
|
+
const mockError = new Error('something wrong');
|
|
421
|
+
webex.request.returns(Promise.reject(mockError));
|
|
422
|
+
LoggerProxy.logger.error = sinon.stub();
|
|
423
|
+
|
|
424
|
+
await assert.isRejected(
|
|
425
|
+
interpretation.endSimultaneousInterpretation(),
|
|
426
|
+
mockError,
|
|
427
|
+
'something wrong'
|
|
428
|
+
);
|
|
429
|
+
|
|
430
|
+
assert.calledOnceWithExactly(
|
|
431
|
+
LoggerProxy.logger.error,
|
|
432
|
+
'Meeting:interpretation#endSimultaneousInterpretation failed',
|
|
433
|
+
mockError
|
|
434
|
+
);
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
it('resolves without touching locusInfo when the meeting is not found', async () => {
|
|
438
|
+
webex.meetings.meetingCollection.getByKey.returns(undefined);
|
|
439
|
+
const mockResponse = {body: {locus: {url: 'locusUrl'}}};
|
|
440
|
+
webex.request.returns(Promise.resolve(mockResponse));
|
|
441
|
+
|
|
442
|
+
await interpretation.endSimultaneousInterpretation();
|
|
443
|
+
|
|
444
|
+
assert.calledOnceWithExactly(webex.request, {
|
|
445
|
+
method: 'PATCH',
|
|
446
|
+
uri: 'locusUrl/controls',
|
|
447
|
+
body: {
|
|
448
|
+
interpretation: {
|
|
449
|
+
siEnabled: false,
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
});
|
|
453
|
+
assert.notCalled(mockMeeting.locusInfo.handleLocusAPIResponse);
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
|
|
364
457
|
describe('#changeDirection', () => {
|
|
365
458
|
it('makes the request as expected', async () => {
|
|
366
459
|
interpretation.set({
|
|
@@ -115,6 +115,7 @@ describe('plugin-meetings', () => {
|
|
|
115
115
|
canAttendeeRequestAiAssistantEnabled: null,
|
|
116
116
|
isAttendeeRequestAiAssistantDeclinedAll: null,
|
|
117
117
|
isAnonymizeDisplayNamesEnabled: null,
|
|
118
|
+
isSupportParticipantList: null,
|
|
118
119
|
canViewTheParticipantList: null,
|
|
119
120
|
|
|
120
121
|
...expected,
|
|
@@ -211,6 +212,7 @@ describe('plugin-meetings', () => {
|
|
|
211
212
|
'showAutoEndMeetingWarning',
|
|
212
213
|
'canDoVideo',
|
|
213
214
|
'canAnnotate',
|
|
215
|
+
'isSupportParticipantList',
|
|
214
216
|
'canUseVoip',
|
|
215
217
|
'supportHQV',
|
|
216
218
|
'supportHDV',
|
|
@@ -14417,6 +14417,11 @@ describe('plugin-meetings', () => {
|
|
|
14417
14417
|
requiredDisplayHints: [],
|
|
14418
14418
|
requiredPolicies: [SELF_POLICY.SUPPORT_ANNOTATION],
|
|
14419
14419
|
},
|
|
14420
|
+
{
|
|
14421
|
+
actionName: 'isSupportParticipantList',
|
|
14422
|
+
requiredDisplayHints: [],
|
|
14423
|
+
requiredPolicies: [SELF_POLICY.SUPPORT_PARTICIPANT_LIST],
|
|
14424
|
+
},
|
|
14420
14425
|
{
|
|
14421
14426
|
actionName: 'canPollingAndQA',
|
|
14422
14427
|
requiredDisplayHints: [],
|