@webex/plugin-meetings 3.13.0-next.13 → 3.13.0-next.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.
Files changed (100) hide show
  1. package/.repo-context.json +577 -0
  2. package/.sdd/manifest.json +1320 -428
  3. package/AGENTS.md +528 -72
  4. package/dist/aiEnableRequest/index.js +1 -1
  5. package/dist/breakouts/breakout.js +1 -1
  6. package/dist/breakouts/index.js +1 -1
  7. package/dist/config.js +1 -1
  8. package/dist/interpretation/index.js +1 -1
  9. package/dist/interpretation/siLanguage.js +1 -1
  10. package/dist/webinar/index.js +1 -1
  11. package/docs/adr/0001-migrate-existing-docs-into-sdd.md +141 -0
  12. package/docs/adr/index.md +26 -0
  13. package/docs/architecture.md +816 -0
  14. package/docs/getting-started.md +177 -0
  15. package/docs/index.md +53 -0
  16. package/docs/specs/README.md +126 -0
  17. package/package.json +21 -21
  18. package/schemas/repo-context.schema.json +796 -0
  19. package/src/aiEnableRequest/docs/README.md +376 -0
  20. package/src/annotation/docs/README.md +402 -0
  21. package/src/breakouts/docs/README.md +643 -0
  22. package/src/controls-options-manager/docs/README.md +365 -0
  23. package/src/hashTree/docs/README.md +566 -0
  24. package/src/interceptors/docs/README.md +434 -0
  25. package/src/interpretation/docs/README.md +420 -0
  26. package/src/locus-info/docs/README.md +609 -0
  27. package/src/media/docs/README.md +488 -0
  28. package/src/meeting/docs/README.md +834 -0
  29. package/src/meeting-info/docs/README.md +352 -0
  30. package/src/meetings/docs/README.md +549 -0
  31. package/src/member/docs/README.md +347 -0
  32. package/src/members/docs/README.md +514 -0
  33. package/src/metrics/docs/README.md +287 -0
  34. package/src/multistream/docs/README.md +523 -0
  35. package/src/personal-meeting-room/docs/README.md +322 -0
  36. package/src/reachability/docs/README.md +548 -0
  37. package/src/reactions/docs/README.md +296 -0
  38. package/src/reconnection-manager/docs/README.md +485 -0
  39. package/src/recording-controller/docs/README.md +335 -0
  40. package/src/roap/docs/README.md +444 -0
  41. package/src/webinar/docs/README.md +425 -0
  42. package/.sdd/templates/.source.json +0 -30
  43. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +0 -111
  44. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +0 -321
  45. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +0 -59
  46. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +0 -49
  47. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +0 -42
  48. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +0 -120
  49. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +0 -206
  50. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +0 -90
  51. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +0 -68
  52. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +0 -111
  53. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +0 -57
  54. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +0 -69
  55. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +0 -96
  56. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +0 -84
  57. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +0 -82
  58. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +0 -94
  59. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +0 -64
  60. package/.sdd/templates/component-repo/template-map.json +0 -112
  61. package/ai-docs/ARCHITECTURE.md +0 -208
  62. package/ai-docs/CONTRACTS.md +0 -267
  63. package/ai-docs/DATA_MODEL.md +0 -64
  64. package/ai-docs/GETTING_STARTED.md +0 -73
  65. package/ai-docs/GLOSSARY.md +0 -56
  66. package/ai-docs/REVIEW_CHECKLIST.md +0 -45
  67. package/ai-docs/RULES.md +0 -79
  68. package/ai-docs/SECURITY.md +0 -74
  69. package/ai-docs/SERVICE_STATE.md +0 -59
  70. package/ai-docs/SPEC_INDEX.md +0 -85
  71. package/ai-docs/TEST_INDEX.md +0 -45
  72. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +0 -61
  73. package/ai-docs/patterns/defensive-error-propagation.md +0 -55
  74. package/ai-docs/patterns/event-scope-emission.md +0 -46
  75. package/ai-docs/patterns/source-to-test-path-mirroring.md +0 -45
  76. package/ai-docs/patterns/stateless-plugin-request-classes.md +0 -53
  77. package/ai-docs/patterns/typed-constants-and-enum-values.md +0 -47
  78. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +0 -223
  79. package/src/annotation/ai-docs/annotation-spec.md +0 -236
  80. package/src/breakouts/ai-docs/breakouts-spec.md +0 -324
  81. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +0 -243
  82. package/src/hashTree/ai-docs/hash-tree-spec.md +0 -267
  83. package/src/interceptors/ai-docs/interceptors-spec.md +0 -247
  84. package/src/interpretation/ai-docs/interpretation-spec.md +0 -256
  85. package/src/locus-info/ai-docs/locus-info-spec.md +0 -293
  86. package/src/media/ai-docs/media-spec.md +0 -267
  87. package/src/meeting/ai-docs/meeting-spec.md +0 -404
  88. package/src/meeting-info/ai-docs/meeting-info-spec.md +0 -261
  89. package/src/meetings/ai-docs/meetings-spec.md +0 -298
  90. package/src/member/ai-docs/member-spec.md +0 -196
  91. package/src/members/ai-docs/members-spec.md +0 -256
  92. package/src/metrics/ai-docs/metrics-spec.md +0 -185
  93. package/src/multistream/ai-docs/multistream-spec.md +0 -295
  94. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +0 -234
  95. package/src/reachability/ai-docs/reachability-spec.md +0 -261
  96. package/src/reactions/ai-docs/reactions-spec.md +0 -198
  97. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +0 -272
  98. package/src/recording-controller/ai-docs/recording-controller-spec.md +0 -223
  99. package/src/roap/ai-docs/roap-spec.md +0 -241
  100. package/src/webinar/ai-docs/webinar-spec.md +0 -243
