@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
@@ -0,0 +1,296 @@
1
+ ---
2
+ type: Module Spec
3
+ title: 'Reactions specification'
4
+ description: Responsibilities, boundaries, catalog values, payload types, invariants, and verification for the reactions module of plugin-meetings.
5
+ tags: [module, specification]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: module-spec
9
+ generated_from: module-spec@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-11-17T03:14:21Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # Reactions
17
+
18
+ This source-local document at `src/reactions/docs/README.md` owns the stable specification for
19
+ **the reactions module** of `@webex/plugin-meetings`: static reaction and skin-tone catalogs plus the
20
+ TypeScript shapes for reaction, sender, and relay payloads. Ground every claim in package evidence
21
+ and link to the [package architecture](../../../docs/architecture.md) instead of repeating broader
22
+ facts. No service specification exists because this package is a library.
23
+
24
+ Related context — start here: root [package agent instructions](../../../AGENTS.md) · router
25
+ [documentation index](../../../docs/index.md) · system [package architecture](../../../docs/architecture.md).
26
+ This is the canonical source-local spec for `src/reactions/`.
27
+
28
+ Repo architecture: [package architecture](../../../docs/architecture.md) · Registry:
29
+ [documentation index](../../../docs/index.md) · Coverage state and contracts baseline: `.sdd/manifest.json`.
30
+
31
+ ## Metadata
32
+
33
+ | Field | Value |
34
+ |---|---|
35
+ | Owner | @webex/web-client, @webex/web-sdk |
36
+ | Source path | `src/reactions` |
37
+ | Resource kind | module |
38
+ | Status | Draft |
39
+ | Last verified | 2026-11-16 at `0b8c34db7f` |
40
+ | Module id | `plugin-meetings/reactions` |
41
+ | Parent spec | — |
42
+ | Doc kind | Module spec |
43
+ | Coverage score | Pending coverage assessment |
44
+ | Validation status | not-run |
45
+
46
+ ## Applicability
47
+
48
+ | Condition ID | Status | Evidence or reason | Owned section |
49
+ | ------------ | ------ | ------------------ | ------------- |
50
+ | `module.has_tiers` | N/A | No tier policy exists in `package.json` or `.sdd/manifest.json` | Tier |
51
+ | `module.has_ui` | N/A | `src/reactions/reactions.ts` declares data only; the module renders nothing | UI use-case flow |
52
+ | `module.crosses_service_boundaries` | N/A | The module issues no request; Meeting sends and receives reactions in `src/meeting/index.ts` and `src/meeting/request.ts` | Cross-boundary use-case flow |
53
+ | `module.holds_client_state` | N/A | The catalogs in `src/reactions/reactions.ts` are constant records | Client state model |
54
+ | `module.enforces_domain_rules` | Applicable | The closed reaction and skin-tone enums in `src/reactions/reactions.type.ts` key the catalogs in `src/reactions/reactions.ts` | Business rules and invariants |
55
+ | `module.is_concurrent_async` | N/A | No promise, timer, or listener in `src/reactions/reactions.ts` or `src/reactions/reactions.type.ts` | Concurrency and reactive flow |
56
+ | `module.owns_persistence` | N/A | Nothing is stored; `src/reactions/reactions.ts` is static data | Data, schema, and migration discipline |
57
+ | `module.stateful_transitions` | N/A | No state changes in `src/reactions/reactions.ts` | State machine |
58
+ | `module.exposes_wire_protocol` | Applicable | The catalog values and the relay constant in `src/reactions/constants.ts` are the values Meeting sends to and matches from the reaction service | Protocol and wire format |
59
+ | `module.ui_multi_screen` | N/A | No UI | UI flow |
60
+ | `module.large_data_model` | N/A | Six small types in `src/reactions/reactions.type.ts` | Data model |
61
+ | `module.returns_caller_errors` | N/A | Nothing in `src/reactions/reactions.ts` throws or rejects; the send rejection belongs to `src/meeting/index.ts` | Caller-visible failure modes |
62
+ | `module.module_specific_conventions` | N/A | Repository-wide rules in `AGENTS.md` apply unchanged | Module-specific rules |
63
+ | `module.published_package` | Applicable | `src/index.ts` re-exports the catalogs and the Reaction type from the package named in `package.json` | Export stability |
64
+ | `module.embedded_in_host` | N/A | No mount or theme contract | Host integration and theming |
65
+ | `module.has_design_tradeoff` | N/A | No recorded trade-off in `src/reactions/reactions.ts` | Key design trade-off |
66
+ | `module.has_submodules` | N/A | The module directory has no child module | Sub-modules |
67
+
68
+ ## Evidence register
69
+
70
+ Requirements cite current source and mirrored tests. Current code wins over retained prose when they
71
+ conflict; commit and PR history are excluded. Missing evidence stays a gap.
72
+
73
+ | Evidence | What it establishes |
74
+ | -------- | ------------------- |
75
+ | `src/reactions/reactions.ts` | `Reactions` (13 entries keyed by `ReactionServerType`) and `SkinTones` (6 entries keyed by `SkinToneType`), each entry holding `type`, `codepoints`, and `shortcodes`; exported as named exports only |
76
+ | `src/reactions/reactions.type.ts` | `EmoticonData`, `SkinTone`, `Reaction`, the `ReactionServerType` and `SkinToneType` enums, `Sender`, `ProcessedReaction`, and `RelayEvent` (with the unexported `RelayEventData`) |
77
+ | `src/reactions/constants.ts` | `REACTION_RELAY_TYPES.REACTION` is `'react'` |
78
+ | `src/index.ts` | Re-exports `src/reactions/reactions.ts` as the `REACTIONS` namespace and the `Reaction` type; no other reactions export reaches the package entry |
79
+ | `src/meeting/index.ts` | `sendReaction` looks up `Reactions[reactionType] || {type: reactionType}` and `SkinTones[skinToneType] || SkinTones.normal`; `processRelayEvent` handles relay type `react` and emits `meeting:receiveReactions` with a `ProcessedReaction` |
80
+ | `src/meeting/request.ts`, `src/meeting/request.type.ts` | `sendReaction` POSTs `{sender: {participantId}, reaction}` to `reactionChannelUrl`; `SendReactionOptions.reaction` is typed `Reaction` |
81
+ | `src/constants.ts` | `EVENT_TRIGGERS.MEETING_RECEIVE_REACTIONS` is `meeting:receiveReactions` |
82
+ | `test/unit/spec/meeting/index.js` | `#sendReaction` cases assert the serialized `thumb_down` and `light` catalog values, the custom-type pass-through, the `normal` tone fallback, and the missing-URL rejection; `#processRelayEvent` cases assert the emitted processed reaction and the unknown-sender skip |
83
+ | `test/unit/spec/meeting/request.js` | `#sendReaction` asserts the POST method, URI, sender, and reaction body |
84
+ | Observation, no stated WHY | `Meeting.processRelayEvent` acts only when the meeting config `receiveReactions` is truthy, and `src/config.ts` declares no default for it, so a host that does not set it receives no `meeting:receiveReactions` events (`src/meeting/index.ts`, `src/config.ts`) |
85
+
86
+ ## Purpose and boundary
87
+
88
+ - Responsibility: Defines static reaction and skin-tone catalogs plus TypeScript shapes for reaction,
89
+ sender, and relay payloads; owning Meeting code performs runtime lookup and fallback.
90
+ - In scope: the `Reactions` and `SkinTones` records, the `REACTION_RELAY_TYPES` constant, and the
91
+ types in `src/reactions/reactions.type.ts`.
92
+ - Out of scope: choosing, serializing, and sending a reaction (`Meeting.sendReaction`,
93
+ `MeetingRequest.sendReaction`); receiving relay events from the LLM data channel and emitting
94
+ `meeting:receiveReactions` (`Meeting.processRelayEvent`); enabling reactions for a meeting
95
+ (`Meeting.toggleReactions`, owned by the meeting module, `src/meeting/docs/README.md`).
96
+ - Consumers: `src/meeting/index.ts`, `src/meeting/request.type.ts`, and, through the `REACTIONS`
97
+ namespace and the `Reaction` type in `src/index.ts`, applications using the published package.
98
+
99
+ ## Structure and key files
100
+
101
+ `src/reactions` contains 3 direct source/reference file(s) and has 0 mirrored unit-test file(s). Stack:
102
+ TypeScript/JavaScript in the Node 22.14 Yarn workspace; Webex core/plugin abstractions and
103
+ Mocha/Sinon/`@webex/test-helper-chai` tests. The module has no runtime import beyond its own files.
104
+
105
+ ```text
106
+ src/reactions/
107
+ ├── constants.ts — module constants and wire values (REACTION_RELAY_TYPES)
108
+ ├── reactions.ts — Reactions and SkinTones catalogs
109
+ ├── reactions.type.ts — reactions.type payload types and enums
110
+ └── docs/README.md — canonical module specification
111
+ ```
112
+
113
+ | File | Holds |
114
+ |---|---|
115
+ | `src/reactions/constants.ts` | module constants and wire values: `REACTION_RELAY_TYPES` with `REACTION: 'react'` |
116
+ | `src/reactions/reactions.ts` | reactions implementation responsibility: the `Reactions` and `SkinTones` catalog records |
117
+ | `src/reactions/reactions.type.ts` | reactions.type implementation responsibility: emoticon, reaction, sender, processed-reaction, and relay types and the two catalog-key enums |
118
+ | no source-local mirrored test directory | explicit characterization gap; behavior is exercised through `test/unit/spec/meeting/index.js` and `test/unit/spec/meeting/request.js` |
119
+
120
+ ## Public surface
121
+
122
+ | Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
123
+ |---|---|---|---|---|---|---|
124
+ | `reactions-catalog` | exported catalogs | `Reactions` and `SkinTones` (published as the `REACTIONS` namespace), plus the internal `REACTION_RELAY_TYPES` | Define the supported relay, reaction, and skin-tone values consumed by Meeting request/event code. | Preserve existing raw values; add new catalog members compatibly. `REACTION_RELAY_TYPES` is not re-exported by `src/index.ts`. | `src/reactions/constants.ts`, `src/reactions/reactions.ts` | [package architecture](../../../docs/architecture.md) |
125
+ | `reactions-catalog` | exported types | `Reaction` (published), and the internal `EmoticonData`, `SkinTone`, `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. Only `Reaction` is re-exported by `src/index.ts`. | `src/reactions/reactions.type.ts` | [package architecture](../../../docs/architecture.md) |
126
+
127
+ Contract ID `reactions-catalog` is indexed in the
128
+ [package architecture](../../../docs/architecture.md) and registered in `.sdd/manifest.json`; its
129
+ native source is `package.json`. The module requires no contract.
130
+
131
+ This module emits no event. The Meeting module emits or forwards these observable literals for the
132
+ reaction boundary. Preserve literal values, scope, payload shape, and emission timing; a constant name
133
+ alone is not a substitute for the consumer-visible value.
134
+
135
+ | Event literal | Constant / expression | Emission evidence |
136
+ |---|---|---|
137
+ | `meeting:receiveReactions` | `EVENT_TRIGGERS.MEETING_RECEIVE_REACTIONS` | `src/meeting/index.ts` |
138
+
139
+ Compatibility notes:
140
+
141
+ - 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.
142
+
143
+ ## Dependencies
144
+
145
+ Reaction constants/types and Meeting reaction request/event paths.
146
+
147
+ | Dependency | Why it is required | Failure behavior |
148
+ | ---------- | ------------------ | ---------------- |
149
+ | `src/reactions/constants.ts` (within the module) | `reactions.type.ts` reads `REACTION_RELAY_TYPES` to type `RelayEventData.relayType` | — |
150
+ | Meeting reaction request/event paths (consumers, not imports) | `Meeting.sendReaction` and `Meeting.processRelayEvent` give the catalog and types their runtime meaning | Failures are owned by the meeting module |
151
+
152
+ ## Requirements
153
+
154
+ | ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
155
+ |---|---|---|---|---|---|---|
156
+ | `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 |
157
+ | `REACTIONS-R-002` | Type reaction, sender, and relay payloads: `Reaction` is `EmoticonData` (`type`, optional `codepoints` and `shortcodes`) with an optional `tone`; `Sender` has `displayName` and `participantId`; `ProcessedReaction` has `reaction` and `sender: {id, name}`; `RelayEvent` has `data: {relayType, reaction, sender}` and optional `headers.route`. | 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`, `test/unit/spec/meeting/index.js` | catalog values need an exhaustive serializer compatibility matrix in the owning Meeting tests | PRESENT |
158
+ | `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 as `{type}` and falls back to the normal skin tone (`normal_skin_tone`, empty codepoints and shortcodes) for an unknown or missing tone. | The spec must not turn static data declarations into a runtime normalization API or rejection contract. | `src/reactions/reactions.ts`, `src/reactions/constants.ts`, `src/meeting/index.ts` | `test/unit/spec/meeting/index.js`, `test/unit/spec/meeting/request.js` | none | PRESENT |
159
+ | `REACTIONS-R-004` | `REACTION_RELAY_TYPES.REACTION` is the literal `react`; `Meeting.processRelayEvent` handles a relay event only when `data.relayType` equals it and ignores every other relay type. | The relay event switch in Meeting matches on this literal, so changing it would silently drop received reactions. | `src/reactions/constants.ts`, `src/meeting/index.ts` | `test/unit/spec/meeting/index.js` | none | PRESENT |
160
+
161
+ ## Design overview
162
+
163
+ `reactions.ts` and `constants.ts` export static reaction/skin-tone values, while `reactions.type.ts`
164
+ supplies compile-time payload shapes. The module has no runtime transport or lifecycle state.
165
+
166
+ Each catalog entry is keyed by the enum member that names it (`Record<ReactionServerType, Reaction>`
167
+ and `Record<SkinToneType, SkinTone>`), so TypeScript requires one entry per enum member. A reaction's
168
+ `type` equals its key; a skin tone's `type` is the key with `_skin_tone` appended (`light` maps to
169
+ `light_skin_tone`). Meeting builds the sent reaction by spreading the catalog entry and adding the
170
+ resolved skin tone as `tone`.
171
+
172
+ ## Data flow and sequence coverage
173
+
174
+ Call style: in-process imports only. The module is read by `Meeting.sendReaction`, which sends the
175
+ result over HTTPS through `MeetingRequest.sendReaction`, and by `Meeting.processRelayEvent`, which
176
+ receives relay events from the LLM data channel. This is a trivial catalog/type module with one operation group; reaction
177
+ serialization and sending are owned by Meeting, so one sequence diagram covers it.
178
+
179
+ ```mermaid
180
+ flowchart LR
181
+ Consumer[Meeting/request/event code] --> Catalog[reactions.ts]
182
+ Constants[constants.ts wire values] --> Catalog
183
+ Types[reactions.type.ts payload types] --> Consumer
184
+ Catalog --> Payload[reaction + skin-tone value]
185
+ ```
186
+
187
+ Sequence coverage:
188
+
189
+ | Operation group | Diagram | Failure coverage |
190
+ |---|---|---|
191
+ | UC-1…UC-2 — reaction catalog and payload operation groups | Reaction catalog and payload sequence | catalog/type-only behavior and owning Meeting serialization/request failure; consumer supplies a value outside the exported catalog, or `reactionChannelUrl` is absent and Meeting rejects |
192
+
193
+ Reaction catalog and payload sequence:
194
+
195
+ ```mermaid
196
+ sequenceDiagram
197
+ participant C as Caller / current input owner
198
+ participant M as Meeting.sendReaction
199
+ participant R as Reactions/SkinTones records
200
+ C->>M: sendReaction(reactionType, skinToneType)
201
+ M->>R: select reaction and skin tone, look up catalog entries
202
+ alt known reaction/tone
203
+ R-->>M: declared catalog values (declared wire values)
204
+ else unknown value
205
+ M->>M: pass through custom reaction type, use normal tone fallback
206
+ end
207
+ M->>M: place values in request/event payload
208
+ M-->>C: request promise, or plain Error rejection when reactionChannelUrl is absent
209
+ ```
210
+
211
+ ## Class and component relationships
212
+
213
+ ```mermaid
214
+ classDiagram
215
+ class Consumer
216
+ class Catalog
217
+ class Constants
218
+ class Types
219
+ class Payload
220
+ Consumer --> Catalog
221
+ Constants --> Catalog
222
+ Types --> Consumer
223
+ Catalog --> Payload
224
+ ```
225
+
226
+ The arrows identify ownership and delegation inside `src/reactions/`; files that only declare types or
227
+ constants are not presented as transports. `Consumer` is Meeting code, `Catalog` is
228
+ `src/reactions/reactions.ts`, `Constants` is `src/reactions/constants.ts`, `Types` is
229
+ `src/reactions/reactions.type.ts`, and `Payload` is the reaction body Meeting sends.
230
+
231
+ ## Use cases and flows
232
+
233
+ | Use case | Actor or caller | Primary steps and outcome | Failure or boundary behavior | Evidence |
234
+ | -------- | --------------- | ------------------------- | ---------------------------- | -------- |
235
+ | `UC-1` | Application calling `Meeting.sendReaction` | Resolve consumer reaction and skin-tone choices from the exported `Reactions` and `SkinTones` catalogs before `Meeting.sendReaction()` serializes them. | An unknown reaction type is sent as `{type}`; an unknown tone becomes `normal`; a missing `reactionChannelUrl` rejects in Meeting | `src/reactions/reactions.ts`, `src/meeting/index.ts`, `test/unit/spec/meeting/index.js` |
236
+ | `UC-2` | Meeting receiving an LLM relay event | Carry sender identity and relay payloads through the exported reaction types while leaving parsing, validation, and transport to Meeting. | Meeting skips an event whose sender is not a member (outside webinars) | `src/reactions/reactions.type.ts`, `src/meeting/index.ts`, `test/unit/spec/meeting/index.js` |
237
+
238
+ ## Business rules and invariants
239
+
240
+ - Consumer/server reaction and skin-tone values use declared enums/catalogs; participant sender data
241
+ follows package privacy rules. Enforced under `src/reactions/reactions.type.ts` and
242
+ `src/reactions/reactions.ts`.
243
+
244
+ | ID | Invariant | WHY | Enforcement source | Test evidence |
245
+ | -- | --------- | --- | ------------------ | ------------- |
246
+ | `INV-001` | `Reactions` has exactly one entry per `ReactionServerType` member (13) and `SkinTones` one per `SkinToneType` member (6); each reaction's `type` equals its key. | Meeting looks entries up by the caller's string, so key and server value must agree (`REACTIONS-R-001`). | `src/reactions/reactions.ts`, `src/reactions/reactions.type.ts` | `test/unit/spec/meeting/index.js` |
247
+ | `INV-002` | `SkinTones.normal` has type `normal_skin_tone` with empty `codepoints` and `shortcodes`. | It is the fallback tone Meeting attaches to every reaction without a known tone (`REACTIONS-R-003`). | `src/reactions/reactions.ts` | `test/unit/spec/meeting/index.js` |
248
+
249
+ ## Protocol and wire format
250
+
251
+ - `src/reactions/` declares catalog values and TypeScript payload shapes used by owning request/event
252
+ code. Preserve type names, enum/raw values, sender identity fields, and relay structure; parsing and
253
+ serialization occur outside this module.
254
+
255
+ | Message or frame | Version | Producer or serializer | Consumer or parser | Compatibility and ordering rule |
256
+ | ---------------- | ------- | ---------------------- | ------------------ | ------------------------------- |
257
+ | Reaction send body `{sender: {participantId}, reaction: {type, codepoints, shortcodes, tone}}` | Unversioned | `src/meeting/request.ts` | Reaction service at `reactionChannelUrl` | The `reaction` object is a catalog entry plus `tone`, or `{type, tone}` for an unknown type |
258
+ | Relay event `{data: {relayType: 'react', reaction, sender: {displayName, participantId}}, headers: {route}}` | Unversioned | LLM data channel | `src/meeting/index.ts` | Only `relayType` `react` is handled; `headers.route` is checked against the active binding |
259
+ | Reaction codes: smile `1F642`, sad `1F625`, wow `1F62E`, haha `1F603`, celebrate `1F389`, clap `1F44F`, thumb_up `1F44D`, thumb_down `1F44E`, heart `2764`, fire `1F525`, prayer `1F64F`, speed_up `1F407`, slow_down `1F422` | — | `src/reactions/reactions.ts` | Reaction service | Raw `type`, `codepoints`, and `shortcodes` values are sent as declared |
260
+ | Skin tones: normal (empty), light `1F3FB`, medium_light `1F3FC`, medium `1F3FD`, medium_dark `1F3FE`, dark `1F3FF`, with shortcodes `:skin-tone-2:` to `:skin-tone-6:` | — | `src/reactions/reactions.ts` | Reaction service | The `type` sent is the `_skin_tone` form, not the key |
261
+
262
+ ## Pitfalls and constraints
263
+
264
+ - Display glyph/name and server relay type are different representations. Send the declared server value, not an arbitrary UI label.
265
+ - Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
266
+ - `Meeting.sendReaction` types `reactionType` as `string`, not `ReactionServerType`, so any string is
267
+ sent; only the catalog keys carry codepoints and shortcodes.
268
+ - A skin tone's key and its sent `type` differ (`light` and `light_skin_tone`); code that compares a
269
+ received tone must use the `type` form.
270
+
271
+ ## Export stability
272
+
273
+ | Export or entry point | Consumer | Stability | Versioning and deprecation rule | Declaration or API report |
274
+ | --------------------- | -------- | --------- | ------------------------------- | ------------------------- |
275
+ | `REACTIONS` namespace (`export * as REACTIONS from './reactions/reactions'`): `REACTIONS.Reactions` and `REACTIONS.SkinTones` | Applications using `@webex/plugin-meetings` | Public (contract `reactions-catalog`) | Follows the package version in `package.json`; removing or renaming a catalog key or changing a raw `type`, `codepoints`, or `shortcodes` value is a breaking change, while adding an entry is additive (`REACTIONS-R-001`) | `src/index.ts`, `src/reactions/reactions.ts`, `package.json` |
276
+ | `Reaction` type (`export {type Reaction}`) | TypeScript applications | Public (contract `reactions-catalog`) | Same version rule; new fields must be optional (`REACTIONS-R-002`) | `src/index.ts`, `src/reactions/reactions.type.ts`, `package.json` |
277
+ | `REACTION_RELAY_TYPES`, `EmoticonData`, `SkinTone`, `ReactionServerType`, `SkinToneType`, `Sender`, `ProcessedReaction`, `RelayEvent` | Package code only | Internal | Not reachable from the package entry; may change with their Meeting callers | `src/reactions/constants.ts`, `src/reactions/reactions.type.ts` |
278
+
279
+ The build emits declarations to `dist/types` (the `build` script in `package.json`); no API report is
280
+ committed.
281
+
282
+ ## Verification
283
+
284
+ No mirrored module test directory exists. Characterize the reactions-specific use cases above and each
285
+ listed failure condition through the owning Meeting tests; add cleanup or transition cases only for
286
+ resources and state this module actually owns.
287
+
288
+ | Behavior / Requirement | Existing test evidence | Gap |
289
+ |---|---|---|
290
+ | `REACTIONS-R-001` | `test/unit/spec/meeting/index.js` | cover every exported catalog value and payload shape through owning Meeting serialization tests; only `thumb_down`, `light`, and `normal` are asserted |
291
+ | `REACTIONS-R-002` | `test/unit/spec/meeting/request.js` | keep serializer coverage tied to every exported reaction and skin-tone raw value |
292
+ | `REACTIONS-R-003` | `test/unit/spec/meeting/index.js` | add a boundary case showing transport failure belongs to Meeting rather than this catalog/type module |
293
+ | `REACTIONS-R-004` | `test/unit/spec/meeting/index.js` | no case sends a relay event with another `relayType` |
294
+
295
+ A module specification is complete only when its public surface, invariants, failure modes, and test
296
+ evidence agree with the implementation.