@webex/plugin-meetings 3.12.0-next.15 → 3.12.0-next.151

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 (296) hide show
  1. package/.sdd/manifest.json +1312 -0
  2. package/.sdd/templates/.source.json +30 -0
  3. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
  4. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
  5. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
  6. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
  7. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
  8. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
  9. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
  10. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
  11. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
  12. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
  13. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
  14. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
  15. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
  16. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
  17. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
  18. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
  19. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
  20. package/.sdd/templates/component-repo/template-map.json +112 -0
  21. package/AGENTS.md +135 -0
  22. package/ai-docs/ARCHITECTURE.md +207 -0
  23. package/ai-docs/CONTRACTS.md +267 -0
  24. package/ai-docs/DATA_MODEL.md +64 -0
  25. package/ai-docs/GETTING_STARTED.md +73 -0
  26. package/ai-docs/GLOSSARY.md +56 -0
  27. package/ai-docs/REVIEW_CHECKLIST.md +45 -0
  28. package/ai-docs/RULES.md +79 -0
  29. package/ai-docs/SECURITY.md +74 -0
  30. package/ai-docs/SERVICE_STATE.md +59 -0
  31. package/ai-docs/SPEC_INDEX.md +85 -0
  32. package/ai-docs/TEST_INDEX.md +45 -0
  33. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
  34. package/ai-docs/patterns/defensive-error-propagation.md +55 -0
  35. package/ai-docs/patterns/event-scope-emission.md +46 -0
  36. package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
  37. package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
  38. package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
  39. package/dist/aiEnableRequest/index.js +15 -2
  40. package/dist/aiEnableRequest/index.js.map +1 -1
  41. package/dist/annotation/index.js +2 -2
  42. package/dist/annotation/index.js.map +1 -1
  43. package/dist/breakouts/breakout.js +8 -3
  44. package/dist/breakouts/breakout.js.map +1 -1
  45. package/dist/breakouts/events.js +29 -14
  46. package/dist/breakouts/events.js.map +1 -1
  47. package/dist/breakouts/index.js +99 -4
  48. package/dist/breakouts/index.js.map +1 -1
  49. package/dist/common/errors/webex-errors.js +49 -5
  50. package/dist/common/errors/webex-errors.js.map +1 -1
  51. package/dist/config.js +2 -2
  52. package/dist/config.js.map +1 -1
  53. package/dist/constants.js +37 -10
  54. package/dist/constants.js.map +1 -1
  55. package/dist/controls-options-manager/index.js +46 -10
  56. package/dist/controls-options-manager/index.js.map +1 -1
  57. package/dist/hashTree/constants.js +4 -1
  58. package/dist/hashTree/constants.js.map +1 -1
  59. package/dist/hashTree/hashTreeParser.js +1096 -391
  60. package/dist/hashTree/hashTreeParser.js.map +1 -1
  61. package/dist/hashTree/utils.js +20 -0
  62. package/dist/hashTree/utils.js.map +1 -1
  63. package/dist/index.js +7 -0
  64. package/dist/index.js.map +1 -1
  65. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  66. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  67. package/dist/interceptors/locusRetry.js +23 -8
  68. package/dist/interceptors/locusRetry.js.map +1 -1
  69. package/dist/interpretation/index.js +55 -12
  70. package/dist/interpretation/index.js.map +1 -1
  71. package/dist/interpretation/interpretation.types.js +7 -0
  72. package/dist/interpretation/interpretation.types.js.map +1 -0
  73. package/dist/interpretation/siLanguage.js +1 -1
  74. package/dist/locus-info/controlsUtils.js +4 -1
  75. package/dist/locus-info/controlsUtils.js.map +1 -1
  76. package/dist/locus-info/index.js +615 -176
  77. package/dist/locus-info/index.js.map +1 -1
  78. package/dist/locus-info/infoUtils.js +36 -5
  79. package/dist/locus-info/infoUtils.js.map +1 -1
  80. package/dist/locus-info/types.js +20 -0
  81. package/dist/locus-info/types.js.map +1 -1
  82. package/dist/media/MediaConnectionAwaiter.js +15 -2
  83. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  84. package/dist/media/index.js +8 -2
  85. package/dist/media/index.js.map +1 -1
  86. package/dist/media/properties.js +4 -5
  87. package/dist/media/properties.js.map +1 -1
  88. package/dist/meeting/in-meeting-actions.js +7 -1
  89. package/dist/meeting/in-meeting-actions.js.map +1 -1
  90. package/dist/meeting/index.js +1684 -835
  91. package/dist/meeting/index.js.map +1 -1
  92. package/dist/meeting/locusMediaRequest.js +229 -82
  93. package/dist/meeting/locusMediaRequest.js.map +1 -1
  94. package/dist/meeting/muteState.js +10 -1
  95. package/dist/meeting/muteState.js.map +1 -1
  96. package/dist/meeting/request.js +5 -2
  97. package/dist/meeting/request.js.map +1 -1
  98. package/dist/meeting/util.js +37 -3
  99. package/dist/meeting/util.js.map +1 -1
  100. package/dist/meeting/voicea-meeting.js +2 -1
  101. package/dist/meeting/voicea-meeting.js.map +1 -1
  102. package/dist/meeting-info/meeting-info-v2.js +9 -3
  103. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  104. package/dist/meetings/index.js +300 -128
  105. package/dist/meetings/index.js.map +1 -1
  106. package/dist/meetings/meetings.types.js +6 -1
  107. package/dist/meetings/meetings.types.js.map +1 -1
  108. package/dist/meetings/request.js +39 -0
  109. package/dist/meetings/request.js.map +1 -1
  110. package/dist/meetings/util.js +116 -18
  111. package/dist/meetings/util.js.map +1 -1
  112. package/dist/member/index.js +10 -0
  113. package/dist/member/index.js.map +1 -1
  114. package/dist/member/types.js.map +1 -1
  115. package/dist/member/util.js +30 -0
  116. package/dist/member/util.js.map +1 -1
  117. package/dist/members/index.js +101 -43
  118. package/dist/members/index.js.map +1 -1
  119. package/dist/members/util.js +8 -1
  120. package/dist/members/util.js.map +1 -1
  121. package/dist/metrics/constants.js +7 -1
  122. package/dist/metrics/constants.js.map +1 -1
  123. package/dist/multistream/codec/constants.js +63 -0
  124. package/dist/multistream/codec/constants.js.map +1 -0
  125. package/dist/multistream/mediaRequestManager.js +62 -15
  126. package/dist/multistream/mediaRequestManager.js.map +1 -1
  127. package/dist/multistream/receiveSlot.js +9 -0
  128. package/dist/multistream/receiveSlot.js.map +1 -1
  129. package/dist/reachability/clusterReachability.js.map +1 -1
  130. package/dist/reachability/index.js +121 -83
  131. package/dist/reachability/index.js.map +1 -1
  132. package/dist/reachability/reachability.types.js +2 -0
  133. package/dist/reachability/reachability.types.js.map +1 -1
  134. package/dist/reachability/util.js +45 -0
  135. package/dist/reachability/util.js.map +1 -1
  136. package/dist/reactions/reactions.type.js.map +1 -1
  137. package/dist/recording-controller/index.js +1 -3
  138. package/dist/recording-controller/index.js.map +1 -1
  139. package/dist/roap/turnDiscovery.js +8 -1
  140. package/dist/roap/turnDiscovery.js.map +1 -1
  141. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  142. package/dist/types/config.d.ts +2 -2
  143. package/dist/types/constants.d.ts +13 -1
  144. package/dist/types/controls-options-manager/index.d.ts +16 -0
  145. package/dist/types/hashTree/constants.d.ts +1 -0
  146. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  147. package/dist/types/hashTree/utils.d.ts +7 -0
  148. package/dist/types/index.d.ts +3 -0
  149. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  150. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  151. package/dist/types/locus-info/index.d.ts +106 -8
  152. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  153. package/dist/types/locus-info/types.d.ts +22 -1
  154. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  155. package/dist/types/media/properties.d.ts +6 -2
  156. package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
  157. package/dist/types/meeting/index.d.ts +176 -11
  158. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  159. package/dist/types/meeting/request.d.ts +1 -0
  160. package/dist/types/meeting/util.d.ts +9 -0
  161. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  162. package/dist/types/meetings/index.d.ts +40 -19
  163. package/dist/types/meetings/meetings.types.d.ts +15 -0
  164. package/dist/types/meetings/request.d.ts +14 -0
  165. package/dist/types/member/index.d.ts +1 -0
  166. package/dist/types/member/types.d.ts +1 -0
  167. package/dist/types/member/util.d.ts +9 -0
  168. package/dist/types/members/index.d.ts +15 -2
  169. package/dist/types/members/util.d.ts +1 -5
  170. package/dist/types/metrics/constants.d.ts +6 -0
  171. package/dist/types/multistream/codec/constants.d.ts +7 -0
  172. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  173. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  174. package/dist/types/reachability/index.d.ts +10 -3
  175. package/dist/types/reachability/reachability.types.d.ts +7 -0
  176. package/dist/types/reachability/util.d.ts +17 -0
  177. package/dist/types/reactions/reactions.type.d.ts +3 -0
  178. package/dist/webinar/index.js +307 -161
  179. package/dist/webinar/index.js.map +1 -1
  180. package/package.json +23 -23
  181. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  182. package/src/aiEnableRequest/index.ts +16 -0
  183. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  184. package/src/annotation/index.ts +6 -4
  185. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  186. package/src/breakouts/breakout.ts +3 -1
  187. package/src/breakouts/events.ts +33 -11
  188. package/src/breakouts/index.ts +122 -2
  189. package/src/common/errors/webex-errors.ts +50 -3
  190. package/src/config.ts +2 -2
  191. package/src/constants.ts +21 -3
  192. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  193. package/src/controls-options-manager/index.ts +62 -10
  194. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  195. package/src/hashTree/constants.ts +7 -0
  196. package/src/hashTree/hashTreeParser.ts +861 -193
  197. package/src/hashTree/utils.ts +19 -0
  198. package/src/index.ts +6 -0
  199. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  200. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  201. package/src/interceptors/locusRetry.ts +25 -4
  202. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  203. package/src/interpretation/index.ts +65 -10
  204. package/src/interpretation/interpretation.types.ts +11 -0
  205. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  206. package/src/locus-info/controlsUtils.ts +3 -1
  207. package/src/locus-info/index.ts +566 -164
  208. package/src/locus-info/infoUtils.ts +41 -6
  209. package/src/locus-info/types.ts +26 -1
  210. package/src/media/MediaConnectionAwaiter.ts +21 -4
  211. package/src/media/ai-docs/media-spec.md +267 -0
  212. package/src/media/index.ts +10 -1
  213. package/src/media/properties.ts +8 -3
  214. package/src/meeting/ai-docs/meeting-spec.md +401 -0
  215. package/src/meeting/in-meeting-actions.ts +12 -0
  216. package/src/meeting/index.ts +937 -119
  217. package/src/meeting/locusMediaRequest.ts +106 -6
  218. package/src/meeting/muteState.ts +10 -1
  219. package/src/meeting/request.ts +11 -0
  220. package/src/meeting/util.ts +51 -7
  221. package/src/meeting/voicea-meeting.ts +1 -1
  222. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  223. package/src/meeting-info/meeting-info-v2.ts +10 -4
  224. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  225. package/src/meetings/index.ts +200 -80
  226. package/src/meetings/meetings.types.ts +19 -0
  227. package/src/meetings/request.ts +43 -0
  228. package/src/meetings/util.ts +117 -4
  229. package/src/member/ai-docs/member-spec.md +196 -0
  230. package/src/member/index.ts +10 -0
  231. package/src/member/types.ts +1 -0
  232. package/src/member/util.ts +29 -0
  233. package/src/members/ai-docs/members-spec.md +256 -0
  234. package/src/members/index.ts +70 -7
  235. package/src/members/util.ts +12 -4
  236. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  237. package/src/metrics/constants.ts +6 -0
  238. package/src/multistream/ai-docs/multistream-spec.md +292 -0
  239. package/src/multistream/codec/constants.ts +58 -0
  240. package/src/multistream/mediaRequestManager.ts +119 -28
  241. package/src/multistream/receiveSlot.ts +18 -0
  242. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  243. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  244. package/src/reachability/clusterReachability.ts +3 -2
  245. package/src/reachability/index.ts +47 -16
  246. package/src/reachability/reachability.types.ts +11 -0
  247. package/src/reachability/util.ts +36 -0
  248. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  249. package/src/reactions/reactions.type.ts +3 -0
  250. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  251. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  252. package/src/recording-controller/index.ts +1 -2
  253. package/src/roap/ai-docs/roap-spec.md +241 -0
  254. package/src/roap/turnDiscovery.ts +9 -1
  255. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  256. package/src/webinar/index.ts +216 -38
  257. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  258. package/test/unit/spec/annotation/index.ts +3 -3
  259. package/test/unit/spec/breakouts/breakout.ts +9 -3
  260. package/test/unit/spec/breakouts/events.ts +120 -2
  261. package/test/unit/spec/breakouts/index.ts +223 -3
  262. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  263. package/test/unit/spec/controls-options-manager/index.js +139 -32
  264. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  265. package/test/unit/spec/hashTree/utils.ts +37 -0
  266. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  267. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  268. package/test/unit/spec/interpretation/index.ts +119 -4
  269. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  270. package/test/unit/spec/locus-info/index.js +1014 -58
  271. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  272. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  273. package/test/unit/spec/media/index.ts +92 -0
  274. package/test/unit/spec/media/properties.ts +23 -23
  275. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  276. package/test/unit/spec/meeting/index.js +2811 -117
  277. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  278. package/test/unit/spec/meeting/muteState.js +81 -0
  279. package/test/unit/spec/meeting/request.js +12 -0
  280. package/test/unit/spec/meeting/utils.js +179 -16
  281. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  282. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  283. package/test/unit/spec/meetings/index.js +544 -49
  284. package/test/unit/spec/meetings/request.js +141 -0
  285. package/test/unit/spec/meetings/utils.js +402 -51
  286. package/test/unit/spec/member/index.js +7 -0
  287. package/test/unit/spec/member/util.js +89 -0
  288. package/test/unit/spec/members/index.js +216 -0
  289. package/test/unit/spec/members/request.js +37 -1
  290. package/test/unit/spec/members/utils.js +63 -0
  291. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  292. package/test/unit/spec/reachability/index.ts +128 -46
  293. package/test/unit/spec/reachability/util.ts +31 -0
  294. package/test/unit/spec/recording-controller/index.js +9 -8
  295. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  296. package/test/unit/spec/webinar/index.ts +332 -31
