@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,236 @@
|
|
|
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
|
+
# ANNOTATION — 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/annotation/`.
|
|
13
|
+
|
|
14
|
+
## Metadata
|
|
15
|
+
|
|
16
|
+
| Field | Value |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Module id | `annotation` |
|
|
19
|
+
| Source path(s) | `src/annotation/` |
|
|
20
|
+
| Parent spec | — |
|
|
21
|
+
| Doc kind | Module spec |
|
|
22
|
+
| Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
|
|
23
|
+
| Generated from | `module-spec` @ SDLC template library `0.2.2` |
|
|
24
|
+
| generated_by / approved_by / updated_at | codex / repository user / 2026-08-22T15:21:29Z |
|
|
25
|
+
| Validation status | pass-with-warnings |
|
|
26
|
+
|
|
27
|
+
## Evidence Rules
|
|
28
|
+
|
|
29
|
+
Requirements cite current source and mirrored tests. Current code wins over retained prose when they conflict; commit and PR history are excluded. Missing evidence stays a gap.
|
|
30
|
+
|
|
31
|
+
## Source Material Register
|
|
32
|
+
|
|
33
|
+
| Source material | Scope | Decision | Detail location or disposition |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| No routed legacy module spec | overview / API / behavior / tests | none; generated from current annotation controller/types/constants and tests |
|
|
36
|
+
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
37
|
+
|
|
38
|
+
## Overview
|
|
39
|
+
|
|
40
|
+
`src/annotation/` contains 3 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
|
+
Owns annotation approval requests, Mercury/LLM listener registration, encrypted stroke relay, and the emitted annotation command/stroke events.
|
|
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/annotation/
|
|
54
|
+
├── annotation.types.ts — module type declarations
|
|
55
|
+
├── constants.ts — module constants and wire values
|
|
56
|
+
├── index.ts — module facade/controller or primary exports
|
|
57
|
+
└── ai-docs/annotation-spec.md — canonical module specification
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Key Files (source of truth)
|
|
61
|
+
|
|
62
|
+
| File | Holds |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `src/annotation/annotation.types.ts` | module type declarations |
|
|
65
|
+
| `src/annotation/constants.ts` | module constants and wire values |
|
|
66
|
+
| `src/annotation/index.ts` | module facade/controller or primary exports |
|
|
67
|
+
| `test/unit/spec/annotation/index.ts` | mirrored characterization/unit coverage |
|
|
68
|
+
|
|
69
|
+
## Public Surface
|
|
70
|
+
|
|
71
|
+
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
72
|
+
|---|---|---|---|---|---|---|
|
|
73
|
+
| `annotation.1` | SDK / lifecycle | `locusUrlUpdate()`, `approvalUrlUpdate()`, and `deregisterEvents()` | Store Locus/approval URLs, install listeners from `locusUrlUpdate()`, and remove the exact Mercury/LLM listeners on teardown. | `approvalUrlUpdate()` only assigns `approvalUrl`; preserve the once-only listener guard owned by `locusUrlUpdate()` and the three event topics. | `src/annotation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
74
|
+
| `annotation.2` | SDK / remote | `approveAnnotation()`, `cancelApproveAnnotation()`, and `closeAnnotation()` | POST requested/closed share-annotation actions or PUT cancellation using the current approval context. | Preserve action/resource values, share instance id, and optional receiver routing. | `src/annotation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
75
|
+
| `annotation.3` | SDK / remote | `acceptRequest()` and `declineRequest()` | PUT a presenter decision to the URL carried by an incoming approval. | Preserve the accepted/declined action values and direct request-promise result. | `src/annotation/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
76
|
+
| `annotation.4` | SDK / relay | `sendStrokeData()` and `ANNOTATION_STROKE_DATA` | Encrypt outbound stroke content, publish it on the selected LLM socket, decrypt inbound content, and emit the scoped stroke event. | Preserve sequence increments, relay/message fields, and the initial disconnected no-op. | `src/annotation/index.ts`, `src/annotation/constants.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
77
|
+
| `annotation.5` | exported constants/types | `EVENT_TRIGGERS`, `ANNOTATION_RESOURCE_TYPE`, `ANNOTATION_RELAY_TYPES`, `ANNOTATION_STATUS`, `ANNOTATION_POLICY`, `ANNOTATION_REQUEST_TYPE`, `ANNOTATION_ACTION_TYPE`, `ANNOTATION`, `StrokeData`, `RequestData`, `CommandRequestBody`, `IAnnotationChannel`, and `AnnotationInfo` | Share the exact approval and relay vocabulary used by Meeting, Webinar, and consumers. | Add fields compatibly; existing raw action, relay, resource, and event values are wire-sensitive. | `src/annotation/constants.ts`, `src/annotation/annotation.types.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
78
|
+
|
|
79
|
+
### Emitted events
|
|
80
|
+
|
|
81
|
+
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.
|
|
82
|
+
|
|
83
|
+
| Event literal | Constant / expression | Emission evidence |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| `annotation:command` | `EVENT_TRIGGERS.ANNOTATION_COMMAND` | `src/annotation/index.ts` |
|
|
86
|
+
| `annotation:strokeData` | `EVENT_TRIGGERS.ANNOTATION_STROKE_DATA` | `src/annotation/index.ts` |
|
|
87
|
+
| `meeting:updateAnnotationInfo` | `EVENT_TRIGGERS.MEETING_UPDATE_ANNOTATION_INFO` | `src/meeting/index.ts` |
|
|
88
|
+
|
|
89
|
+
Compatibility notes:
|
|
90
|
+
- 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.
|
|
91
|
+
|
|
92
|
+
## Requires (dependencies)
|
|
93
|
+
|
|
94
|
+
Approval and Locus URLs, Mercury, LLM sockets/bindings, Webex encryption, annotation constants/types, and participant/device/share identity supplied by callers.
|
|
95
|
+
|
|
96
|
+
## Requirements
|
|
97
|
+
|
|
98
|
+
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
99
|
+
|---|---|---|---|---|---|---|
|
|
100
|
+
| `ANNOTATION-R-001` | `locusUrlUpdate()` assigns `locusUrl` and registers the Mercury approval listener plus default/practice-session LLM relay listeners once; `approvalUrlUpdate()` only assigns `approvalUrl`; `deregisterEvents()` removes the callbacks and clears the subscription flag. | Duplicate subscriptions would emit the same annotation event more than once, while attributing registration to the approval URL setter invents a side effect. | `src/annotation/index.ts` | `test/unit/spec/annotation/index.ts` | none | PRESENT |
|
|
101
|
+
| `ANNOTATION-R-002` | Approval methods send the declared action/resource body to the supplied approval URL; stroke sends encrypt content, choose the connected practice-session socket or default socket, and increment `seqNum` after publication. | Approval routing and relay sequence fields are service-visible protocol values and must remain stable. | `src/annotation/index.ts`, `src/annotation/annotation.types.ts` | `test/unit/spec/annotation/index.ts` | late socket selection after encryption and rejected encryption/decryption promises need explicit race/error coverage | PRESENT |
|
|
102
|
+
| `ANNOTATION-R-003` | Approval methods return their request promises; disconnected stroke sends return without work; stroke encryption/decryption uses asynchronous callbacks without a returned caller promise or module retry; deregistration removes the installed Mercury/LLM callbacks. | Callers must not assume encryption failures are converted into approval-style promise rejections or that disconnected strokes are queued. | `src/annotation/` | `test/unit/spec/annotation/index.ts` | none | PRESENT |
|
|
103
|
+
|
|
104
|
+
## Design Overview
|
|
105
|
+
|
|
106
|
+
The controller subscribes directly to Mercury approval and LLM relay events, performs approval HTTP operations, and encrypts/decrypts relay content before exposing annotation command/stroke events.
|
|
107
|
+
|
|
108
|
+
## Data Flow
|
|
109
|
+
|
|
110
|
+
```mermaid
|
|
111
|
+
flowchart LR
|
|
112
|
+
Locus[Locus approval events] --> Controller[index.ts]
|
|
113
|
+
Caller[Meeting / annotation consumer] --> Controller
|
|
114
|
+
Controller --> Approval[HTTP approvalUrl]
|
|
115
|
+
Controller --> Crypto[Webex encryption]
|
|
116
|
+
Crypto --> LLM[LLM relay WebSocket]
|
|
117
|
+
LLM --> Controller
|
|
118
|
+
Controller --> Events[annotation command / stroke events]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Sequence Diagram(s)
|
|
122
|
+
|
|
123
|
+
Sequence coverage:
|
|
124
|
+
|
|
125
|
+
| Operation group | Diagram | Failure coverage |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| UC-1…UC-4 — annotation approval and relay operation groups | Annotation approval and relay primary sequence | approval HTTP rejection, disconnected relay skip, and asynchronous encryption/decryption failure |
|
|
128
|
+
| UC-2 — approval and disconnected-send behavior | Annotation approval and relay alternate/failure sequence | request rejection or initial LLM connectivity false |
|
|
129
|
+
|
|
130
|
+
### Annotation approval and relay primary sequence
|
|
131
|
+
|
|
132
|
+
```mermaid
|
|
133
|
+
sequenceDiagram
|
|
134
|
+
participant C as Annotation consumer
|
|
135
|
+
participant A as Annotation index.ts
|
|
136
|
+
participant E as Encryption
|
|
137
|
+
participant L as LLM relay socket
|
|
138
|
+
C->>A: send command or stroke data
|
|
139
|
+
A->>E: encrypt relay payload
|
|
140
|
+
E-->>A: encrypted content
|
|
141
|
+
A->>L: socket.send relay event
|
|
142
|
+
L-->>A: relay event
|
|
143
|
+
A->>E: decrypt content
|
|
144
|
+
E-->>A: annotation payload
|
|
145
|
+
A-->>C: scoped annotation event
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Annotation approval and relay alternate/failure sequence
|
|
149
|
+
|
|
150
|
+
```mermaid
|
|
151
|
+
sequenceDiagram
|
|
152
|
+
participant C as Annotation consumer
|
|
153
|
+
participant A as Annotation index.ts
|
|
154
|
+
participant H as Webex request / LLM
|
|
155
|
+
alt approval action
|
|
156
|
+
C->>A: accept / decline / request / cancel / close
|
|
157
|
+
A->>H: HTTP request with action/resource body
|
|
158
|
+
H-->>C: returned request promise outcome
|
|
159
|
+
else sendStrokeData while LLM disconnected
|
|
160
|
+
C->>A: sendStrokeData(stroke)
|
|
161
|
+
A-->>C: return without encryption or socket send
|
|
162
|
+
end
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Class / Component Relationships
|
|
166
|
+
|
|
167
|
+
```mermaid
|
|
168
|
+
classDiagram
|
|
169
|
+
class Locus
|
|
170
|
+
class Controller
|
|
171
|
+
class Caller
|
|
172
|
+
class Approval
|
|
173
|
+
class Crypto
|
|
174
|
+
class LLM
|
|
175
|
+
class Events
|
|
176
|
+
Locus --> Controller
|
|
177
|
+
Caller --> Controller
|
|
178
|
+
Controller --> Approval
|
|
179
|
+
Controller --> Crypto
|
|
180
|
+
Crypto --> LLM
|
|
181
|
+
LLM --> Controller
|
|
182
|
+
Controller --> Events
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The arrows identify ownership and delegation inside `src/annotation/`; files that only declare types or constants are not presented as transports.
|
|
186
|
+
|
|
187
|
+
## Use Cases
|
|
188
|
+
|
|
189
|
+
- **UC-1:** Register the approval and default/practice-session relay listeners once when `locusUrlUpdate()` establishes context; update `approvalUrl` independently without registering listeners, then remove installed listeners with `deregisterEvents()`. Evidence: `src/annotation/index.ts`.
|
|
190
|
+
- **UC-2:** Request, cancel, or close annotation for a share instance, optionally routing the request to a specific participant/device. Evidence: `src/annotation/index.ts`.
|
|
191
|
+
- **UC-3:** Accept or decline a presenter approval request by PUTting the exact action to the event-provided URL. Evidence: `src/annotation/index.ts`.
|
|
192
|
+
- **UC-4:** Skip a stroke while LLM is disconnected; otherwise encrypt, select the current practice/default socket after encryption, publish with the next sequence, then decrypt and emit received stroke data. Evidence: `src/annotation/index.ts`.
|
|
193
|
+
|
|
194
|
+
## State Model
|
|
195
|
+
|
|
196
|
+
The controller stores `seqNum`, `hasSubscribedToEvents`, `approvalUrl`, `locusUrl`, and `deviceUrl`. `seqNum` starts at 1 and increments after each published stroke; `hasSubscribedToEvents` only records whether this controller installed its Mercury/LLM callbacks. The module does not transition between `NO_ANNOTATION` and `RUNNING_ANNOTATION`; those constants are not consumed by current source or tests.
|
|
197
|
+
|
|
198
|
+
## Business Rules & Invariants
|
|
199
|
+
|
|
200
|
+
- Approval calls use their supplied approval URL and declared action/resource values. Stroke publication is skipped only when the initial LLM connectivity check is false; relay types and sequence fields use the declared wire values. Enforced under `src/annotation/`.
|
|
201
|
+
|
|
202
|
+
## Concurrency & Reactive Flow
|
|
203
|
+
|
|
204
|
+
- Stroke encryption completes asynchronously. `sendStrokeData` checks LLM connectivity before encryption, while `publishEncrypted` selects the current practice-session/default socket when encryption resolves; the controller has no cancellation or supersession guard.
|
|
205
|
+
|
|
206
|
+
## Protocol / Wire Format
|
|
207
|
+
|
|
208
|
+
- `index.ts` constructs approval bodies and LLM `publishRequest` envelopes from the request/event/channel types and constants under `src/annotation/`. Preserve action/resource/relay values, receiver and route fields, sequence fields, and encryption metadata.
|
|
209
|
+
|
|
210
|
+
## Error Handling & Failure Modes
|
|
211
|
+
|
|
212
|
+
| Condition | Signal | Caller recovery |
|
|
213
|
+
|---|---|---|
|
|
214
|
+
| Approval request rejects | The approval method's returned promise rejects with the request failure. | Correct the URL/body or retry under the caller's policy. |
|
|
215
|
+
| LLM is disconnected at the initial stroke-send check | `sendStrokeData` returns `undefined` without encryption or socket send. | Reinvoke only after connectivity is restored. |
|
|
216
|
+
| Stroke encrypt/decrypt rejects | The controller installs no catch and `sendStrokeData` returns no promise, so the failure is not converted into a caller-facing annotation result. | Observe the owning encryption/runtime failure path; do not assume a module retry. |
|
|
217
|
+
|
|
218
|
+
## Pitfalls
|
|
219
|
+
|
|
220
|
+
- `ANNOTATION_STATUS.NO_ANNOTATION` and `RUNNING_ANNOTATION` are declarations only; do not treat them as a live controller lifecycle without a consuming transition path.
|
|
221
|
+
- Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
|
|
222
|
+
|
|
223
|
+
## Test-Case Strategy (module)
|
|
224
|
+
|
|
225
|
+
Use the current mirrored suites: `test/unit/spec/annotation/index.ts`. Characterize the annotation-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
226
|
+
|
|
227
|
+
| Behavior / Requirement | Existing test evidence | Gap |
|
|
228
|
+
|---|---|---|
|
|
229
|
+
| `ANNOTATION-R-001` | `test/unit/spec/annotation/index.ts` | cover every owned Mercury/LLM topic and action/event payload |
|
|
230
|
+
| `ANNOTATION-R-002` | `test/unit/spec/annotation/index.ts` | cover receiver-present and receiver-absent bodies for requested/canceled/closed actions |
|
|
231
|
+
| `ANNOTATION-R-003` | `test/unit/spec/annotation/index.ts` | assert deregistration removes all three owned listeners and a disconnected stroke performs no encryption or send |
|
|
232
|
+
|
|
233
|
+
## Traceability
|
|
234
|
+
|
|
235
|
+
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
236
|
+
- Coverage state and contracts baseline: `../../../.sdd/manifest.json`
|
package/src/annotation/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import uuid from 'uuid';
|
|
2
2
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
3
|
import {WebexPlugin, config} from '@webex/webex-core';
|
|
4
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
4
5
|
import TriggerProxy from '../common/events/trigger-proxy';
|
|
5
6
|
|
|
6
7
|
import {
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
} from './constants';
|
|
14
15
|
|
|
15
16
|
import {StrokeData, RequestData, IAnnotationChannel, CommandRequestBody} from './annotation.types';
|
|
16
|
-
import {HTTP_VERBS, LOCUSEVENT
|
|
17
|
+
import {HTTP_VERBS, LOCUSEVENT} from '../constants';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* @description Annotation to handle LLM and Mercury message and locus API
|
|
@@ -30,6 +31,12 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
30
31
|
locusUrl: string;
|
|
31
32
|
deviceUrl: string;
|
|
32
33
|
|
|
34
|
+
/** Currently registered LLM channel */
|
|
35
|
+
private channel?: LLMChannel;
|
|
36
|
+
|
|
37
|
+
/** Event handler bound to the channel, for cleanup */
|
|
38
|
+
private channelHandler?: (e: any) => void;
|
|
39
|
+
|
|
33
40
|
/**
|
|
34
41
|
* Initializes annotation module
|
|
35
42
|
*/
|
|
@@ -38,6 +45,37 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
38
45
|
this.seqNum = 1;
|
|
39
46
|
}
|
|
40
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Register an LLMChannel with annotation. Only one channel can be registered
|
|
50
|
+
* at a time - the owner is responsible for switching channels when context
|
|
51
|
+
* changes (e.g., entering/leaving practice session).
|
|
52
|
+
* @param {LLMChannel} channel - The LLM channel to register
|
|
53
|
+
* @returns {void}
|
|
54
|
+
*/
|
|
55
|
+
public registerChannel(channel: LLMChannel): void {
|
|
56
|
+
// Unregister existing channel first
|
|
57
|
+
this.unregisterChannel();
|
|
58
|
+
|
|
59
|
+
this.channel = channel;
|
|
60
|
+
|
|
61
|
+
// Subscribe to relay events from this channel
|
|
62
|
+
this.channelHandler = this.eventDataProcessor.bind(this);
|
|
63
|
+
channel.on('event:relay.event', this.channelHandler);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Unregister the current LLMChannel from annotation
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
public unregisterChannel(): void {
|
|
71
|
+
if (this.channel && this.channelHandler) {
|
|
72
|
+
this.channel.off('event:relay.event', this.channelHandler);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
this.channel = undefined;
|
|
76
|
+
this.channelHandler = undefined;
|
|
77
|
+
}
|
|
78
|
+
|
|
41
79
|
/**
|
|
42
80
|
* Process Stroke Data
|
|
43
81
|
* @param {object} data
|
|
@@ -104,6 +142,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
104
142
|
|
|
105
143
|
/**
|
|
106
144
|
* Listen to websocket messages
|
|
145
|
+
* @deprecated LLM event subscription is now handled by registerChannel()
|
|
107
146
|
* @returns {undefined}
|
|
108
147
|
*/
|
|
109
148
|
private listenToEvents() {
|
|
@@ -114,14 +153,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
114
153
|
this.eventCommandProcessor,
|
|
115
154
|
this
|
|
116
155
|
);
|
|
117
|
-
//
|
|
118
|
-
this.webex.internal.llm.on('event:relay.event', this.eventDataProcessor, this);
|
|
119
|
-
// @ts-ignore
|
|
120
|
-
this.webex.internal.llm.on(
|
|
121
|
-
`event:relay.event:${LLM_PRACTICE_SESSION}`,
|
|
122
|
-
this.eventDataProcessor,
|
|
123
|
-
this
|
|
124
|
-
);
|
|
156
|
+
// LLM event subscription is now handled by registerChannel()
|
|
125
157
|
this.hasSubscribedToEvents = true;
|
|
126
158
|
}
|
|
127
159
|
}
|
|
@@ -138,13 +170,9 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
138
170
|
this.eventCommandProcessor
|
|
139
171
|
);
|
|
140
172
|
|
|
141
|
-
//
|
|
142
|
-
this.
|
|
143
|
-
|
|
144
|
-
this.webex.internal.llm.off(
|
|
145
|
-
`event:relay.event:${LLM_PRACTICE_SESSION}`,
|
|
146
|
-
this.eventDataProcessor
|
|
147
|
-
);
|
|
173
|
+
// Unregister LLM channel
|
|
174
|
+
this.unregisterChannel();
|
|
175
|
+
|
|
148
176
|
this.hasSubscribedToEvents = false;
|
|
149
177
|
}
|
|
150
178
|
}
|
|
@@ -300,8 +328,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
300
328
|
* @returns {void}
|
|
301
329
|
*/
|
|
302
330
|
public sendStrokeData = (strokeData: StrokeData): void => {
|
|
303
|
-
|
|
304
|
-
if (!this.webex.internal.llm.isConnected()) return;
|
|
331
|
+
if (!this.channel?.isConnected()) return;
|
|
305
332
|
this.encryptContent(strokeData.encryptionKeyUrl, strokeData.content).then(
|
|
306
333
|
(encryptedContent) => {
|
|
307
334
|
this.publishEncrypted(encryptedContent, strokeData);
|
|
@@ -316,20 +343,25 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
316
343
|
* @returns {void}
|
|
317
344
|
*/
|
|
318
345
|
private publishEncrypted(encryptedContent: string, strokeData: StrokeData) {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
const binding =
|
|
325
|
-
|
|
346
|
+
if (!this.channel) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
const socket = this.channel.getSocket();
|
|
351
|
+
const binding = this.channel.getBinding();
|
|
352
|
+
if (!socket || !binding) {
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
|
|
326
356
|
const data = {
|
|
327
357
|
id: `${this.seqNum}`,
|
|
328
358
|
type: 'publishRequest',
|
|
329
|
-
recipients:
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
359
|
+
recipients: [
|
|
360
|
+
{
|
|
361
|
+
// @ts-ignore
|
|
362
|
+
route: binding,
|
|
363
|
+
},
|
|
364
|
+
],
|
|
333
365
|
headers: {
|
|
334
366
|
to: strokeData.toUserId,
|
|
335
367
|
},
|