@webex/plugin-meetings 3.12.0 → 3.13.0
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 +135 -0
- package/ai-docs/ARCHITECTURE.md +208 -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/assets/README.md +28 -0
- package/assets/e2ee-0.0.1.js +2 -0
- package/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +55 -19
- package/dist/annotation/index.js.map +1 -1
- package/dist/assets/e2ee-0.0.1.js +2 -0
- package/dist/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +128 -7
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +39 -11
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +13 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1245 -404
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +42 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +58 -16
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +24 -9
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +55 -12
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +914 -196
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/types.js +20 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +229 -166
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1931 -887
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +5 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +42 -3
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +12 -5
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +322 -129
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +30 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +11 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +62 -15
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +32 -4
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +127 -3
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/annotation/index.d.ts +19 -0
- package/dist/types/common/errors/webex-errors.d.ts +36 -2
- package/dist/types/config.d.ts +4 -2
- package/dist/types/constants.d.ts +15 -2
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +2 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +230 -18
- package/dist/types/hashTree/utils.d.ts +18 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +151 -15
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +28 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +66 -49
- package/dist/types/media/properties.d.ts +6 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +247 -13
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +12 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +40 -19
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +9 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +10 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
- package/dist/types/multistream/sendSlotManager.d.ts +28 -2
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +539 -245
- package/dist/webinar/index.js.map +1 -1
- package/package.json +26 -24
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/annotation/ai-docs/annotation-spec.md +236 -0
- package/src/annotation/index.ts +61 -29
- package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +145 -3
- package/src/common/errors/webex-errors.ts +56 -3
- package/src/config.ts +8 -3
- package/src/constants.ts +23 -4
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/constants.ts +16 -0
- package/src/hashTree/hashTreeParser.ts +1021 -214
- package/src/hashTree/utils.ts +36 -0
- package/src/index.ts +7 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +59 -12
- package/src/interceptors/locusRetry.ts +26 -5
- package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
- package/src/interpretation/index.ts +65 -10
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +907 -184
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +33 -1
- package/src/media/MediaConnectionAwaiter.ts +229 -196
- package/src/media/ai-docs/media-spec.md +267 -0
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +8 -3
- package/src/meeting/ai-docs/meeting-spec.md +404 -0
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +1237 -254
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +11 -0
- package/src/meeting/util.ts +53 -8
- package/src/meeting/voicea-meeting.ts +1 -1
- package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
- package/src/meeting-info/meeting-info-v2.ts +11 -4
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +224 -80
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/ai-docs/member-spec.md +196 -0
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/ai-docs/members-spec.md +256 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/ai-docs/metrics-spec.md +185 -0
- package/src/metrics/constants.ts +11 -0
- package/src/multistream/ai-docs/multistream-spec.md +295 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +119 -28
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/multistream/remoteMediaManager.ts +23 -1
- package/src/multistream/sendSlotManager.ts +112 -4
- 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/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/ai-docs/reactions-spec.md +198 -0
- package/src/reactions/reactions.type.ts +3 -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/recording-controller/index.ts +1 -2
- package/src/roap/ai-docs/roap-spec.md +241 -0
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/ai-docs/webinar-spec.md +243 -0
- package/src/webinar/index.ts +333 -73
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/annotation/index.ts +214 -182
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +336 -15
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +3126 -238
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +179 -1
- package/test/unit/spec/interceptors/locusRetry.ts +234 -5
- package/test/unit/spec/interpretation/index.ts +119 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +1880 -136
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +479 -17
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +26 -26
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +3697 -501
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +12 -0
- package/test/unit/spec/meeting/utils.js +206 -16
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
- package/test/unit/spec/meetings/index.js +586 -53
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +89 -0
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +165 -38
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +982 -328
|
@@ -0,0 +1,198 @@
|
|
|
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
|
+
# REACTIONS — 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/reactions/`.
|
|
13
|
+
|
|
14
|
+
## Metadata
|
|
15
|
+
|
|
16
|
+
| Field | Value |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Module id | `reactions` |
|
|
19
|
+
| Source path(s) | `src/reactions/` |
|
|
20
|
+
| Parent spec | — |
|
|
21
|
+
| Doc kind | Module spec |
|
|
22
|
+
| Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
|
|
23
|
+
| Generated from | `module-spec` @ SDLC template library `0.2.2` |
|
|
24
|
+
| generated_by / approved_by / updated_at | codex / repository user / 2026-08-22T15:21:29Z |
|
|
25
|
+
| Validation status | pass-with-warnings |
|
|
26
|
+
|
|
27
|
+
## Evidence Rules
|
|
28
|
+
|
|
29
|
+
Requirements cite current source and mirrored tests. Current code wins over retained prose when they conflict; commit and PR history are excluded. Missing evidence stays a gap.
|
|
30
|
+
|
|
31
|
+
## Source Material Register
|
|
32
|
+
|
|
33
|
+
| Source material | Scope | Decision | Detail location or disposition |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| Retained package consumer documentation | overview / API / behavior / tests | used and verified; reaction availability and event/request meaning were placed into the public surface and invariants |
|
|
36
|
+
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
37
|
+
|
|
38
|
+
## Overview
|
|
39
|
+
|
|
40
|
+
`src/reactions/` contains 3 direct source/reference file(s) and has 0 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
|
+
Defines static reaction and skin-tone catalogs plus TypeScript shapes for reaction, sender, and relay payloads; owning Meeting code performs runtime lookup and fallback.
|
|
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/reactions/
|
|
54
|
+
├── constants.ts — module constants and wire values
|
|
55
|
+
├── reactions.ts — reactions implementation responsibility
|
|
56
|
+
├── reactions.type.ts — reactions.type implementation responsibility
|
|
57
|
+
└── ai-docs/reactions-spec.md — canonical module specification
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Key Files (source of truth)
|
|
61
|
+
|
|
62
|
+
| File | Holds |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `src/reactions/constants.ts` | module constants and wire values |
|
|
65
|
+
| `src/reactions/reactions.ts` | reactions implementation responsibility |
|
|
66
|
+
| `src/reactions/reactions.type.ts` | reactions.type implementation responsibility |
|
|
67
|
+
| no source-local mirrored test directory | explicit characterization gap |
|
|
68
|
+
|
|
69
|
+
## Public Surface
|
|
70
|
+
|
|
71
|
+
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
72
|
+
|---|---|---|---|---|---|---|
|
|
73
|
+
| `reactions.1` | exported catalogs | `REACTION_RELAY_TYPES`, `Reactions`, and `SkinTones` | Define the supported relay, reaction, and skin-tone values consumed by Meeting request/event code. | Preserve existing raw values; add new catalog members compatibly. | `src/reactions/constants.ts`, `src/reactions/reactions.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
74
|
+
| `reactions.2` | exported types | `EmoticonData`, `SkinTone`, `Reaction`, `ReactionServerType`, `SkinToneType`, `Sender`, `ProcessedReaction`, and `RelayEvent` | Type the sender, relay, server, and normalized reaction payloads crossing the Meeting boundary. | Type changes must remain compatible with existing relay and sender shapes. | `src/reactions/reactions.type.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
75
|
+
|
|
76
|
+
### Emitted events
|
|
77
|
+
|
|
78
|
+
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.
|
|
79
|
+
|
|
80
|
+
| Event literal | Constant / expression | Emission evidence |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `meeting:receiveReactions` | `EVENT_TRIGGERS.MEETING_RECEIVE_REACTIONS` | `src/meeting/index.ts` |
|
|
83
|
+
|
|
84
|
+
Compatibility notes:
|
|
85
|
+
- Prefer additive fields/options and preserve current return and rejection semantics. Internal helpers are not public merely because they are exported within the source directory.
|
|
86
|
+
|
|
87
|
+
## Requires (dependencies)
|
|
88
|
+
|
|
89
|
+
Reaction constants/types and Meeting reaction request/event paths.
|
|
90
|
+
|
|
91
|
+
## Requirements
|
|
92
|
+
|
|
93
|
+
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
94
|
+
|---|---|---|---|---|---|---|
|
|
95
|
+
| `REACTIONS-R-001` | Export the supported `Reactions` and `SkinTones` record values without executable normalization or transport behavior. | Owning Meeting code needs one stable catalog of server type/codepoint/shortcode values while retaining responsibility for selection and fallback. | `src/reactions/reactions.ts` | `test/unit/spec/meeting/index.js`, `test/unit/spec/meeting/request.js` | no source-local mirrored test exists | PRESENT |
|
|
96
|
+
| `REACTIONS-R-002` | type reaction, sender, and relay payloads. | Meeting serialization depends on the exact reaction, skin-tone, sender, and relay type vocabulary. | `src/reactions/reactions.ts`, `src/reactions/reactions.type.ts` | `test/unit/spec/meeting/request.js` | catalog values need an exhaustive serializer compatibility matrix in the owning Meeting tests | PRESENT |
|
|
97
|
+
| `REACTIONS-R-003` | The catalogs are plain records and perform no validation, parsing, serialization, or fallible I/O; `Meeting.sendReaction` passes an unknown reaction type through and falls back to the normal skin tone for an unknown tone. | The spec must not turn static data declarations into a runtime normalization API or rejection contract. | `src/reactions/`, `src/meeting/index.ts` | `test/unit/spec/meeting/index.js`, `test/unit/spec/meeting/request.js` | none | PRESENT |
|
|
98
|
+
|
|
99
|
+
## Design Overview
|
|
100
|
+
|
|
101
|
+
`reactions.ts` and `constants.ts` export static reaction/skin-tone values, while `reactions.type.ts` supplies compile-time payload shapes. The module has no runtime transport or lifecycle state.
|
|
102
|
+
|
|
103
|
+
## Data Flow
|
|
104
|
+
|
|
105
|
+
```mermaid
|
|
106
|
+
flowchart LR
|
|
107
|
+
Consumer[Meeting/request/event code] --> Catalog[reactions.ts]
|
|
108
|
+
Constants[constants.ts wire values] --> Catalog
|
|
109
|
+
Types[reactions.type.ts payload types] --> Consumer
|
|
110
|
+
Catalog --> Payload[reaction + skin-tone value]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Sequence Diagram(s)
|
|
114
|
+
|
|
115
|
+
Sequence coverage:
|
|
116
|
+
|
|
117
|
+
| Operation group | Diagram | Failure coverage |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| UC-1…UC-2 — reaction catalog and payload operation groups | Reaction catalog and payload primary sequence | catalog/type-only behavior and owning Meeting serialization/request failure |
|
|
120
|
+
| UC-1…UC-2 — reaction catalog and payload alternate/failure paths | Reaction catalog and payload alternate/failure sequence | consumer supplies a value outside the exported catalog or an owning request rejects it |
|
|
121
|
+
|
|
122
|
+
### Reaction catalog and payload primary sequence
|
|
123
|
+
|
|
124
|
+
```mermaid
|
|
125
|
+
sequenceDiagram
|
|
126
|
+
participant C as Meeting feature code
|
|
127
|
+
participant R as Reactions catalog
|
|
128
|
+
C->>R: select reaction and skin tone
|
|
129
|
+
R-->>C: declared wire values
|
|
130
|
+
C->>C: place values in request/event payload
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Reaction catalog and payload alternate/failure sequence
|
|
134
|
+
|
|
135
|
+
```mermaid
|
|
136
|
+
sequenceDiagram
|
|
137
|
+
participant C as Caller / current input owner
|
|
138
|
+
participant M as Meeting.sendReaction
|
|
139
|
+
participant R as Reactions/SkinTones records
|
|
140
|
+
C->>M: sendReaction(reactionType, skinToneType)
|
|
141
|
+
M->>R: look up catalog entries
|
|
142
|
+
alt known reaction/tone
|
|
143
|
+
R-->>M: declared catalog values
|
|
144
|
+
else unknown value
|
|
145
|
+
M->>M: pass through custom reaction type; use normal tone fallback
|
|
146
|
+
end
|
|
147
|
+
M-->>C: request promise, or plain Error rejection when reactionChannelUrl is absent
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Class / Component Relationships
|
|
151
|
+
|
|
152
|
+
```mermaid
|
|
153
|
+
classDiagram
|
|
154
|
+
class Consumer
|
|
155
|
+
class Catalog
|
|
156
|
+
class Constants
|
|
157
|
+
class Types
|
|
158
|
+
class Payload
|
|
159
|
+
Consumer --> Catalog
|
|
160
|
+
Constants --> Catalog
|
|
161
|
+
Types --> Consumer
|
|
162
|
+
Catalog --> Payload
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The arrows identify ownership and delegation inside `src/reactions/`; files that only declare types or constants are not presented as transports.
|
|
166
|
+
|
|
167
|
+
## Use Cases
|
|
168
|
+
|
|
169
|
+
- **UC-1:** Resolve consumer reaction and skin-tone choices from the exported `Reactions` and `SkinTones` catalogs before `Meeting.sendReaction()` serializes them. Evidence: `src/reactions/reactions.ts`, `src/meeting/index.ts`.
|
|
170
|
+
- **UC-2:** Carry sender identity and relay payloads through the exported reaction types while leaving parsing, validation, and transport to Meeting. Evidence: `src/reactions/reactions.type.ts`, `src/meeting/index.ts`.
|
|
171
|
+
|
|
172
|
+
## Business Rules & Invariants
|
|
173
|
+
|
|
174
|
+
- Consumer/server reaction and skin-tone values use declared enums/catalogs; participant sender data follows package privacy rules. Enforced under `src/reactions/`.
|
|
175
|
+
|
|
176
|
+
## Protocol / Wire Format
|
|
177
|
+
|
|
178
|
+
- `src/reactions/` declares catalog values and TypeScript payload shapes used by owning request/event code. Preserve type names, enum/raw values, sender identity fields, and relay structure; parsing and serialization occur outside this module.
|
|
179
|
+
|
|
180
|
+
## Pitfalls
|
|
181
|
+
|
|
182
|
+
- Display glyph/name and server relay type are different representations. Send the declared server value, not an arbitrary UI label.
|
|
183
|
+
- Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
|
|
184
|
+
|
|
185
|
+
## Test-Case Strategy (module)
|
|
186
|
+
|
|
187
|
+
No mirrored module test directory exists. Characterize the reactions-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
188
|
+
|
|
189
|
+
| Behavior / Requirement | Existing test evidence | Gap |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| `REACTIONS-R-001` | `test/unit/spec/meeting/request.js` | cover every exported catalog value and payload shape through owning Meeting serialization tests |
|
|
192
|
+
| `REACTIONS-R-002` | `test/unit/spec/meeting/request.js` | keep serializer coverage tied to every exported reaction and skin-tone raw value |
|
|
193
|
+
| `REACTIONS-R-003` | `test/unit/spec/meeting/request.js` | add a boundary case showing transport failure belongs to Meeting rather than this catalog/type module |
|
|
194
|
+
|
|
195
|
+
## Traceability
|
|
196
|
+
|
|
197
|
+
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
198
|
+
- Coverage state and contracts baseline: `../../../.sdd/manifest.json`
|
|
@@ -0,0 +1,272 @@
|
|
|
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
|
+
# RECONNECTION MANAGER — SPEC
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../../../AGENTS.md) · router [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md) · system [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md). This is the canonical source-local spec for `src/reconnection-manager/`.
|
|
13
|
+
|
|
14
|
+
## Metadata
|
|
15
|
+
|
|
16
|
+
| Field | Value |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Module id | `reconnection-manager` |
|
|
19
|
+
| Source path(s) | `src/reconnection-manager/` |
|
|
20
|
+
| Parent spec | — |
|
|
21
|
+
| Doc kind | Module spec |
|
|
22
|
+
| Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
|
|
23
|
+
| Generated from | `module-spec` @ SDLC template library `0.2.2` |
|
|
24
|
+
| generated_by / approved_by / updated_at | codex / repository user / 2026-08-22T15:21:29Z |
|
|
25
|
+
| Validation status | pass-with-warnings |
|
|
26
|
+
|
|
27
|
+
## Evidence Rules
|
|
28
|
+
|
|
29
|
+
Requirements cite current 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 recovery state machine and tests |
|
|
36
|
+
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
37
|
+
|
|
38
|
+
## Overview
|
|
39
|
+
|
|
40
|
+
`src/reconnection-manager/` contains 1 direct source/reference file(s) and has 1 mirrored unit-test file(s). This spec separates its public operations, runtime data movement, component ownership, state applicability, and verification boundary.
|
|
41
|
+
|
|
42
|
+
## Purpose / Responsibility
|
|
43
|
+
|
|
44
|
+
Coordinates bounded network/media recovery, escalating from reconnecting media to rejoining the meeting when required.
|
|
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/reconnection-manager/
|
|
54
|
+
├── index.ts — module facade/controller or primary exports
|
|
55
|
+
└── ai-docs/reconnection-manager-spec.md — canonical module specification
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Key Files (source of truth)
|
|
59
|
+
|
|
60
|
+
| File | Holds |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `src/reconnection-manager/index.ts` | module facade/controller or primary exports |
|
|
63
|
+
| `test/unit/spec/reconnection-manager/index.js` | mirrored characterization/unit coverage |
|
|
64
|
+
|
|
65
|
+
## Public Surface
|
|
66
|
+
|
|
67
|
+
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
68
|
+
|---|---|---|---|---|---|---|
|
|
69
|
+
| `reconnection-manager.1` | SDK / state | `ReconnectionManager.isReconnectInProgress()`, `reset()`, and `cleanUp()` | Expose the duplicate-run guard and reset only reconnection status plus rejoin attempts. | `cleanUp()` calls `reset()`; neither clears `iceState.timer` nor settles/clears the ICE defer. Use `resetReconnectionTimer()` for that separate state. | `src/reconnection-manager/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
70
|
+
| `reconnection-manager.2` | SDK / ICE wait | `waitForIceReconnect()`, `iceReconnected()`, and `resetReconnectionTimer()` | Wait for a bounded ICE recovery signal and settle/clear the owned timer/defer. | Preserve timeout duration, settlement, and reset ordering. | `src/reconnection-manager/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
71
|
+
| `reconnection-manager.3` | SDK / recovery | `reconnect()` | Run one guarded recovery sequence, emitting success after the ordinary recovery/completion-callback path and failure on terminal errors. | A successful auto-rejoin returns before `MEETING_RECONNECTION_SUCCESS`; disabled/duplicate starts throw, and terminal failure resets status/attempts in `finally`. | `src/reconnection-manager/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
72
|
+
| `reconnection-manager.4` | SDK / recovery | `reconnectMedia()` | Retry the current media reconnection path within configured attempt limits. | Preserve attempt bounds and escalation to meeting rejoin. | `src/reconnection-manager/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
73
|
+
| `reconnection-manager.5` | SDK / recovery | `rejoinMeeting()` | Rejoin the meeting and stop a share that was active at recovery start with the recovery reason. | Current code does not restore or republish sharing after recovery. | `src/reconnection-manager/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
74
|
+
|
|
75
|
+
### Emitted events
|
|
76
|
+
|
|
77
|
+
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.
|
|
78
|
+
|
|
79
|
+
| Event literal | Constant / expression | Emission evidence |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `meeting:reconnectionFailure` | `EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE` | `src/reconnection-manager/index.ts` |
|
|
82
|
+
| `meeting:reconnectionStarting` | `EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING` | `src/reconnection-manager/index.ts` |
|
|
83
|
+
| `meeting:reconnectionSuccess` | `EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS` | `src/reconnection-manager/index.ts` |
|
|
84
|
+
| `meeting:stoppedSharingLocal` | `EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL` | `src/meeting/index.ts`, `src/reconnection-manager/index.ts` |
|
|
85
|
+
|
|
86
|
+
`MEETING_RECONNECTION_SUCCESS` is emitted only after `executeReconnection()` and any completion callback finish on the ordinary path. When a `NeedsRejoinError` is handled by successful automatic rejoin, `reconnect()` returns immediately after `rejoinMeeting()` and skips that success event. Terminal errors still emit `MEETING_RECONNECTION_FAILURE`.
|
|
87
|
+
|
|
88
|
+
Compatibility notes:
|
|
89
|
+
- 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.
|
|
90
|
+
|
|
91
|
+
## Requires (dependencies)
|
|
92
|
+
|
|
93
|
+
Meeting lifecycle/media methods, network state callbacks, timers, retry configuration, logging, events, and metrics.
|
|
94
|
+
|
|
95
|
+
## Requirements
|
|
96
|
+
|
|
97
|
+
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
98
|
+
|---|---|---|---|---|---|---|
|
|
99
|
+
| `RECONNECTION-MANAGER-R-001` | start/reset/inspect reconnection state. | Coordinates bounded network/media recovery, escalating from reconnecting media to rejoining the meeting when required. | `src/reconnection-manager/index.ts` | `test/unit/spec/reconnection-manager/index.js` | none | PRESENT |
|
|
100
|
+
| `RECONNECTION-MANAGER-R-002` | retry media reconnection with timers. | Attempt limits and timers determine when recovery stays in media reconnect versus escalating to a full rejoin. | `src/reconnection-manager/index.ts` | `test/unit/spec/reconnection-manager/index.js` | ICE event/timeout races at the final attempt boundary need explicit coverage | PRESENT |
|
|
101
|
+
| `RECONNECTION-MANAGER-R-003` | Duplicate starts throw `ReconnectionNotStartedError`. Ordinary successful recovery emits `MEETING_RECONNECTION_SUCCESS` after its completion callback, but successful automatic rejoin returns before that emission. Terminal recovery failures emit `MEETING_RECONNECTION_FAILURE` and reject with `ReconnectionError`; some inner paths assign `FAILURE`, but the outer `finally` calls `reset()` and returns status to the default value. | Callers must not treat success-event presence as proof of every successful recovery mode, and must rely on the returned rejection/failure event rather than assume that `FAILURE` persists after settlement. | `src/reconnection-manager/index.ts` | `test/unit/spec/reconnection-manager/index.js` | characterize the absent success event after successful auto-rejoin | PRESENT |
|
|
102
|
+
| `RECONNECTION-MANAGER-R-004` | `status === IN_PROGRESS` prevents a second recovery run; `rejoinAttempts` is bounded by `maxRejoinAttempts` and both fields are reset by `reconnect()` cleanup. The separate ICE-wait path owns `iceState.timer` and clears it through `resetReconnectionTimer()`; `cleanUp()` does not invoke that method. | Concurrent network/media callbacks must not launch duplicate media negotiations or meeting joins, and lifecycle cleanup must not be documented as settling an independent ICE wait that current code leaves intact. | `src/reconnection-manager/index.ts` | `test/unit/spec/reconnection-manager/index.js` | characterize `cleanUp()` while an ICE wait is pending | PRESENT |
|
|
103
|
+
| `RECONNECTION-MANAGER-R-005` | Recovery first reconnects media where allowed, then escalates to meeting rejoin. If recovery started while sharing, current code calls `stopLocalShareStream` with `MEDIA_RECONNECTION` or `MEETING_REJOIN`; it does not republish or restore sharing. | This records the observable behavior and prevents a future test or caller from assuming restoration that does not exist. | `src/reconnection-manager/index.ts` | `test/unit/spec/reconnection-manager/index.js` | Possible product defect: user intent may be to restore prior sharing after recovery, but no restoration path exists. | PRESENT |
|
|
104
|
+
|
|
105
|
+
## Design Overview
|
|
106
|
+
|
|
107
|
+
The manager serializes one recovery run, first attempting its own `reconnectMedia()` operation and then calling `Meeting.join()` when rejoin is required. It owns retry counters/timers and `stopLocalShareStream()`; its media operation reaches into the Meeting's ROAP and media-connection dependencies rather than calling a `Meeting.reconnectMedia()` method.
|
|
108
|
+
|
|
109
|
+
## Data Flow
|
|
110
|
+
|
|
111
|
+
```mermaid
|
|
112
|
+
flowchart LR
|
|
113
|
+
Network[network / media failure] --> Manager[index.ts]
|
|
114
|
+
Manager --> Media[manager-owned reconnectMedia using Meeting ROAP/media properties]
|
|
115
|
+
Manager --> Meeting[Meeting join and stream-unpublish dependencies]
|
|
116
|
+
Manager --> Rejoin[Meeting.join rejoin path]
|
|
117
|
+
Manager --> Timer[bounded retry timer]
|
|
118
|
+
Manager --> Events[start; ordinary-path success; terminal failure]
|
|
119
|
+
Manager --> ShareStop[stopLocalShareStream with recovery reason]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Sequence Diagram(s)
|
|
123
|
+
|
|
124
|
+
Sequence coverage:
|
|
125
|
+
|
|
126
|
+
| Operation group | Diagram | Failure coverage |
|
|
127
|
+
|---|---|---|
|
|
128
|
+
| UC-1…UC-4 — reconnection and rejoin operation groups | Reconnection and rejoin primary sequence | disabled/duplicate start, ICE timeout, bounded retry escalation, and terminal reset |
|
|
129
|
+
| UC-1…UC-4 — reconnection and rejoin alternate/failure paths | Reconnection and rejoin alternate/failure sequence | duplicate start, exhausted retry count, media reconnection rejection, meeting rejoin rejection, or network state change during recovery |
|
|
130
|
+
|
|
131
|
+
### Reconnection and rejoin primary sequence
|
|
132
|
+
|
|
133
|
+
```mermaid
|
|
134
|
+
sequenceDiagram
|
|
135
|
+
participant N as Network/media callback
|
|
136
|
+
participant R as ReconnectionManager
|
|
137
|
+
participant M as Meeting
|
|
138
|
+
N-->>R: reconnect trigger
|
|
139
|
+
alt reconnection is disabled or another reconnect is already IN_PROGRESS
|
|
140
|
+
R--xN: ReconnectionNotStartedError without resetting status
|
|
141
|
+
else new recovery run
|
|
142
|
+
R->>R: set IN_PROGRESS
|
|
143
|
+
end
|
|
144
|
+
alt ordinary media reconnection succeeds after a new start
|
|
145
|
+
R->>R: stopLocalShareStream(MEDIA_RECONNECTION) when wasSharing
|
|
146
|
+
R->>R: reconnectMedia() using Meeting ROAP/media dependencies
|
|
147
|
+
R->>R: run completion callback when supplied
|
|
148
|
+
R-->>N: MEETING_RECONNECTION_SUCCESS and resolved promise
|
|
149
|
+
else NeedsRejoinError and auto-rejoin is enabled
|
|
150
|
+
R->>M: join({rejoin:true})
|
|
151
|
+
R->>R: stopLocalShareStream(MEETING_REJOIN) when wasSharing
|
|
152
|
+
R-->>N: resolved promise without MEETING_RECONNECTION_SUCCESS
|
|
153
|
+
else terminal recovery error
|
|
154
|
+
R--xN: MEETING_RECONNECTION_FAILURE and ReconnectionError
|
|
155
|
+
end
|
|
156
|
+
R->>R: finally resets status and rejoin attempts
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Reconnection and rejoin alternate/failure sequence
|
|
160
|
+
|
|
161
|
+
```mermaid
|
|
162
|
+
sequenceDiagram
|
|
163
|
+
participant N as Network / media trigger
|
|
164
|
+
participant R as ReconnectionManager
|
|
165
|
+
participant M as Meeting
|
|
166
|
+
N->>R: reconnect while local share may be active
|
|
167
|
+
alt status is default and recovery is enabled
|
|
168
|
+
alt ordinary media reconnection
|
|
169
|
+
R->>R: stopLocalShareStream(MEDIA_RECONNECTION) when sharing
|
|
170
|
+
R->>R: reconnectMedia()
|
|
171
|
+
else automatic meeting rejoin
|
|
172
|
+
R->>M: join({rejoin:true})
|
|
173
|
+
R->>R: stopLocalShareStream(MEETING_REJOIN) when sharing
|
|
174
|
+
end
|
|
175
|
+
R-->>N: ordinary success event, successful auto-rejoin without that event, or failure event and ReconnectionError
|
|
176
|
+
else reconnection is disabled or another reconnect is already IN_PROGRESS
|
|
177
|
+
R--xN: ReconnectionNotStartedError
|
|
178
|
+
end
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Class / Component Relationships
|
|
182
|
+
|
|
183
|
+
```mermaid
|
|
184
|
+
classDiagram
|
|
185
|
+
class Network
|
|
186
|
+
class Manager
|
|
187
|
+
class Meeting
|
|
188
|
+
class Media
|
|
189
|
+
class Rejoin
|
|
190
|
+
class Timer
|
|
191
|
+
class Events
|
|
192
|
+
class ShareStop
|
|
193
|
+
Network --> Manager
|
|
194
|
+
Manager --> Meeting
|
|
195
|
+
Manager --> Media
|
|
196
|
+
Manager --> Rejoin
|
|
197
|
+
Manager --> Timer
|
|
198
|
+
Manager --> Events
|
|
199
|
+
Manager --> ShareStop
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The arrows identify ownership and delegation inside `src/reconnection-manager/`; files that only declare types or constants are not presented as transports.
|
|
203
|
+
|
|
204
|
+
## Use Cases
|
|
205
|
+
|
|
206
|
+
- **UC-1:** Reject recovery when reconnection is disabled or another `reconnect()` already owns the `IN_PROGRESS` state. Evidence: `src/reconnection-manager/index.ts`.
|
|
207
|
+
- **UC-2:** Wait for bounded ICE reconnection, clearing the timer/defer when ICE returns or the wait resets. Evidence: `src/reconnection-manager/index.ts`.
|
|
208
|
+
- **UC-3:** Retry media reconnection within configured limits, then escalate to meeting rejoin. Emit success only after the ordinary recovery/completion-callback path; a successful automatic rejoin resolves without that event, while terminal errors emit failure. Evidence: `src/reconnection-manager/index.ts`.
|
|
209
|
+
- **UC-4:** When recovery began while sharing, stop the local share stream with the matching recovery reason; current code does not restore or republish it. Evidence: `src/reconnection-manager/index.ts`.
|
|
210
|
+
|
|
211
|
+
## State Model
|
|
212
|
+
|
|
213
|
+
The manager stores reconnection `status`, `rejoinAttempts`, configured attempt limits, and `iceState` (`disconnected`, resolver, timer, timeout). Sharing is read from the owning Meeting when recovery starts; there is no stored reconnect promise or last-recovery-mode field.
|
|
214
|
+
|
|
215
|
+
## Business Rules & Invariants
|
|
216
|
+
|
|
217
|
+
- Only one recovery run is active and retries are bounded. `reconnect()` success/failure resets reconnection status and attempts; the independent ICE timer/defer is cleared only through `iceReconnected()`/`resetReconnectionTimer()`, not by `cleanUp()`. A previously active share is stopped with a recovery-specific reason and is not restored by this module. Evidence: `src/reconnection-manager/index.ts`.
|
|
218
|
+
|
|
219
|
+
## Concurrency & Reactive Flow
|
|
220
|
+
|
|
221
|
+
- `status === IN_PROGRESS` is the duplicate-run guard for the duration of `reconnect()`. The outer `finally` resets status and `rejoinAttempts`; the independent ICE-wait timer is cleared by `iceReconnected()`/`resetReconnectionTimer()`. A share active at recovery start is stopped with the concrete recovery reason and is not republished by a later completion.
|
|
222
|
+
|
|
223
|
+
## State Machine
|
|
224
|
+
|
|
225
|
+
```mermaid
|
|
226
|
+
stateDiagram-v2
|
|
227
|
+
state "'' (default)" as DEFAULT
|
|
228
|
+
[*] --> DEFAULT
|
|
229
|
+
DEFAULT --> IN_PROGRESS: reconnect()
|
|
230
|
+
IN_PROGRESS --> DEFAULT: recovery succeeds / reset()
|
|
231
|
+
IN_PROGRESS --> FAILURE: terminal recovery error
|
|
232
|
+
FAILURE --> DEFAULT: reset()
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
The diagram uses the concrete `''`, `IN_PROGRESS`, and `FAILURE` values declared for reconnection status.
|
|
236
|
+
|
|
237
|
+
## Error Handling & Failure Modes
|
|
238
|
+
|
|
239
|
+
| Condition | Signal | Caller recovery |
|
|
240
|
+
|---|---|---|
|
|
241
|
+
| Reconnection is disabled or status is already `IN_PROGRESS` | `reconnect()` throws `ReconnectionNotStartedError`. | Wait for the active run to settle or enable recovery before a new attempt. |
|
|
242
|
+
| Media/WebSocket/rejoin recovery reaches a terminal failure | The manager emits `MEETING_RECONNECTION_FAILURE`, rejects with `ReconnectionError`, and `finally` resets status/attempts; inner `FAILURE` assignments are not persistent terminal state. | Handle the failure event/rejection and inspect current meeting state before another run. |
|
|
243
|
+
| `NeedsRejoinError` is handled by a successful automatic rejoin | `reconnect()` resolves after `rejoinMeeting()` and returns before `MEETING_RECONNECTION_SUCCESS` or the recovered metric is emitted. | Treat the resolved operation/current meeting state as the outcome; do not wait for a success event on this path. |
|
|
244
|
+
| Recovery began while local sharing was active | Current code unpublishes/stops the local share with `MEDIA_RECONNECTION` or `MEETING_REJOIN`; it does not restore or republish it. | Treat restoration as a separate product decision/operation. |
|
|
245
|
+
| `cleanUp()` runs while `waitForIceReconnect()` is pending | Status and rejoin attempts reset, but the ICE timer/defer remain active because `cleanUp()` does not call `resetReconnectionTimer()`. | Explicitly invoke the ICE reset path when the owner intends to settle that pending wait. |
|
|
246
|
+
|
|
247
|
+
## Pitfalls
|
|
248
|
+
|
|
249
|
+
- Network and media events can request recovery concurrently. Starting a second timer/promise produces duplicate joins and stale completion callbacks.
|
|
250
|
+
- `cleanUp()` is not a full ICE-wait teardown: it resets status/attempts only. An owner that needs to settle and clear `iceState` must call `resetReconnectionTimer()` explicitly.
|
|
251
|
+
- Public behavior may be reachable through a parent `Meeting`/`Meetings` object even when the source helper is not exported directly.
|
|
252
|
+
|
|
253
|
+
## Key Design Trade-off
|
|
254
|
+
|
|
255
|
+
- Escalating recovery favors continuity over immediate failure, with bounded delay and more lifecycle complexity.
|
|
256
|
+
|
|
257
|
+
## Test-Case Strategy (module)
|
|
258
|
+
|
|
259
|
+
Use the current mirrored suites: `test/unit/spec/reconnection-manager/index.js`. Characterize the reconnection-manager-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
260
|
+
|
|
261
|
+
| Behavior / Requirement | Existing test evidence | Gap |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| `RECONNECTION-MANAGER-R-001` | `test/unit/spec/reconnection-manager/index.js` | cover state reset, ICE wait, media retry, rejoin, and sharing-stop groups |
|
|
264
|
+
| `RECONNECTION-MANAGER-R-002` | `test/unit/spec/reconnection-manager/index.js` | ICE event/timeout races at the final attempt boundary need explicit coverage |
|
|
265
|
+
| `RECONNECTION-MANAGER-R-003` | `test/unit/spec/reconnection-manager/index.js` | assert successful auto-rejoin resolves without `MEETING_RECONNECTION_SUCCESS`, both recovery reasons stop an active share, and no completion path republishes it |
|
|
266
|
+
| `RECONNECTION-MANAGER-R-004` | `test/unit/spec/reconnection-manager/index.js` | verify concurrent triggers and exhausted retries |
|
|
267
|
+
| `RECONNECTION-MANAGER-R-005` | `test/unit/spec/reconnection-manager/index.js` | characterize both `stopLocalShareStream` recovery reasons; restoration remains a product-decision gap |
|
|
268
|
+
|
|
269
|
+
## Traceability
|
|
270
|
+
|
|
271
|
+
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
272
|
+
- Coverage state and contracts baseline: `../../../.sdd/manifest.json`
|