@@ -0,0 +1,256 @@
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
+ # INTERPRETATION — 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/interpretation/`.
13
+
14
+ ## Metadata
15
+
16
+ | Field | Value |
17
+ |---|---|
18
+ | Module id | `interpretation` |
19
+ | Source path(s) | `src/interpretation/` |
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 simultaneous-interpretation guide | overview / API / behavior / tests | used and verified; attendee, host, interpreter, language, and handoff flows were placed into requirements, state, use cases, and failures |
36
+ | Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
37
+
38
+ ## Overview
39
+
40
+ `src/interpretation/` contains 5 direct source/reference file(s) and has 3 mirrored unit-test file(s). This spec separates its public operations, runtime data movement, component ownership, state applicability, and verification boundary.
41
+
42
+ ## Purpose / Responsibility
43
+
44
+ Owns simultaneous-interpretation language state, interpreter collections, direction changes, and interpreter handoff request/approval workflows.
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/interpretation/
54
+ ├── README.md — retained legacy reference input
55
+ ├── collection.ts — module-owned collection
56
+ ├── index.ts — module facade/controller or primary exports
57
+ ├── interpretation.types.ts — module type declarations
58
+ ├── siLanguage.ts — siLanguage implementation responsibility
59
+ └── ai-docs/interpretation-spec.md — canonical module specification
60
+ ```
61
+
62
+ ## Key Files (source of truth)
63
+
64
+ | File | Holds |
65
+ |---|---|
66
+ | `src/interpretation/README.md` | retained legacy reference input |
67
+ | `src/interpretation/collection.ts` | module-owned collection |
68
+ | `src/interpretation/index.ts` | module facade/controller or primary exports |
69
+ | `src/interpretation/interpretation.types.ts` | module type declarations |
70
+ | `src/interpretation/siLanguage.ts` | siLanguage implementation responsibility |
71
+ | `test/unit/spec/interpretation/collection.ts` and 2 sibling test file(s) | mirrored characterization/unit coverage |
72
+
73
+ ## Public Surface
74
+
75
+ | Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
76
+ |---|---|---|---|---|---|---|
77
+ | `interpretation.1` | SDK / lifecycle | `initialize()`, `cleanUp()`, `locusUrlUpdate()`, `approvalUrlUpdate()`, `updateCanManageInterpreters()`, `updateHostSIEnabled()`, `updateMeetingSIEnabled()`, `updateInterpretation()`, and `updateSelfInterpretation()` | Maintain meeting-scoped interpretation configuration and Mercury handoff listener ownership. | `initialize()` installs the listener before self-participant context may be available; cleanup removes it. | `src/interpretation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
78
+ | `interpretation.2` | SDK / remote | `querySupportLanguages()` and `getTargetLanguageCode()` | Fetch supported languages and map the current source/target direction to its code. | Preserve collection replacement and language-code matching behavior. | `src/interpretation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
79
+ | `interpretation.3` | SDK / remote | `getInterpreters()` and `updateInterpreters()` | Query and mutate interpreter assignments through the current Locus interpretation URL. | Preserve request bodies and caller-visible request rejection; these methods do not preflight capability or a missing `locusUrl`. | `src/interpretation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
80
+ | `interpretation.4` | SDK / remote | `changeDirection()` | Change the configured interpretation direction for the supported current participant context. | Do not imply a separate attendee direction API that code does not expose. | `src/interpretation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
81
+ | `interpretation.5` | SDK / event/remote | `listenToHandoffRequests()`, `handoffInterpreter()`, `requestHandoff()`, `acceptRequest()`, and `declineRequest()` | Receive and act on interpreter handoff approval requests using participant and approval URLs. | Preserve event filtering as implemented; the Mercury callback does not compare `locusUrl`. | `src/interpretation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
82
+ | `interpretation.6` | exported types/models | `InterpreterUsingResource`, `Interpreter`, `SILanguage`, and `SILanguageCollection` | Represent supported-language and interpreter-resource data used by the controller and consumers. | Add fields compatibly; language collection identity remains code-driven. | `src/interpretation/interpretation.types.ts`, `src/interpretation/siLanguage.ts`, `src/interpretation/collection.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
83
+
84
+ ### Emitted events
85
+
86
+ Current source emits or forwards these observable literals for this operation boundary. Preserve literal values, scope, payload shape, and emission timing; a constant name alone is not a substitute for the consumer-visible value.
87
+
88
+ | Event literal | Constant / expression | Emission evidence |
89
+ |---|---|---|
90
+ | `HANDOFF_REQUESTS_ARRIVED` | `INTERPRETATION.EVENTS.HANDOFF_REQUESTS_ARRIVED` | `src/interpretation/index.ts` |
91
+ | `meeting:interpretation:handoffRequestsArrived` | `EVENT_TRIGGERS.MEETING_INTERPRETATION_HANDOFF_REQUESTS_ARRIVED` | `src/meeting/index.ts` |
92
+ | `meeting:interpretation:supportLanguagesUpdate` | `EVENT_TRIGGERS.MEETING_INTERPRETATION_SUPPORT_LANGUAGES_UPDATE` | `src/meeting/index.ts` |
93
+ | `meeting:interpretation:update` | `EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE` | `src/meeting/index.ts`, `src/meeting/util.ts` |
94
+ | `SUPPORT_LANGUAGES_UPDATE` | `INTERPRETATION.EVENTS.SUPPORT_LANGUAGES_UPDATE` | `src/interpretation/index.ts` |
95
+
96
+ Compatibility notes:
97
+ - Prefer additive fields/options and preserve current rejection/event/cleanup semantics. Internal helpers are not public merely because they are exported within the source directory.
98
+
99
+ ## Requires (dependencies)
100
+
101
+ Parent Meeting/Locus state, approval URL, interpretation collections/types, member/self identity, request access, and scoped events.
102
+
103
+ ## Requirements
104
+
105
+ | ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
106
+ |---|---|---|---|---|---|---|
107
+ | `INTERPRETATION-R-001` | query supported languages and expose interpretation state. | Owns simultaneous-interpretation language state, interpreter collections, direction changes, and interpreter handoff request/approval workflows. | `src/interpretation/index.ts` | `test/unit/spec/interpretation/index.ts` | none | PRESENT |
108
+ | `INTERPRETATION-R-002` | change attendee/interpreter language direction. | Language-direction and interpreter-assignment bodies must match the current Locus interpretation contract. | `src/interpretation/index.ts`, `src/interpretation/siLanguage.ts` | `test/unit/spec/interpretation/index.ts` | listener initialization before self id and absent Locus-URL filtering need characterization | PRESENT |
109
+ | `INTERPRETATION-R-003` | HTTP failures reject their operations; `initialize()` installs the handoff Mercury listener immediately, before self participant id may be available, and `cleanUp()` removes owned listeners. The callback filters resource/participant roles but does not compare Locus URL. | Handoff listeners and request failures must reflect actual initialization/filter/cleanup behavior rather than an invented subscription or Locus guard. | `src/interpretation/index.ts` | `test/unit/spec/interpretation/index.ts` | listener-before-self and cross-Locus same-participant behavior need characterization | PRESENT |
110
+
111
+ ## Design Overview
112
+
113
+ The controller maintains simultaneous-interpretation languages and participant role state, uses `collection.ts` and `siLanguage.ts` for language objects, calls the active Locus URLs directly, and filters Mercury handoff approval events by resource and self sender/receiver roles without comparing Locus URL.
114
+
115
+ ## Data Flow
116
+
117
+ ```mermaid
118
+ flowchart LR
119
+ Locus[Locus interpretation state / URLs] --> Controller[index.ts]
120
+ Controller --> Languages[collection.ts]
121
+ Languages --> Language[siLanguage.ts]
122
+ Caller[Meeting / interpreter] --> Controller
123
+ Controller --> Service[HTTP interpretation and approval URLs]
124
+ Mercury[handoff approval events] --> Controller
125
+ Controller --> Events[support-language / handoff events]
126
+ ```
127
+
128
+ ## Sequence Diagram(s)
129
+
130
+ Sequence coverage:
131
+
132
+ | Operation group | Diagram | Failure coverage |
133
+ |---|---|---|
134
+ | UC-1…UC-4 — interpretation and handoff operation groups | Interpretation and handoff primary sequence | unsupported language/direction, handoff request rejection, unrelated event handling, and listener cleanup |
135
+ | UC-1…UC-4 — interpretation and handoff alternate/failure paths | Interpretation and handoff alternate/failure sequence | explicit language/participant/approval validation, unguarded Locus-URL interpolation, or request rejection |
136
+
137
+ ### Interpretation and handoff primary sequence
138
+
139
+ ```mermaid
140
+ sequenceDiagram
141
+ participant C as Interpreter or meeting
142
+ participant I as Interpretation index.ts
143
+ participant H as Locus / approval URL
144
+ participant M as Mercury
145
+ C->>I: set language or handoff action
146
+ I->>I: resolve current role, participant, and URL
147
+ I->>H: HTTP action
148
+ H-->>I: response or rejection
149
+ M-->>I: handoff approval update
150
+ I->>I: filter resourceType and sender/receiver against selfParticipantId
151
+ I-->>C: promise result or handoff event
152
+ ```
153
+
154
+ ### Interpretation and handoff alternate/failure sequence
155
+
156
+ ```mermaid
157
+ sequenceDiagram
158
+ participant M as Mercury
159
+ participant I as Interpretation
160
+ participant C as Meeting / interpreter
161
+ M-->>I: handoff approval event
162
+ I->>I: compare resourceType and sender/receiver participant ids
163
+ alt self is sender or first receiver
164
+ I-->>C: emit the scoped handoff event
165
+ else unrelated approval
166
+ I->>I: ignore the event
167
+ end
168
+ ```
169
+
170
+ ## Class / Component Relationships
171
+
172
+ ```mermaid
173
+ classDiagram
174
+ class Locus
175
+ class Controller
176
+ class Languages
177
+ class Language
178
+ class Caller
179
+ class Service
180
+ class Mercury
181
+ class Events
182
+ Locus --> Controller
183
+ Controller --> Languages
184
+ Languages --> Language
185
+ Caller --> Controller
186
+ Controller --> Service
187
+ Mercury --> Controller
188
+ Controller --> Events
189
+ ```
190
+
191
+ The arrows identify ownership and delegation inside `src/interpretation/`; files that only declare types or constants are not presented as transports.
192
+
193
+ ## Use Cases
194
+
195
+ - **UC-1:** Initialize meeting-scoped interpretation state and the handoff listener, then remove owned listener state during cleanup. Evidence: `src/interpretation/index.ts`.
196
+ - **UC-2:** Refresh supported-language objects from Locus and resolve the target language code for the current interpretation direction. Evidence: `src/interpretation/index.ts`, `src/interpretation/siLanguage.ts`.
197
+ - **UC-3:** Query/update interpreter assignments or change direction using the current interpretation URL and capability context. Evidence: `src/interpretation/index.ts`.
198
+ - **UC-4:** Offer, request, accept, decline, or relinquish an interpreter handoff against the current participant and approval URLs, without assuming an unimplemented Locus-URL event filter. Evidence: `src/interpretation/index.ts`.
199
+
200
+ ## State Model
201
+
202
+ Supported languages, interpreters, self interpretation/direction, host/meeting enablement, management capability, and handoff listeners are meeting scoped.
203
+
204
+ ## Business Rules & Invariants
205
+
206
+ - Direction and handoff actions require current language/interpreter/self data; only the intended approver/requester transition is applied; cleanup removes approval listeners. Enforced under `src/interpretation/`.
207
+
208
+ ## Concurrency & Reactive Flow
209
+
210
+ - `initialize()` installs the Mercury subscription immediately, before `selfParticipantId` may be populated. Each callback reads the current id and filters only `resourceType` plus first-receiver/sender participant ids; it performs no Locus-URL comparison. Language and handoff HTTP operations settle their own returned promises.
211
+
212
+ ## State Machine
213
+
214
+ ```mermaid
215
+ stateDiagram-v2
216
+ [*] --> inactive
217
+ inactive --> active: Locus projects self as active interpreter
218
+ active --> inactive: handoff accepted or role removed
219
+ inactive --> inactive: request / decline without role activation
220
+ ```
221
+
222
+ The active/inactive projection is the concrete `isActive` state maintained in `src/interpretation/index.ts`.
223
+
224
+ ## Error Handling & Failure Modes
225
+
226
+ | Condition | Signal | Caller recovery |
227
+ |---|---|---|
228
+ | `changeDirection()`, `handoffInterpreter()`, `requestHandoff()`, `acceptRequest()`, or `declineRequest()` lacks the input each method explicitly guards | The method returns a rejected promise before issuing its request. | Supply the language, participant, approval URL, or decision URL required by that operation. |
229
+ | `querySupportLanguages()`, `getInterpreters()`, or `updateInterpreters()` runs without `locusUrl` | No local pre-rejection occurs; the method builds a URI containing the current value (including `undefined`) and invokes `request()`. | Establish current Locus context before calling and handle the actual request outcome. |
230
+ | Interpretation or handoff HTTP request rejects | The same failure is logged and rethrown to the caller. | Handle the service rejection; retry only as a new caller operation. |
231
+ | Mercury approval has another resource type, or self is neither its first receiver nor its sender | The subscribed controller ignores it and emits no handoff event. A same-participant approval from another Locus is not filtered locally. | No caller action for a participant mismatch; consumers must not rely on this controller for Locus scoping. |
232
+
233
+ ## Pitfalls
234
+
235
+ - Host-enabled, meeting-enabled, and self-interpreter state are distinct. Collapsing them yields incorrect controls and handoff eligibility.
236
+ - Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
237
+
238
+ ## Module Do's / Don'ts
239
+
240
+ - DO preserve this boundary: Refresh supported-language objects from Locus and notify consumers when the catalog changes.
241
+ - DON'T move remote I/O or lifecycle ownership into a passive type, constant, catalog, or normalization file.
242
+
243
+ ## Test-Case Strategy (module)
244
+
245
+ Use the current mirrored suites: `test/unit/spec/interpretation/collection.ts`, `test/unit/spec/interpretation/index.ts`, `test/unit/spec/interpretation/siLanguage.ts`. Characterize the interpretation-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
246
+
247
+ | Behavior / Requirement | Existing test evidence | Gap |
248
+ |---|---|---|
249
+ | `INTERPRETATION-R-001` | `test/unit/spec/interpretation/index.ts` | cover initialization, language catalog, interpreter assignments, direction, and handoff families |
250
+ | `INTERPRETATION-R-002` | `test/unit/spec/interpretation/index.ts` | cover language-code resolution plus each interpreter-assignment and direction request body |
251
+ | `INTERPRETATION-R-003` | `test/unit/spec/interpretation/index.ts` | characterize listener installation before self id, absent Locus filtering, and exact cleanup removal |
252
+
253
+ ## Traceability
254
+
255
+ - Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
256
+ - Coverage state and contracts baseline: `../../../.sdd/manifest.json`
@@ -4,8 +4,10 @@
4
4
  import {WebexPlugin} from '@webex/webex-core';
5
5
  import LoggerProxy from '../common/logs/logger-proxy';
6
6
  import {HTTP_VERBS, INTERPRETATION, LOCUSEVENT, MEETINGS} from '../constants';
7
+ import MeetingUtil from '../meeting/util';
7
8
 
8
9
  import SILanguageCollection from './collection';
10
+ import {Interpreter} from './interpretation.types';
9
11
 
10
12
  /**
11
13
  * @class SimultaneousInterpretation
@@ -31,6 +33,7 @@ const SimultaneousInterpretation = WebexPlugin.extend({
31
33
  meetingSIEnabled: 'boolean', // appears the meeting support SI feature
32
34
  hostSIEnabled: 'boolean', // appears the meeting host/interpreter feature of SI enabled
33
35
  selfIsInterpreter: 'boolean', // current user is interpreter or not
36
+ siEnabled: 'boolean', // appears SI is currently enabled in the meeting (from locus controls)
34
37
  },
35
38
  derived: {
36
39
  shouldQuerySupportLanguages: {
@@ -112,10 +115,15 @@ const SimultaneousInterpretation = WebexPlugin.extend({
112
115
  /**
113
116
  * Update the interpretation languages channels which user can choose to subscribe
114
117
  * @param {Object} interpretation
118
+ * @param {Object} [options]
119
+ * @param {boolean} [options.preserveSiEnabled] keep the current siEnabled untouched (meeting-info path)
115
120
  * @returns {void}
116
121
  */
117
- updateInterpretation(interpretation) {
122
+ updateInterpretation(interpretation, {preserveSiEnabled = false} = {}) {
118
123
  this.siLanguages.set(interpretation?.siLanguages || []);
124
+ if (!preserveSiEnabled) {
125
+ this.set('siEnabled', !!interpretation?.siEnabled);
126
+ }
119
127
  },
120
128
  /**
121
129
  * Update self's interpretation information (self is interpreter)
@@ -182,7 +190,9 @@ const SimultaneousInterpretation = WebexPlugin.extend({
182
190
  * @param {Array} interpreters
183
191
  * @returns {Promise}
184
192
  */
185
- updateInterpreters(interpreters) {
193
+ updateInterpreters(interpreters: Interpreter[]) {
194
+ const meeting = this.webex.meetings.meetingCollection.getByKey('locusUrl', this.locusUrl);
195
+
186
196
  return this.request({
187
197
  method: HTTP_VERBS.PATCH,
188
198
  uri: `${this.locusUrl}/controls`,
@@ -191,10 +201,47 @@ const SimultaneousInterpretation = WebexPlugin.extend({
191
201
  interpreters,
192
202
  },
193
203
  },
194
- }).catch((error) => {
195
- LoggerProxy.logger.error('Meeting:interpretation#updateInterpreters failed', error);
196
- throw error;
197
- });
204
+ })
205
+ .then((response) => {
206
+ MeetingUtil.updateLocusFromApiResponse(meeting, response);
207
+
208
+ return response;
209
+ })
210
+ .catch((error) => {
211
+ LoggerProxy.logger.error('Meeting:interpretation#updateInterpreters failed', error);
212
+ throw error;
213
+ });
214
+ },
215
+ /**
216
+ * End simultaneous interpretation in the meeting. Only the host is allowed to call this api.
217
+ * Locus clears SI subscriptions, removes interpreters and their interpreter roles.
218
+ * It cannot be re-enabled during the current meeting.
219
+ * @returns {Promise}
220
+ */
221
+ endSimultaneousInterpretation() {
222
+ const meeting = this.webex.meetings.meetingCollection.getByKey('locusUrl', this.locusUrl);
223
+
224
+ return this.request({
225
+ method: HTTP_VERBS.PATCH,
226
+ uri: `${this.locusUrl}/controls`,
227
+ body: {
228
+ interpretation: {
229
+ siEnabled: false,
230
+ },
231
+ },
232
+ })
233
+ .then((response) => {
234
+ MeetingUtil.updateLocusFromApiResponse(meeting, response);
235
+
236
+ return response;
237
+ })
238
+ .catch((error) => {
239
+ LoggerProxy.logger.error(
240
+ 'Meeting:interpretation#endSimultaneousInterpretation failed',
241
+ error
242
+ );
243
+ throw error;
244
+ });
198
245
  },
199
246
  /**
200
247
  * Change direction of interpretation for an interpreter participant
@@ -209,6 +256,8 @@ const SimultaneousInterpretation = WebexPlugin.extend({
209
256
  return Promise.reject(new Error('Missing self participant id'));
210
257
  }
211
258
 
259
+ const meeting = this.webex.meetings.meetingCollection.getByKey('locusUrl', this.locusUrl);
260
+
212
261
  return this.request({
213
262
  method: HTTP_VERBS.PATCH,
214
263
  uri: `${this.locusUrl}/participant/${this.selfParticipantId}/controls`,
@@ -220,10 +269,16 @@ const SimultaneousInterpretation = WebexPlugin.extend({
220
269
  order: this.order,
221
270
  },
222
271
  },
223
- }).catch((error) => {
224
- LoggerProxy.logger.error('Meeting:interpretation#changeDirection failed', error);
225
- throw error;
226
- });
272
+ })
273
+ .then((response) => {
274
+ MeetingUtil.updateLocusFromApiResponse(meeting, response);
275
+
276
+ return response;
277
+ })
278
+ .catch((error) => {
279
+ LoggerProxy.logger.error('Meeting:interpretation#changeDirection failed', error);
280
+ throw error;
281
+ });
227
282
  },
228
283
  /**
229
284
  * Sets up a listener for handoff requests from mercury
@@ -0,0 +1,11 @@
1
+ export type InterpreterUsingResource = {
2
+ id: string;
3
+ email?: string;
4
+ };
5
+
6
+ export type Interpreter = {
7
+ order: number;
8
+ sourceLanguage: string;
9
+ targetLanguage: string;
10
+ usingResource: InterpreterUsingResource;
11
+ };