@@ -1,261 +0,0 @@
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-10-08T00:00:00Z
8
- validation_status: pass-with-warnings
9
- -->
10
- # MEETING INFO — SPEC
11
-
12
- > Start here → root [`AGENTS.md`](../../../AGENTS.md) · router [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md) · system [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md). This is the canonical source-local spec for `src/meeting-info/`.
13
-
14
- ## Metadata
15
-
16
- | Field | Value |
17
- |---|---|
18
- | Module id | `meeting-info` |
19
- | Source path(s) | `src/meeting-info/` |
20
- | Parent spec | — |
21
- | Doc kind | Module spec |
22
- | Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
23
- | Generated from | `module-spec` @ SDLC template library `0.2.2` |
24
- | generated_by / approved_by / updated_at | codex / repository user / 2026-09-08T00:00:00Z |
25
- | Revalidated against | `b7b93b443e` (manual diff review of `f9a29f61..b7b93b443e`; not a generator/validator tool run) |
26
- | Validation status | pass-with-warnings |
27
-
28
- ## Evidence Rules
29
-
30
- Requirements cite current implementation and mirrored unit-test paths. Current code wins over retained prose when they conflict; commit and PR history are excluded by repository-owner decision. Missing test evidence is stated as a gap rather than inferred.
31
-
32
- ## Source Material Register
33
-
34
- | Source material | Scope | Decision | Detail location or disposition |
35
- |---|---|---|---|
36
- | No routed legacy module spec | overview / API / behavior / tests | none; generated from current source and mirrored tests |
37
- | Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
38
-
39
- ## Overview
40
-
41
- `src/meeting-info/` contains 6 direct source/reference file(s) and has 5 mirrored unit-test file(s). This spec separates its public operations, runtime data movement, component ownership, state applicability, and verification boundary.
42
-
43
- ## Purpose / Responsibility
44
-
45
- Resolves meeting destinations into normalized meeting metadata and maps service-specific errors into caller-actionable failures.
46
-
47
- ## Stack
48
-
49
- TypeScript/JavaScript in the Node 22.14 Yarn workspace; Webex core/plugin abstractions and Mocha/Sinon/`@webex/test-helper-chai` tests. Build target: `yarn workspace @webex/plugin-meetings build:src`.
50
-
51
- ## Folder / Package Structure
52
-
53
- ```text
54
- src/meeting-info/
55
- ├── collection.ts — module-owned collection
56
- ├── index.ts — module facade/controller or primary exports
57
- ├── meeting-info-v2.ts — meeting-info-v2 implementation responsibility
58
- ├── request.ts — HTTP request boundary
59
- ├── util.ts — normalization/helper functions
60
- ├── utilv2.ts — utilv2 implementation responsibility
61
- └── ai-docs/meeting-info-spec.md — canonical module specification
62
- ```
63
-
64
- ## Key Files (source of truth)
65
-
66
- | File | Holds |
67
- |---|---|
68
- | `src/meeting-info/collection.ts` | module-owned collection |
69
- | `src/meeting-info/index.ts` | module facade/controller or primary exports |
70
- | `src/meeting-info/meeting-info-v2.ts` | meeting-info-v2 implementation responsibility |
71
- | `src/meeting-info/request.ts` | HTTP request boundary |
72
- | `src/meeting-info/util.ts` | normalization/helper functions |
73
- | `src/meeting-info/utilv2.ts` | utilv2 implementation responsibility |
74
- | `test/unit/spec/meeting-info/index.js` and 4 sibling test file(s) | mirrored characterization/unit coverage |
75
-
76
- ## Public Surface
77
-
78
- | Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
79
- |---|---|---|---|---|---|---|
80
- | `meeting-info.1` | SDK collection/model | `MeetingInfoCollection.get()` and `MeetingInfo.getMeetingInfo()`, `setMeetingInfo()`, `fetchMeetingInfo()` | Cache destination-keyed meeting information and refresh it through the selected request path. | Preserve collection identity, cache updates, and request rejection. | `src/meeting-info/collection.ts`, `src/meeting-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
81
- | `meeting-info.2` | SDK / V2 remote | `MeetingInfoV2.fetchInfoOptions()` and `fetchMeetingInfo()` | Build V2 lookup options and normalize supported destination responses into meeting information. | Preserve password/captcha/registration inputs and typed error mapping. | `src/meeting-info/meeting-info-v2.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
82
- | `meeting-info.3` | SDK / V2 remote | `createAdhocSpaceMeetingOrEnableStaticMeetingLink()`, `createAdhocSpaceMeeting()`, and `fetchStaticMeetingLink()` | Select existing static-link lookup versus ad-hoc creation/enablement for a space destination. | Preserve branch conditions and direct service outcomes. | `src/meeting-info/meeting-info-v2.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
83
- | `meeting-info.4` | SDK / V2 remote | `enableStaticMeetingLink()` and `disableStaticMeetingLink()` | Mutate the static meeting-link state for the supplied space/context. | Preserve request route/body and typed V2 error behavior. | `src/meeting-info/meeting-info-v2.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
84
- | `meeting-info.5` | request adapter | `MeetingInfoRequest.fetchMeetingInfo()` | Perform the legacy meeting-info request selected by the facade. | Preserve HTTP request parameters and direct response/rejection propagation. | `src/meeting-info/request.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
85
- | `meeting-info.6` | package-exported utilities | `MeetingInfoUtil.getParsedUrl()`, `isMeetingLink()`, `isConversationUrl()`, `isSipUri()`, `isPhoneNumber()`, `getHydraId()`, `getSipUriFromHydraPersonId()`, `getDestinationType()`, `getRequestBody()`, `getWebexSite()`, and `getDirectMeetingInfoURI()` | Expose the destination classification and V2 request-body helpers exported as `MeetingInfoUtil` by `src/index.ts`. | Preserve classification precedence, URL parsing, and generated V2 body/URI shapes; methods that exist only on legacy `util.ts` are not package exports. | `src/index.ts`, `src/meeting-info/utilv2.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
86
- | `meeting-info.7` | exported errors | `MeetingInfoV2PasswordError`, `MeetingInfoV2AdhocMeetingError`, `MeetingInfoV2PolicyError`, `MeetingInfoV2CaptchaError`, `MeetingInfoV2JoinWebinarError`, `MeetingInfoV2JoinForbiddenError`, `MeetingInfoV2StaticLinkDoesNotExistError`, `MeetingInfoV2MeetingIsInProgressError`, and `MeetingInfoV2StaticMeetingLinkAlreadyExists` | Give callers typed outcomes for service-specific meeting-info failures. | Preserve class identity and mapping from current service status/body conditions. | `src/meeting-info/meeting-info-v2.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
87
- | `meeting-info.8` | V2 error mapping | `MeetingInfoV2.handlePolicyError()`, `handleJoinWebinarError()`, and `handleForbiddenError()` | Convert service policy/webinar/forbidden responses into the exported typed error classes. | Preserve response-condition precedence and error identity. | `src/meeting-info/meeting-info-v2.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
88
-
89
- ### Emitted events
90
-
91
- 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.
92
-
93
- | Event literal | Constant / expression | Emission evidence |
94
- |---|---|---|
95
- | `meeting:meetingInfoAvailable` | `EVENT_TRIGGERS.MEETING_INFO_AVAILABLE` | `src/meeting/index.ts` |
96
- | `meeting:meetingInfoUpdated` | `EVENT_TRIGGERS.MEETING_INFO_UPDATED` | `src/meeting/index.ts` |
97
-
98
- Compatibility notes:
99
- - Prefer additive options and payload fields. Preserve method/event names, rejection semantics, and cleanup timing; route public changes through `src/index.ts` or the documented owning object.
100
-
101
- ## Requires (dependencies)
102
-
103
- Webex request/service access plus meeting, conversation, people, and webinar service responses.
104
-
105
- ## Requirements
106
-
107
- | ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
108
- |---|---|---|---|---|---|---|
109
- | `MEETING-INFO-R-001` | fetch meeting information for a destination/type. | Resolves meeting destinations into normalized meeting metadata and maps service-specific errors into caller-actionable failures. | `src/meeting-info/index.ts` | `test/unit/spec/meeting-info/index.js` | none | PRESENT |
110
- | `MEETING-INFO-R-002` | resolve, enable, and disable static meeting links. | Static-link lookup and mutation select different V2 endpoints and typed error outcomes. | `src/meeting-info/index.ts`, `src/meeting-info/meeting-info-v2.ts` | `test/unit/spec/meeting-info/index.js` | static-link conflict and in-progress error mappings need a complete V2 matrix | PRESENT |
111
- | `MEETING-INFO-R-003` | `MeetingInfoRequest.fetchMeetingInfo()` throws `ParameterError` synchronously when its options lack a type or destination. When the legacy facade invokes that helper inside its promise chain, the throw becomes the facade's returned rejection; V2 password, captcha, permission, and request failures also remain typed caller-visible promise outcomes. Request helpers own no persistent listeners or timers. | Callers must distinguish the direct request helper's synchronous validation boundary from facade/V2 promise failures while still retaining actionable typed errors. | `src/meeting-info/request.ts`, `src/meeting-info/index.ts`, `src/meeting-info/meeting-info-v2.ts` | `test/unit/spec/meeting-info/request.js`, `test/unit/spec/meeting-info/index.js`, `test/unit/spec/meeting-info/meetinginfov2.js` | none | PRESENT |
112
- | `MEETING-INFO-R-004` | Emit CA request/response events only when both `meetingId` and `sendCAevents` are supplied, and emit the operation-specific behavioral success/failure metric on V2 outcomes. `MeetingInfoV2.fetchMeetingInfo()` additionally accepts `options.correlationId` and sets the request header `{correlationId}` only when `meetingId`, `sendCAevents`, and `correlationId` are all present; any missing one leaves `requestOptions.headers` unset. `Meeting` supplies `this.correlationId` on that option. The V2 success `client.meetinginfo.response` sets `identifiers.meetingLookupUrl` from the response URL and passes `globalMeetingId`, `webexConferenceIdStr`, and `locusCluster` (from `response.body.locusClusterUrl`) as options, which the metrics plugin applies to the event identifiers when the meeting's own meeting info does not yet provide them. | Conditional correlation avoids unscoped CA telemetry, while stable behavioral metrics preserve operation-level observability for lookup and link-management failures. Propagating the correlation id as a header lets the service join its own trace to the client's CA events, and gating it on the same three inputs keeps the header from leaking on requests that emit no CA events. Meeting info is not on the `Meeting` yet when the response event fires, so the identifiers come from the response itself. | `src/meeting-info/index.ts`, `src/meeting-info/meeting-info-v2.ts`, `src/metrics/constants.ts` | `test/unit/spec/meeting-info/index.js`, `test/unit/spec/meeting-info/meetinginfov2.js` | none | PRESENT |
113
-
114
- ## Design Overview
115
-
116
- `index.ts` provides the legacy meeting-info facade, `request.ts` performs that facade's HTTP calls, and `collection.ts` caches its meeting-info objects. `meeting-info-v2.ts` implements the V2 pipeline and calls `webex.request` directly after using `utilv2.ts` for destination/response handling.
117
-
118
- ## Data Flow
119
-
120
- ```mermaid
121
- flowchart LR
122
- Caller[Meetings / consumer] --> Legacy[index.ts legacy facade]
123
- Caller --> V2[meeting-info-v2.ts]
124
- Legacy --> Normalize1[util.ts]
125
- Legacy --> Request[request.ts]
126
- V2 --> Normalize2[utilv2.ts]
127
- Request --> Service[meeting info service URL]
128
- V2 --> Service
129
- Service --> Request
130
- Request --> Legacy
131
- Legacy --> Collection[collection.ts cache]
132
- Collection --> Caller
133
- Service --> V2
134
- V2 --> Caller
135
- ```
136
-
137
- ## Sequence Diagram(s)
138
-
139
- Sequence coverage:
140
-
141
- | Operation group | Diagram | Failure coverage |
142
- |---|---|---|
143
- | UC-1…UC-5 — meeting-info lookup and static-link operation groups | Meeting-info lookup and static-link primary sequence | destination validation plus typed password/captcha/policy/static-link request failures |
144
- | UC-1…UC-5 — meeting-info lookup and static-link alternate/failure paths | Meeting-info lookup and static-link alternate/failure sequence | unsupported destination, password/captcha challenge, permission error, or meeting-info service rejection |
145
-
146
- ### Meeting-info lookup and static-link primary sequence
147
-
148
- ```mermaid
149
- sequenceDiagram
150
- participant C as Meetings / consumer
151
- participant V as MeetingInfoV2
152
- participant U as utilv2.ts
153
- participant S as Webex request / meeting-info service
154
- C->>V: fetchMeetingInfo(destination, type, password, captcha, ...)
155
- V->>U: classify and normalize destination
156
- V->>S: webex.request with selected V2 endpoint/options
157
- S-->>V: response or typed rejection
158
- V->>U: normalize response
159
- V-->>C: meeting info result
160
- ```
161
-
162
- ### Meeting-info lookup and static-link alternate/failure sequence
163
-
164
- ```mermaid
165
- sequenceDiagram
166
- participant C as Consumer
167
- participant M as MeetingInfo
168
- participant V as MeetingInfoV2 / request helper
169
- participant S as Meeting-info service
170
- C->>M: fetch destination or static-link operation
171
- M->>M: validate destination/type and choose request path
172
- M->>V: build normalized service request
173
- V->>S: HTTP request
174
- alt accepted response
175
- S-->>V: meeting metadata
176
- V-->>M: normalized body
177
- M-->>C: resolved meeting information
178
- else service or typed challenge error
179
- S--xV: rejection
180
- V--xM: typed failure through the selected helper
181
- M--xC: facade promise rejection
182
- end
183
- ```
184
-
185
- ## Class / Component Relationships
186
-
187
- ```mermaid
188
- classDiagram
189
- class Caller
190
- class LegacyFacade
191
- class V2Facade
192
- class LegacyNormalize
193
- class V2Normalize
194
- class Request
195
- class Service
196
- class Collection
197
- Caller --> LegacyFacade
198
- Caller --> V2Facade
199
- LegacyFacade --> LegacyNormalize
200
- V2Facade --> V2Normalize
201
- LegacyFacade --> Request
202
- V2Facade --> Service
203
- Request --> Service
204
- Request --> LegacyFacade
205
- LegacyFacade --> Collection
206
- Collection --> Caller
207
- V2Facade --> Caller
208
- ```
209
-
210
- The arrows identify ownership and delegation inside `src/meeting-info/`; files that only declare types or constants are not presented as transports.
211
-
212
- ## Use Cases
213
-
214
- - **UC-1:** Classify a SIP URI, meeting URL, conversation URL, phone number, or Hydra identity and construct the corresponding request inputs. Evidence: `src/meeting-info/util.ts`, `src/meeting-info/utilv2.ts`.
215
- - **UC-2:** Resolve a destination through the legacy `MeetingInfoRequest` or V2 path selected by Meetings configuration and cache the normalized result. Evidence: `src/meeting-info/index.ts`, `src/meeting-info/request.ts`, `src/meeting-info/meeting-info-v2.ts`.
216
- - **UC-3:** Supply password, captcha, registration, webinar, or policy context and preserve the matching typed V2 error outcome. Evidence: `src/meeting-info/meeting-info-v2.ts`.
217
- - **UC-4:** Fetch or create an ad-hoc/static meeting link for a space, including the branch that enables an existing static link. Evidence: `src/meeting-info/meeting-info-v2.ts`.
218
- - **UC-5:** Enable or disable a static meeting link and return the service result without substituting a legacy lookup. Evidence: `src/meeting-info/meeting-info-v2.ts`.
219
-
220
- ## State Model
221
-
222
- A small in-memory collection may retain resolved meeting-info objects; remote services remain authoritative.
223
-
224
- ## Business Rules & Invariants
225
-
226
- - Destination type and response error codes determine the correct request and typed error; invalid or forbidden meetings are never returned as successful metadata. Enforced by `src/meeting-info/index.ts` and supporting code under `src/meeting-info/`.
227
-
228
- ## Concurrency & Reactive Flow
229
-
230
- - Each meeting-info/static-link call owns only its returned request promise; the helpers retain no listeners or timers. The V2 request path fetches directly and therefore does not imply that the legacy collection cache was populated.
231
-
232
- ## Error Handling & Failure Modes
233
-
234
- | Condition | Signal | Caller recovery |
235
- |---|---|---|
236
- | Direct `MeetingInfoRequest.fetchMeetingInfo()` options omit type or destination | The helper throws `ParameterError` synchronously before issuing a request. The legacy `MeetingInfo.fetchMeetingInfo()` promise chain converts that helper throw into its returned rejection. | Validate direct-helper inputs synchronously; when using the facade, handle its returned rejection. |
237
- | Service requires password/captcha, denies permission, or rejects the request | The module maps or propagates the typed caller-visible rejection. | Satisfy the challenge/permission requirement or handle the request failure. |
238
- | Meeting-info response is accepted | The returned promise resolves with normalized meeting metadata; V2 lookup does not claim a legacy collection-cache update. | Use the resolved response as the current operation result. |
239
- | `meetingId`, `sendCAevents`, or `correlationId` is absent on a V2 lookup | No `correlationId` request header is set and the lookup proceeds normally; this is not an error. | Supply all three when the service trace must be correlated to client CA events. |
240
-
241
- ## Pitfalls
242
-
243
- - Meeting-info v1 and v2 paths have different response/error mappings; do not assume one parser covers both.
244
- - Public behavior may be reachable through a parent `Meeting`/`Meetings` object even when the source helper is not exported directly.
245
- - The current `MeetingInfoV2PolicyError` and `MeetingInfoV2CaptchaError` constructors assign `name` values associated with other typed errors. Preserve and test the current behavior until a separately reviewed implementation/spec change intentionally corrects it; callers should prefer the actual error instance and documented fields over `name` alone. Evidence: `src/meeting-info/meeting-info-v2.ts`, `test/unit/spec/meeting-info/meetinginfov2.js`.
246
-
247
- ## Test-Case Strategy (module)
248
-
249
- Use the current mirrored suites: `test/unit/spec/meeting-info/index.js`, `test/unit/spec/meeting-info/meetinginfov2.js`, `test/unit/spec/meeting-info/request.js`, `test/unit/spec/meeting-info/util.js`, `test/unit/spec/meeting-info/utilv2.js`. Characterize the meeting-info-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
250
-
251
- | Behavior / Requirement | Existing test evidence | Gap |
252
- |---|---|---|
253
- | `MEETING-INFO-R-001` | `test/unit/spec/meeting-info/index.js`, `test/unit/spec/meeting-info/meetinginfov2.js`, `test/unit/spec/meeting-info/request.js` | no mandatory coverage gap identified |
254
- | `MEETING-INFO-R-002` | `test/unit/spec/meeting-info/meetinginfov2.js` | no mandatory coverage gap identified |
255
- | `MEETING-INFO-R-003` | `test/unit/spec/meeting-info/meetinginfov2.js` | error-name inconsistencies are characterized as current behavior, not corrected here |
256
- | `MEETING-INFO-R-004` | `test/unit/spec/meeting-info/index.js`, `test/unit/spec/meeting-info/meetinginfov2.js` | the `correlationId` header is covered by the table-driven cases asserting it is sent only for the all-three-present combination |
257
-
258
- ## Traceability
259
-
260
- - Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
261
- - Coverage state and contracts baseline: `../../../.sdd/manifest.json`
@@ -1,298 +0,0 @@
1
- <!-- sdd-generated-metadata
2
- doc_kind: module-spec
3
- generated_from: module-spec@0.2.2
4
- generator_plugin: repo-annotation@1.0.5+codex.20260818094939
5
- generated_by: codex
6
- approved_by: repository user
7
- updated_at: 2026-09-08T00:00:00Z
8
- validation_status: pass-with-warnings
9
- -->
10
- # MEETINGS — 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/meetings/`.
13
-
14
- ## Metadata
15
-
16
- | Field | Value |
17
- |---|---|
18
- | Module id | `meetings` |
19
- | Source path(s) | `src/meetings/` |
20
- | Parent spec | — |
21
- | Doc kind | Module spec |
22
- | Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
23
- | Generated from | `module-spec` @ SDLC template library `0.2.2` |
24
- | generated_by / approved_by / updated_at | codex / repository user / 2026-09-08T00:00:00Z |
25
- | Revalidated against | `b7b93b443e` (manual diff review of `f9a29f61..b7b93b443e`; not a generator/validator tool run) |
26
- | Validation status | pass-with-warnings |
27
-
28
- ## Evidence Rules
29
-
30
- Requirements cite current implementation and mirrored unit-test paths. Current code wins over retained prose when they conflict; commit and PR history are excluded by repository-owner decision. Missing test evidence is stated as a gap rather than inferred.
31
-
32
- ## Source Material Register
33
-
34
- | Source material | Scope | Decision | Detail location or disposition |
35
- |---|---|---|---|
36
- | Retained package consumer documentation | overview / API / behavior / tests | used and verified; creation, registration, collection, PMR, and event behavior moved into requirements/use cases; examples remain in the retained guide |
37
- | Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
38
-
39
- ## Overview
40
-
41
- `src/meetings/` contains 5 direct source/reference file(s) and has 4 mirrored unit-test file(s). This spec separates its public operations, runtime data movement, component ownership, state applicability, and verification boundary.
42
-
43
- ## Purpose / Responsibility
44
-
45
- Owns the registered plugin lifecycle, meeting discovery, registration, realtime routing, and the top-level meeting collection.
46
-
47
- ## Stack
48
-
49
- TypeScript/JavaScript in the Node 22.14 Yarn workspace; Webex core/plugin abstractions and Mocha/Sinon/`@webex/test-helper-chai` tests. Build target: `yarn workspace @webex/plugin-meetings build:src`.
50
-
51
- ## Folder / Package Structure
52
-
53
- ```text
54
- src/meetings/
55
- ├── collection.ts — module-owned collection
56
- ├── index.ts — module facade/controller or primary exports
57
- ├── meetings.types.ts — module type declarations
58
- ├── request.ts — HTTP request boundary
59
- ├── util.ts — normalization/helper functions
60
- └── ai-docs/meetings-spec.md — canonical module specification
61
- ```
62
-
63
- ## Key Files (source of truth)
64
-
65
- | File | Holds |
66
- |---|---|
67
- | `src/meetings/collection.ts` | module-owned collection |
68
- | `src/meetings/index.ts` | module facade/controller or primary exports |
69
- | `src/meetings/meetings.types.ts` | module type declarations |
70
- | `src/meetings/request.ts` | HTTP request boundary |
71
- | `src/meetings/util.ts` | normalization/helper functions |
72
- | `test/unit/spec/meetings/collection.js` and 3 sibling test file(s) | mirrored characterization/unit coverage |
73
-
74
- ## Public Surface
75
-
76
- | Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
77
- |---|---|---|---|---|---|---|
78
- | `meetings.1` | SDK collection | `MeetingCollection.set()`, `getByKey()`, `getActiveBreakoutLocus()`, and `getActiveWebrtcMeeting()` | Store Meeting models and resolve current normal/breakout active meetings. | Preserve collection key aliases and active-meeting selection. | `src/meetings/collection.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
79
- | `meetings.2` | SDK / registration | `executeRegistrationStep()`, `register()`, and `unregister()` | Coordinate device registration and Meetings-owned Mercury/Locus/ROAP listener lifecycle. | Preserve tracked step results and the exact listeners each lifecycle method adds/removes. | `src/meetings/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
80
- | `meetings.3` | SDK / diagnostics/media effects | `uploadLogs()`, `getReachability()`, `startReachability()`, `getGeoHint()`, `createNoiseReductionEffect()`, and `createVirtualBackgroundEffect()` | Expose logs, reachability/geo diagnostics, and configured media-effect creation. | `startReachability()` returns the gather promise directly. Only the separate registration callback absorbs its rejection. Preserve that boundary, other request outcomes, and effect construction inputs. | `src/meetings/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
81
- | `meetings.4` | SDK / preferences | `fetchUserPreferredWebexSite()`, `getPersonalMeetingRoom()`, `fetchSitePreferencesMeViaSite()`, and `getBasicMeetingInformation()` | Fetch account/site preferences, PMR, and lightweight meeting information. | Preserve parallel independent request behavior; do not claim a strict ordering across site/geo/reachability/H264 setup. | `src/meetings/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
82
- | `meetings.5` | SDK / static links | `fetchStaticMeetingLink()`, `enableStaticMeetingLink()`, and `disableStaticMeetingLink()` | Delegate static meeting-link lookup and mutation to meeting-info V2. | Preserve typed meeting-info errors and direct service outcomes. | `src/meetings/index.ts`, `src/meeting-info/meeting-info-v2.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
83
- | `meetings.6` | SDK / meeting lookup | `create()`, `getMeetingByType()`, `getAllMeetings()`, and `getActiveWebrtcMeeting()` | Create/find/list Meeting models from destination information and collection keys. | Preserve model reuse/collection identity and lookup-type behavior. | `src/meetings/index.ts`, `src/meetings/collection.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
84
- | `meetings.7` | SDK / synchronization | `syncMeetings()`, `sortLocusArrayToUpdate()`, `checkHandleBreakoutLocus()`, and `getCorrespondingMeetingByLocus()` | Reconcile active Loci into the collection, including breakout/main relationships. | All four methods are defined on `Meetings` in `index.ts`; Online Mercury handling invokes this sync, while `register()` itself does not. | `src/meetings/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
85
- | `meetings.8` | request/types | `MeetingRequest.getActiveMeetings()`, `fetchGeoHint()`, `getMeetingPreferences()`, `fetchSitePreferencesMeViaSite()`, and `determineRedirections()` plus `LocusEvent`, `BasicMeetingInformation`, `INoiseReductionEffect`, `IVirtualBackgroundEffect`, `MEETING_KEY`, `MeetingRegistrationStatus`, `SitePreferenceSelectOption`, `FetchSitePreferencesMeViaSiteOptions`, `DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS`, and `SitePreferencesResponse` | Provide direct service requests and the exact collection/configuration vocabulary consumed by Meetings. | Preserve request result shapes, enum/raw option values, and default site-selection options. | `src/meetings/request.ts`, `src/meetings/meetings.types.ts`, `src/meetings/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
86
- | `meetings.9` | SDK / diagnostics | `getLogger()` | Return the logger used by Meetings and child meeting operations. | Preserve logger identity and existing call sites. | `src/meetings/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
87
-
88
- ### Emitted events
89
-
90
- 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.
91
-
92
- | Event literal | Constant / expression | Emission evidence |
93
- |---|---|---|
94
- | `meeting:added` | `EVENT_TRIGGERS.MEETING_ADDED` | `src/meetings/index.ts` |
95
- | `meeting:logUpload:failure` | `EVENT_TRIGGERS.MEETING_LOG_UPLOAD_FAILURE` | `src/meetings/index.ts` |
96
- | `meeting:logUpload:success` | `EVENT_TRIGGERS.MEETING_LOG_UPLOAD_SUCCESS` | `src/meetings/index.ts` |
97
- | `meeting:removed` | `EVENT_TRIGGERS.MEETING_REMOVED` | `src/meetings/index.ts` |
98
- | `meetings:ready` | `EVENT_TRIGGERS.MEETINGS_READY` | `src/meetings/index.ts` |
99
- | `meetings:registered` | `EVENT_TRIGGERS.MEETINGS_REGISTERED` | `src/meetings/index.ts` |
100
- | `meetings:unregistered` | `EVENT_TRIGGERS.MEETINGS_UNREGISTERED` | `src/meetings/index.ts` |
101
-
102
- Compatibility notes:
103
- - 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.
104
-
105
- ## Requires (dependencies)
106
-
107
- Webex core host, device and Mercury plugins, meeting-info services, Meeting construction, reachability, and metrics.
108
-
109
- ## Requirements
110
-
111
- | ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
112
- |---|---|---|---|---|---|---|
113
- | `MEETINGS-R-001` | create/get meeting and collection lookup. | Owns the registered plugin lifecycle, meeting discovery, registration, realtime routing, and the top-level meeting collection. | `src/meetings/index.ts` | `test/unit/spec/meetings/index.js` | none | PRESENT |
114
- | `MEETINGS-R-002` | register/unregister device and Mercury lifecycle. | Registration owns device/listener readiness; active-meeting synchronization is a separate online-event flow. | `src/meetings/index.ts`, `src/meetings/request.ts` | `test/unit/spec/meetings/index.js` | unregister does not remove the OFFLINE listener; retain as a targeted teardown gap | PRESENT |
115
- | `MEETINGS-R-003` | `executeRegistrationStep()` marks a step `true` whenever its supplied promise resolves and rethrows a rejection without resetting other flags. `fetchUserPreferredWebexSite()` catches its own failures and resolves, while the `startReachability` registration callback catches that gather rejection and resolves; those two steps are therefore marked successful even when their underlying work failed. `unregister()` removes Locus, ROAP, and `ONLINE` Mercury listeners plus device state, but leaves the `OFFLINE` listener installed. | Registration status records wrapper settlement, not necessarily underlying site/reachability success; other rejected steps preserve partial progress until the next `register()` reset, and the residual `OFFLINE` listener must stay visible as a teardown gap. | `src/meetings/index.ts` | `test/unit/spec/meetings/index.js` | characterize absorbed site/reachability failures, partial status after a non-absorbed rejection, and the surviving `OFFLINE` callback | PRESENT |
116
- | `MEETINGS-R-004` | `register()` starts site, geo, reachability, device-registration, and H.264 work together through `Promise.all`; Mercury connect is chained after device registration. Each wrapper-resolved step updates its own status, including the failure-absorbing site and reachability wrappers. `syncMeetings()` runs later from the Mercury `ONLINE` handler installed by `listenForEvents()`. | Registration readiness and active-meeting synchronization are distinct phases, and preserving wrapper-level settlement and actual concurrency prevents callers from depending on a nonexistent success definition or serial order. | `src/meetings/index.ts`, `src/meetings/meetings.types.ts` | `test/unit/spec/meetings/index.js` | none | PRESENT |
117
- | `MEETINGS-R-007` | `emitWasmRuntimePerformance(correlationId)` is a `once()`-wrapped private probe that runs `WasmRuntimeProbe.check()` and reports `WASM_RUNTIME_PERFORMANCE` (`js_sdk_wasm_runtime_performance`) with `status`, `capability`, `reason`, the destructured measurements `divRatio`, `sqrtRatio`, `addNsPerOp`, `addMedianMs`, `divMedianMs`, `sqrtMedianMs`, and `correlation_id`. Each measurement defaults to `null` when `result.measurements` is absent or omits it. Both a probe rejection and a metric-submission rejection are caught and logged only. | The probe is diagnostic: it exists to find browsers where real-time WASM effects run poorly, so it must never be able to fail meeting creation. Explicit `null` defaults keep the metric schema fixed-width so the fields stay comparable across browsers that report partial measurements, and `once()` keeps one sample per plugin instance rather than one per meeting. | `src/meetings/index.ts`, `src/metrics/constants.ts` | `test/unit/spec/meetings/index.js` | none | PRESENT |
118
- | `MEETINGS-R-008` | Meetings owns one shared `WasmLoader`; after successful registration it starts E2EE WASM preloading when `meetings.enableE2ee` is true and WebAssembly is supported. Preload is fire-and-forget, so a preload rejection is logged and does not change registration success. | Keep module initialization off the meeting join path while preserving registration behavior when the optional asset is unavailable. | `src/meetings/index.ts`, `src/common/wasm-loader.ts`, `src/e2ee/E2eeManager.ts` | `test/unit/spec/meetings/index.js`, `test/unit/spec/common/wasm-loader.ts`, `test/unit/spec/e2ee/E2eeManager.ts` | Actual E2EE assets are supplied separately. | PRESENT |
119
- | `MEETINGS-R-005` | Mercury/Locus events resolve an existing meeting by supported keys before creating or routing a new object. | Stable meeting identity prevents duplicate Meeting objects and misrouted realtime updates. | `src/meetings/index.ts`, `src/meetings/collection.ts` | `test/unit/spec/meetings/index.js`, `test/unit/spec/meetings/collection.js` | none | PRESENT |
120
- | `MEETINGS-R-006` | Reachability, geo hints, site preferences, PMR, and active-meeting queries delegate to their current request/controller boundaries. | Central plugin access must preserve host credentials, service discovery, and established response/error behavior. | `src/meetings/index.ts`, `src/meetings/request.ts` | `test/unit/spec/meetings/request.js` | none | PRESENT |
121
-
122
- ## Design Overview
123
-
124
- `Meetings` is the registered plugin facade and collection owner. `register()` starts site, geo, reachability, device-registration, and H.264 steps concurrently in `Promise.all`; Mercury connection follows successful device registration, and listeners are installed only after the aggregate succeeds. Site-preference fetching absorbs its own failures, and the registration callback absorbs a reachability rejection, so both wrappers can resolve and be marked successful without completing their underlying work. Synchronization is a separate `syncMeetings()` call triggered by the Mercury `ONLINE` handler.
125
-
126
- ## Data Flow
127
-
128
- ```mermaid
129
- flowchart LR
130
- Consumer[webex.meetings consumer] --> Plugin[index.ts]
131
- Plugin --> Request[request.ts]
132
- Plugin --> Info[src/meeting-info]
133
- Plugin --> Collection[collection.ts]
134
- Plugin --> Device[Webex device registration]
135
- Plugin --> Mercury[Mercury connection and events]
136
- Mercury --> Sync[syncMeetings]
137
- Sync --> Request
138
- Collection --> Meeting[src/meeting]
139
- ```
140
-
141
- ## Sequence Diagram(s)
142
-
143
- Sequence coverage:
144
-
145
- | Operation group | Diagram | Failure coverage |
146
- |---|---|---|
147
- | UC-1…UC-5 — Meetings registration and synchronization operation groups | Meetings registration and synchronization primary sequence | registration-step failure, independent setup requests, online sync rejection, and listener teardown |
148
- | UC-1…UC-5 — Meetings registration and synchronization alternate/failure paths | Meetings registration and synchronization alternate/failure sequence | registration-step rejection, Mercury/device failure, unsupported destination, site-preference parameter error, or meeting-sync request failure |
149
-
150
- ### Meetings registration and synchronization primary sequence
151
-
152
- ```mermaid
153
- sequenceDiagram
154
- participant C as Consumer
155
- participant M as Meetings
156
- participant D as Device
157
- participant Q as Mercury
158
- participant R as MeetingRequest
159
- C->>M: register(options)
160
- par independent registration work
161
- M->>M: site, geo, reachability, and H.264 steps
162
- and device path
163
- M->>D: register device
164
- D-->>M: device registration succeeds
165
- M->>Q: connect Mercury
166
- end
167
- M->>M: install listeners after Promise.all succeeds
168
- M-->>C: registration result
169
- Q-->>M: ONLINE
170
- M->>M: syncMeetings({keepOnlyLocusMeetings:false})
171
- M->>R: getActiveMeetings()
172
- R-->>M: active Loci
173
- M->>M: reconcile MeetingCollection
174
- ```
175
-
176
- ### Meetings registration and synchronization alternate/failure sequence
177
-
178
- ```mermaid
179
- sequenceDiagram
180
- participant C as SDK consumer
181
- participant M as Meetings
182
- participant W as Webex registration dependencies
183
- C->>M: register or unregister
184
- alt registration
185
- M->>W: run the configured steps; site/geo/reachability/H.264 setup may run in parallel
186
- W-->>M: step result, absorbed site/reachability failure, or propagated rejection
187
- M-->>C: registration result; absorbed steps are marked true and completed flags remain set on propagated rejection
188
- else unregistration
189
- M->>W: remove Mercury/device registration state
190
- W-->>M: cleanup result
191
- M-->>C: unregistration result
192
- end
193
- ```
194
-
195
- ## Class / Component Relationships
196
-
197
- ```mermaid
198
- classDiagram
199
- class Consumer
200
- class Plugin
201
- class Request
202
- class Info
203
- class Collection
204
- class Device
205
- class Mercury
206
- class Sync
207
- class Meeting
208
- Consumer --> Plugin
209
- Plugin --> Request
210
- Plugin --> Info
211
- Plugin --> Collection
212
- Plugin --> Device
213
- Plugin --> Mercury
214
- Mercury --> Sync
215
- Sync --> Request
216
- Collection --> Meeting
217
- ```
218
-
219
- The arrows identify ownership and delegation inside `src/meetings/`; files that only declare types or constants are not presented as transports.
220
-
221
- ## Use Cases
222
-
223
- - **UC-1:** Register device and Meetings-owned listeners through tracked registration steps without treating active-meeting synchronization as part of `register()` itself. Evidence: `src/meetings/index.ts`.
224
- - **UC-2:** On Mercury `ONLINE`, `Meetings.syncMeetings()` fetches active Loci through `MeetingRequest.getActiveMeetings()` and reconciles corresponding main/breakout Meeting models into the collection. Evidence: `src/meetings/index.ts`, `src/meetings/request.ts`.
225
- - **UC-3:** Create or retrieve a Meeting by destination/type while reusing collection identity when a matching model exists. Evidence: `src/meetings/index.ts`, `src/meetings/collection.ts`.
226
- - **UC-4:** Start/read reachability, fetch geo/site preferences, PMR, or basic meeting information through their independent request paths. Evidence: `src/meetings/index.ts`, `src/meetings/request.ts`.
227
- - **UC-5:** Fetch, enable, or disable a static meeting link through the meeting-info V2 facade and preserve its typed outcomes. Evidence: `src/meetings/index.ts`, `src/meeting-info/meeting-info-v2.ts`.
228
-
229
- ## State Model
230
-
231
- Registration progress, meeting collection entries, sync state, and listener handles are held in memory for the plugin lifetime.
232
-
233
- ## Business Rules & Invariants
234
-
235
- - A realtime event is routed to its corresponding meeting before a new meeting is created; unregister removes Locus/ROAP/`ONLINE` listeners and registration state but currently leaves the `OFFLINE` listener installed. Enforced by `src/meetings/index.ts`.
236
-
237
- ## Concurrency & Reactive Flow
238
-
239
- - Registration steps run through one `Promise.all` aggregate, with Mercury connection chained behind device registration. `executeRegistrationStep()` sets a flag after its callback resolves. Site-preference fetching and the registration reachability callback absorb their own failures and therefore still set their flags; a rejection from another step propagates without clearing flags already set. Unregistration removes the Mercury/device registration owned by the plugin; individual meeting synchronization requests remain separate returned promises rather than silently changing registration success.
240
-
241
- ## State Machine
242
-
243
- ```mermaid
244
- stateDiagram-v2
245
- [*] --> unregistered
246
- unregistered --> registering: register()
247
- registering --> registered: required steps succeed
248
- registering --> unregistered: aggregate rejects; completed step flags remain until next register()
249
- registered --> syncing: Mercury ONLINE
250
- syncing --> registered: collection reconciled or sync settles
251
- registered --> unregistered: unregister()
252
- ```
253
-
254
- These labels summarize the concrete `registered`, registration-promise, registration-step, and Mercury-`ONLINE` transitions in `src/meetings/index.ts`.
255
-
256
- ## Error Handling & Failure Modes
257
-
258
- | Condition | Signal | Caller recovery |
259
- |---|---|---|
260
- | Site-preference fetching or the registration reachability call fails | The inner catch logs/absorbs the failure, `executeRegistrationStep()` observes resolution, and `fetchWebexSite` or `startReachability` is marked `true`; that failure alone does not reject registration. | Treat those flags as wrapper-completion indicators and inspect diagnostics/current data before assuming the underlying work succeeded. |
261
- | Another registration step or Mercury/device registration rejects | The returned registration promise rejects. The failing step is not marked successful, and flags already set by concurrently completed steps are not reset until the next `register()` initializes registration status. | Correct the failing dependency and treat the next registration call as the status reset boundary. |
262
- | `fetchSitePreferencesMeViaSite()` has neither `options.siteUrl` nor `preferredWebexSite` | `MeetingRequest.fetchSitePreferencesMeViaSite()` throws `ParameterError` synchronously before returning a promise; the non-`async` facade returns that direct call, so `.catch()` on a nonexistent result cannot observe the error. | Supply either site URL and wrap the call boundary in synchronous error handling when inputs may be absent. |
263
- | Another destination or preference request rejects | Its returned request promise preserves the implemented rejection. | Supply supported input or handle the returned rejection for that specific operation. |
264
- | Meeting synchronization request rejects | That sync request rejects independently of plugin registration state. | Handle or repeat synchronization under the owning meeting workflow. |
265
- | The WASM runtime probe or its metric submission rejects | The rejection is caught and logged as an error; no event is emitted, no metric is retried, and meeting creation is unaffected. | Read the logged diagnostic; do not treat a missing `js_sdk_wasm_runtime_performance` metric as a meeting-creation failure. |
266
-
267
- ## Pitfalls
268
-
269
- - Registration is multi-step. Treating device registration, Mercury setup, and active-meeting sync as one opaque call loses the failing stage and can leak listeners.
270
- - Public behavior may be reachable through a parent `Meeting`/`Meetings` object even when the source helper is not exported directly.
271
-
272
- ## Host Integration & Theming
273
-
274
- The Webex SDK host supplies initialized request/device/Mercury/media capabilities and exposes this behavior through `webex.meetings` or its Meeting objects. The module renders no UI and has no theme contract.
275
-
276
- ## Key Design Trade-off
277
-
278
- - Central coordination favors consistent event routing and one meeting collection at the cost of a large orchestrator; feature behavior stays in child modules.
279
-
280
- ## Test-Case Strategy (module)
281
-
282
- Use the current mirrored suites: `test/unit/spec/meetings/collection.js`, `test/unit/spec/meetings/index.js`, `test/unit/spec/meetings/request.js`, `test/unit/spec/meetings/utils.js`. Characterize the meetings-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
283
-
284
- | Behavior / Requirement | Existing test evidence | Gap |
285
- |---|---|---|
286
- | `MEETINGS-R-001` | `test/unit/spec/meetings/index.js` | cover registration, online sync, create/lookup, preferences, reachability, and static-link groups |
287
- | `MEETINGS-R-002` | `test/unit/spec/meetings/index.js` | unregister does not remove the OFFLINE listener; retain as a targeted teardown gap |
288
- | `MEETINGS-R-003` | `test/unit/spec/meetings/index.js` | assert absorbed site/reachability failures mark their wrapper steps true, plus exact listener removal and the surviving `OFFLINE` listener |
289
- | `MEETINGS-R-004` | `test/unit/spec/meetings/index.js` | verify `Promise.all` concurrency, device-before-Mercury ordering, wrapper-settlement flags, and non-absorbed rejection without a failure reset |
290
- | `MEETINGS-R-005` | `test/unit/spec/meetings/index.js`, `test/unit/spec/meetings/collection.js` | verify alternate-key collision cases |
291
- | `MEETINGS-R-006` | `test/unit/spec/meetings/request.js` | none |
292
- | `MEETINGS-R-007` | `test/unit/spec/meetings/index.js` | covered for the full-measurements payload, the `null` defaults when measurements are absent, and the swallowed probe rejection |
293
- | `MEETINGS-R-008` | `test/unit/spec/meetings/index.js`, `test/unit/spec/common/wasm-loader.ts`, `test/unit/spec/e2ee/E2eeManager.ts` | cover configured asset URL, config/capability gating, module caching/retry, and registration resilience |
294
-
295
- ## Traceability
296
-
297
- - Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
298
- - Coverage state and contracts baseline: `../../../.sdd/manifest.json`