@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.
- package/.repo-context.json +577 -0
- package/.sdd/manifest.json +1320 -428
- package/AGENTS.md +528 -72
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/webinar/index.js +1 -1
- package/docs/adr/0001-migrate-existing-docs-into-sdd.md +141 -0
- package/docs/adr/index.md +26 -0
- package/docs/architecture.md +816 -0
- package/docs/getting-started.md +177 -0
- package/docs/index.md +53 -0
- package/docs/specs/README.md +126 -0
- package/package.json +21 -21
- package/schemas/repo-context.schema.json +796 -0
- package/src/aiEnableRequest/docs/README.md +376 -0
- package/src/annotation/docs/README.md +402 -0
- package/src/breakouts/docs/README.md +643 -0
- package/src/controls-options-manager/docs/README.md +365 -0
- package/src/hashTree/docs/README.md +566 -0
- package/src/interceptors/docs/README.md +434 -0
- package/src/interpretation/docs/README.md +420 -0
- package/src/locus-info/docs/README.md +609 -0
- package/src/media/docs/README.md +488 -0
- package/src/meeting/docs/README.md +834 -0
- package/src/meeting-info/docs/README.md +352 -0
- package/src/meetings/docs/README.md +549 -0
- package/src/member/docs/README.md +347 -0
- package/src/members/docs/README.md +514 -0
- package/src/metrics/docs/README.md +287 -0
- package/src/multistream/docs/README.md +523 -0
- package/src/personal-meeting-room/docs/README.md +322 -0
- package/src/reachability/docs/README.md +548 -0
- package/src/reactions/docs/README.md +296 -0
- package/src/reconnection-manager/docs/README.md +485 -0
- package/src/recording-controller/docs/README.md +335 -0
- package/src/roap/docs/README.md +444 -0
- package/src/webinar/docs/README.md +425 -0
- package/.sdd/templates/.source.json +0 -30
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +0 -111
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +0 -321
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +0 -59
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +0 -49
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +0 -42
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +0 -120
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +0 -206
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +0 -90
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +0 -68
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +0 -111
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +0 -57
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +0 -69
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +0 -96
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +0 -84
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +0 -82
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +0 -94
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +0 -64
- package/.sdd/templates/component-repo/template-map.json +0 -112
- package/ai-docs/ARCHITECTURE.md +0 -208
- package/ai-docs/CONTRACTS.md +0 -267
- package/ai-docs/DATA_MODEL.md +0 -64
- package/ai-docs/GETTING_STARTED.md +0 -73
- package/ai-docs/GLOSSARY.md +0 -56
- package/ai-docs/REVIEW_CHECKLIST.md +0 -45
- package/ai-docs/RULES.md +0 -79
- package/ai-docs/SECURITY.md +0 -74
- package/ai-docs/SERVICE_STATE.md +0 -59
- package/ai-docs/SPEC_INDEX.md +0 -85
- package/ai-docs/TEST_INDEX.md +0 -45
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +0 -61
- package/ai-docs/patterns/defensive-error-propagation.md +0 -55
- package/ai-docs/patterns/event-scope-emission.md +0 -46
- package/ai-docs/patterns/source-to-test-path-mirroring.md +0 -45
- package/ai-docs/patterns/stateless-plugin-request-classes.md +0 -53
- package/ai-docs/patterns/typed-constants-and-enum-values.md +0 -47
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +0 -223
- package/src/annotation/ai-docs/annotation-spec.md +0 -236
- package/src/breakouts/ai-docs/breakouts-spec.md +0 -324
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +0 -243
- package/src/hashTree/ai-docs/hash-tree-spec.md +0 -267
- package/src/interceptors/ai-docs/interceptors-spec.md +0 -247
- package/src/interpretation/ai-docs/interpretation-spec.md +0 -256
- package/src/locus-info/ai-docs/locus-info-spec.md +0 -293
- package/src/media/ai-docs/media-spec.md +0 -267
- package/src/meeting/ai-docs/meeting-spec.md +0 -404
- package/src/meeting-info/ai-docs/meeting-info-spec.md +0 -261
- package/src/meetings/ai-docs/meetings-spec.md +0 -298
- package/src/member/ai-docs/member-spec.md +0 -196
- package/src/members/ai-docs/members-spec.md +0 -256
- package/src/metrics/ai-docs/metrics-spec.md +0 -185
- package/src/multistream/ai-docs/multistream-spec.md +0 -295
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +0 -234
- package/src/reachability/ai-docs/reachability-spec.md +0 -261
- package/src/reactions/ai-docs/reactions-spec.md +0 -198
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +0 -272
- package/src/recording-controller/ai-docs/recording-controller-spec.md +0 -223
- package/src/roap/ai-docs/roap-spec.md +0 -241
- package/src/webinar/ai-docs/webinar-spec.md +0 -243
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
<!-- sdd-generated-metadata
|
|
2
|
-
doc_kind: module-spec
|
|
3
|
-
generated_from: module-spec@0.2.2
|
|
4
|
-
generator_plugin: repo-annotation@1.0.5+codex.20260818094939
|
|
5
|
-
generated_by: codex
|
|
6
|
-
approved_by: repository user
|
|
7
|
-
updated_at: 2026-08-22T15:21:29Z
|
|
8
|
-
validation_status: pass-with-warnings
|
|
9
|
-
-->
|
|
10
|
-
# MULTISTREAM — 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/multistream/`.
|
|
13
|
-
|
|
14
|
-
## Metadata
|
|
15
|
-
|
|
16
|
-
| Field | Value |
|
|
17
|
-
|---|---|
|
|
18
|
-
| Module id | `multistream` |
|
|
19
|
-
| Source path(s) | `src/multistream/` |
|
|
20
|
-
| Parent spec | — |
|
|
21
|
-
| Doc kind | Module spec |
|
|
22
|
-
| Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
|
|
23
|
-
| Generated from | `module-spec` @ SDLC template library `0.2.2` |
|
|
24
|
-
| generated_by / approved_by / updated_at | codex / repository user / 2026-08-22T15:21:29Z |
|
|
25
|
-
| Validation status | pass-with-warnings |
|
|
26
|
-
|
|
27
|
-
## Evidence Rules
|
|
28
|
-
|
|
29
|
-
Requirements cite current implementation and mirrored unit-test paths. Current code wins over retained prose when they conflict; commit and PR history are excluded by repository-owner decision. Missing test evidence is stated as a gap rather than inferred.
|
|
30
|
-
|
|
31
|
-
## Source Material Register
|
|
32
|
-
|
|
33
|
-
| Source material | Scope | Decision | Detail location or disposition |
|
|
34
|
-
|---|---|---|---|
|
|
35
|
-
| No routed legacy module spec | overview / API / behavior / tests | none; generated from current slot/remote-media managers and tests |
|
|
36
|
-
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
37
|
-
|
|
38
|
-
## Overview
|
|
39
|
-
|
|
40
|
-
`src/multistream/` contains 7 direct source/reference file(s) and has 7 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
|
-
Maps multistream media-core slots to stable remote-media objects/groups and arbitrates send/receive requests.
|
|
45
|
-
|
|
46
|
-
## Stack
|
|
47
|
-
|
|
48
|
-
TypeScript/JavaScript in the Node 22.14 Yarn workspace; Webex core/plugin abstractions and Mocha/Sinon/`@webex/test-helper-chai` tests. Build target: `yarn workspace @webex/plugin-meetings build:src`.
|
|
49
|
-
|
|
50
|
-
## Folder / Package Structure
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
src/multistream/
|
|
54
|
-
├── mediaRequestManager.ts — request coordination or payload types
|
|
55
|
-
├── receiveSlot.ts — receiveSlot implementation responsibility
|
|
56
|
-
├── receiveSlotManager.ts — receiveSlotManager implementation responsibility
|
|
57
|
-
├── remoteMedia.ts — remoteMedia implementation responsibility
|
|
58
|
-
├── remoteMediaGroup.ts — remoteMediaGroup implementation responsibility
|
|
59
|
-
├── remoteMediaManager.ts — remoteMediaManager implementation responsibility
|
|
60
|
-
├── sendSlotManager.ts — sendSlotManager implementation responsibility
|
|
61
|
-
└── ai-docs/multistream-spec.md — canonical module specification
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Key Files (source of truth)
|
|
65
|
-
|
|
66
|
-
| File | Holds |
|
|
67
|
-
|---|---|
|
|
68
|
-
| `src/multistream/mediaRequestManager.ts` | request coordination or payload types |
|
|
69
|
-
| `src/multistream/receiveSlot.ts` | receiveSlot implementation responsibility |
|
|
70
|
-
| `src/multistream/receiveSlotManager.ts` | receiveSlotManager implementation responsibility |
|
|
71
|
-
| `src/multistream/remoteMedia.ts` | remoteMedia implementation responsibility |
|
|
72
|
-
| `src/multistream/remoteMediaGroup.ts` | remoteMediaGroup implementation responsibility |
|
|
73
|
-
| `src/multistream/remoteMediaManager.ts` | remoteMediaManager implementation responsibility |
|
|
74
|
-
| `src/multistream/sendSlotManager.ts` | sendSlotManager implementation responsibility |
|
|
75
|
-
| `test/unit/spec/multistream/mediaRequestManager.ts` and 6 sibling test file(s) | mirrored characterization/unit coverage |
|
|
76
|
-
|
|
77
|
-
## Public Surface
|
|
78
|
-
|
|
79
|
-
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
80
|
-
|---|---|---|---|---|---|---|
|
|
81
|
-
| `multistream.1` | SDK / in-process | `ReceiveSlot`: `memberId`, `csi`, `sourceState`, `stream`, `setMaxFs()`, `findMemberId()`, `logString()`, and `wcmeReceiveSlot` | Expose one stable wrapper around a media-core receive slot and its resolved participant/source state. | Preserve accessors and source-state event behavior across slot reassignment. | `src/multistream/receiveSlot.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
82
|
-
| `multistream.2` | SDK / lifecycle | `ReceiveSlotManager.allocateSlot()`, `releaseSlot()`, `reset()`, `getStats()`, `updateMemberIds()`, `findReceiveSlotBySsrc()` | Allocate, recycle, inspect, and reconcile the finite receive-slot pool. | `releaseSlot()` only moves the same slot object from the allocated pool to the free pool; it does not reset CSI/member/source state or detach listeners. | `src/multistream/receiveSlotManager.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
83
|
-
| `multistream.3` | SDK / in-process | `RemoteMedia.setSizeHint()`, `getEffectiveMaxFs()`, `stop()`, `sendMediaRequest()`, `cancelMediaRequest()`, `mediaType`, `memberId`, `csi`, `sourceState`, `stream`, and `getUnderlyingReceiveSlot()` | Give consumers a stable remote-media identity while its underlying slot and request change. | `stop()` cancels the request and removes owned slot listeners; it is not an async transport result. | `src/multistream/remoteMedia.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
84
|
-
| `multistream.4` | SDK / in-process | `RemoteMediaGroup.getRemoteMedia()`, `setActiveSpeakerCsis()`, `pin()`, `unpin()`, `isPinned()`, `setPreferLiveVideo()`, `setNamedMediaGroup()`, `stop()`, `includes()`, and `getEffectiveMaxFs()` | Coordinate a related set of stable remote-media objects and pin/preference policy. | Preserve group membership and pinning semantics when layouts change. | `src/multistream/remoteMediaGroup.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
85
|
-
| `multistream.5` | SDK / lifecycle | `RemoteMediaManager.start()`, `stop()`, `setLayout()`, `getLayoutId()`, `setPreferLiveVideo()`, `setActiveSpeakerCsis()`, `setReceiveNamedMediaGroup()`, `logAllReceiveSlots()`, `setRemoteVideoCsis()`, `setRemoteVideoCsi()`, `addMemberVideoPane()`, `removeMemberVideoPane()`, `pinActiveSpeakerVideoPane()`, `unpinActiveSpeakerVideoPane()`, and `isPinned()` | Translate meeting layout and CSI intent into remote-media groups and receive-slot assignments. | Preserve manager-scoped event/listener cleanup and current layout identifiers. | `src/multistream/remoteMediaManager.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
86
|
-
| `multistream.6` | SDK / in-process | `MediaRequestManager.addRequest()`, `cancelRequest()`, `commit()`, `reset()`, `setDegradationPreferences()`, and `setNumCurrentSources()` | Batch active-speaker/receiver-selected constraints and synchronously deliver `StreamRequest[]` to media core. | Mixed active-speaker `preferLiveVideo` values throw synchronously; the callback returns `void`. | `src/multistream/mediaRequestManager.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
87
|
-
| `multistream.7` | SDK / lifecycle | `SendSlotManager.createSlot()`, `getSlot()`, `setNamedMediaGroups()`, `setSourceStateOverride()`, `publishStream()`, `unpublishStream()`, `setActive()`, `setCodecParameters()`, `deleteCodecParameters()`, `setCustomCodecParameters()`, `markCustomCodecParametersForDeletion()`, and `reset()` | Own outgoing media-core send-slot publication and codec configuration. | Preserve explicit publication and codec-deletion operations. `reset()` calls `unpublishStream()` on every slot (best-effort, logging and swallowing rejection) before clearing them, so each slot detaches its publishedStream's track-change/constraints/mute/ended listeners instead of being discarded while still subscribed. | `src/multistream/sendSlotManager.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
88
|
-
| `multistream.8` | exported layout/configuration | `VideoLayout`, `ActiveSpeakerVideoPaneGroup`, `MemberVideoPane`, `Configuration`, `DefaultConfiguration`, `Event`, `Events`, `LayoutId`, `PaneSize`, `PaneId`, `PaneGroupId`, and `VideoLayoutChangedEventData` | Define the layout model and events consumed by `RemoteMediaManager`. | Add layout fields and events compatibly; existing ids and defaults are observable. | `src/multistream/remoteMediaManager.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
89
|
-
| `multistream.9` | exported media contracts | `AV1_CODEC_PARAMETERS`, `H264_CODEC_PARAMETERS`, `ActiveSpeakerPolicyInfo`, `ReceiverSelectedPolicyInfo`, `PolicyInfo`, `H264CodecInfo`, `CodecInfo`, `MediaRequest`, `MediaRequestId`, `ReceiveSlotEvents`, `StreamState`, `CSI`, `MemberId`, `ReceiveSlotId`, `FindMemberIdCallback`, `CreateSlotCallback`, `RemoteMediaEvents`, `RemoteVideoResolution`, `MAX_FS_VALUES`, `getMaxFs()`, and `RemoteMediaId` | Share the exact request, codec, resolution, event, and identity vocabulary across Meeting and media-core adapters. | `StreamState` is imported and re-exported from `@webex/internal-media-core` by `receiveSlot.ts`, not defined locally; preserve that upstream type identity plus raw codec values, max-fs mapping, event names, and other identifier types. | `src/multistream/receiveSlot.ts`, `src/multistream/` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
90
|
-
|
|
91
|
-
### Emitted events
|
|
92
|
-
|
|
93
|
-
These are object-local `EventsScope` emissions on exported consumer-reachable classes, not package-wide `Trigger`/`TriggerProxy` events. Preserve each literal, emitting object, timing, and payload.
|
|
94
|
-
|
|
95
|
-
| Emitter | Event literal | Timing | Payload | Emission evidence |
|
|
96
|
-
|---|---|---|---|---|
|
|
97
|
-
| `ReceiveSlot` | `sourceUpdate` | After an internal-media-core source update refreshes state/CSI/member id, or when `findMemberId()` later resolves a previously unknown member. | `{state, csi, memberId}` | `src/multistream/receiveSlot.ts` |
|
|
98
|
-
| `ReceiveSlot` | `maxFsUpdate` | Synchronously when `setMaxFs(newFs)` is called. | `{maxFs: newFs}` | `src/multistream/receiveSlot.ts` |
|
|
99
|
-
| `RemoteMedia` | `sourceUpdate` | When the associated `ReceiveSlot` emits `sourceUpdate`; the same payload is forwarded. | `{state, csi, memberId}` | `src/multistream/remoteMedia.ts` |
|
|
100
|
-
| `RemoteMedia` | `stopped` | After `stop()` cancels its request, removes receive-slot listeners, and clears the slot association. | `{}` | `src/multistream/remoteMedia.ts` |
|
|
101
|
-
| `RemoteMediaManager` | `AudioCreated` | After the main-audio `RemoteMediaGroup` is created during startup. | main-audio `RemoteMediaGroup` | `src/multistream/remoteMediaManager.ts` |
|
|
102
|
-
| `RemoteMediaManager` | `InterpretationAudioCreated` | After a configured interpretation/named-audio `RemoteMediaGroup` is created. | interpretation-audio `RemoteMediaGroup` | `src/multistream/remoteMediaManager.ts` |
|
|
103
|
-
| `RemoteMediaManager` | `ScreenShareAudioCreated` | After screen-share audio slots exist and their `RemoteMediaGroup` is created. | screen-share-audio `RemoteMediaGroup` | `src/multistream/remoteMediaManager.ts` |
|
|
104
|
-
| `RemoteMediaManager` | `VideoLayoutChanged` | After `setLayout()` updates receive slots and remote-media objects for the selected layout. | `VideoLayoutChangedEventData` (`layoutId`, active-speaker groups, member panes, optional screen-share video) | `src/multistream/remoteMediaManager.ts` |
|
|
105
|
-
|
|
106
|
-
Compatibility notes:
|
|
107
|
-
- Prefer additive options and payload fields. Preserve method/event names, rejection semantics, and cleanup timing; route public changes through `src/index.ts` or the documented owning object.
|
|
108
|
-
|
|
109
|
-
## Requires (dependencies)
|
|
110
|
-
|
|
111
|
-
internal-media-core multistream connection, member CSI data, codecs, event callbacks, and Meeting media state.
|
|
112
|
-
|
|
113
|
-
## Requirements
|
|
114
|
-
|
|
115
|
-
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
116
|
-
|---|---|---|---|---|---|---|
|
|
117
|
-
| `MULTISTREAM-R-001` | manage receive slots and remote-media groups. | Maps multistream media-core slots to stable remote-media objects/groups and arbitrates send/receive requests. | `src/multistream/remoteMediaManager.ts` | `test/unit/spec/multistream/remoteMediaManager.ts` | none | PRESENT |
|
|
118
|
-
| `MULTISTREAM-R-002` | Map member/CSI/layout requests to media-core. `ReceiveSlotManager.releaseSlot()` changes pool membership only; any association/listener cleanup must already be owned by `RemoteMedia.stop()`, request cancellation, or the surrounding manager flow. | Member, CSI, slot, and layout mappings must remain consistent while media-core reuses transport resources, without assigning cleanup behavior to a pool operation that does not perform it. | `src/multistream/remoteMediaManager.ts`, `src/multistream/receiveSlotManager.ts`, `src/multistream/remoteMedia.ts` | `test/unit/spec/multistream/remoteMediaManager.ts`, `test/unit/spec/multistream/receiveSlotManager.ts` | simultaneous slot reuse and layout change needs listener-identity coverage | PRESENT |
|
|
119
|
-
| `MULTISTREAM-R-003` | `MediaRequestManager` performs synchronous validation and calls its `sendMediaRequestsCallback(StreamRequest[])`, whose return type is `void`; it has no async rejection path. A mix of active-speaker requests with different `preferLiveVideo` values throws synchronously. `RemoteMedia.stop()` and request cancellation detach their owned associations/listeners; `releaseSlot()` does not. | Callers must handle the implemented synchronous validation boundary without inventing a rejected media-request promise, and cleanup must remain attributed to the object that performs it. | `src/multistream/mediaRequestManager.ts`, `src/multistream/remoteMedia.ts`, `src/multistream/receiveSlotManager.ts` | `test/unit/spec/multistream/mediaRequestManager.ts`, `test/unit/spec/multistream/remoteMedia.ts`, `test/unit/spec/multistream/receiveSlotManager.ts` | none | PRESENT |
|
|
120
|
-
| `MULTISTREAM-R-004` | RemoteMedia identity remains stable while tracks/receive slots and member CSI mappings change. Exported `ReceiveSlot`, `RemoteMedia`, and `RemoteMediaManager` objects emit the object-local event literals and payloads listed above at their concrete update/creation/stop boundaries. | Consumers keep references to remote media across layout and transport updates and rely on scoped events to know when those stable objects change. | `src/multistream/receiveSlot.ts`, `src/multistream/remoteMedia.ts`, `src/multistream/remoteMediaManager.ts` | `test/unit/spec/multistream/receiveSlot.ts`, `test/unit/spec/multistream/remoteMedia.ts`, `test/unit/spec/multistream/remoteMediaManager.ts` | none | PRESENT |
|
|
121
|
-
| `MULTISTREAM-R-005` | `RemoteMedia.stop()` cancels its request, removes listeners from its receive slot, and invalidates the association. `MediaRequestManager.cancelRequest()` removes its `SourceUpdate` and `MaxFsUpdate` handlers from every request slot before deletion. | Slot reuse must not deliver another participant's media or request callbacks through stale listeners. | `src/multistream/remoteMedia.ts`, `src/multistream/mediaRequestManager.ts` | `test/unit/spec/multistream/remoteMedia.ts`, `test/unit/spec/multistream/mediaRequestManager.ts` | none | PRESENT |
|
|
122
|
-
| `MULTISTREAM-R-006` | Media request arbitration and send-slot management preserve the latest supported layout/send intent. | Concurrent layout/member changes should not apply obsolete stream requests. | `src/multistream/mediaRequestManager.ts`, `src/multistream/sendSlotManager.ts` | `test/unit/spec/multistream/mediaRequestManager.ts`, `test/unit/spec/multistream/sendSlotManager.ts` | none | PRESENT |
|
|
123
|
-
| `MULTISTREAM-R-007` | `SendSlotManager.reset()` calls `unpublishStream()` on every slot (catching and logging any rejection) before clearing the slot map. `unpublishStream()` detaches the slot's `OutputTrackChange`/`ConstraintsChange`/mute-state/`Ended` listeners from its `publishedStream` synchronously, before any awaited sender-replace work. | Simply clearing the slot map (as before) abandons each `SendSlot` still subscribed to its last published stream. If that stream object is reused by a later, unrelated meeting instance (the stream is owned by the caller, not the slot), the abandoned slot's handler fires on the new meeting's stream activity and throws trying to replace a track on its own (already-closed) connection's sender. | `src/multistream/sendSlotManager.ts` | `test/unit/spec/multistream/sendSlotManager.ts` | none | PRESENT |
|
|
124
|
-
|
|
125
|
-
## Design Overview
|
|
126
|
-
|
|
127
|
-
The module is a set of cooperating media managers rather than one entry controller: receive slots project remote sources, remote-media groups expose them, the media-request manager batches receive requests, and the send-slot manager applies source-state overrides.
|
|
128
|
-
|
|
129
|
-
## Data Flow
|
|
130
|
-
|
|
131
|
-
```mermaid
|
|
132
|
-
flowchart LR
|
|
133
|
-
MediaCore[internal-media-core slots/events] --> Slot[receiveSlot.ts]
|
|
134
|
-
Slot --> SlotManager[receiveSlotManager.ts]
|
|
135
|
-
SlotManager --> Remote[remoteMedia.ts]
|
|
136
|
-
Remote --> Group[remoteMediaGroup.ts]
|
|
137
|
-
Group --> RemoteManager[remoteMediaManager.ts]
|
|
138
|
-
SlotManager --> RequestManager[mediaRequestManager.ts]
|
|
139
|
-
SendCore[send slots] --> SendManager[sendSlotManager.ts]
|
|
140
|
-
RequestManager --> Meeting[Meeting media request owner]
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Sequence Diagram(s)
|
|
144
|
-
|
|
145
|
-
Sequence coverage:
|
|
146
|
-
|
|
147
|
-
| Operation group | Diagram | Failure coverage |
|
|
148
|
-
|---|---|---|
|
|
149
|
-
| UC-1…UC-6 — multistream slot and request operation groups | Multistream slot and request primary sequence | unknown/reused slot, pool-only release, removed source, mixed-preference validation, and owner-specific listener detachment |
|
|
150
|
-
| UC-1…UC-6 — multistream slot and request alternate/failure paths | Multistream slot and request alternate/failure sequence | unknown slot/CSI, removed remote source, conflicting slot assignment, or mixed `preferLiveVideo` validation |
|
|
151
|
-
|
|
152
|
-
### Multistream slot and request primary sequence
|
|
153
|
-
|
|
154
|
-
```mermaid
|
|
155
|
-
sequenceDiagram
|
|
156
|
-
participant C as Media core
|
|
157
|
-
participant S as ReceiveSlot
|
|
158
|
-
participant P as ReceiveSlotManager
|
|
159
|
-
participant M as RemoteMediaManager
|
|
160
|
-
participant R as RemoteMedia
|
|
161
|
-
participant Q as MediaRequestManager
|
|
162
|
-
participant A as Meeting / application consumer
|
|
163
|
-
C-->>S: source state / CSI / track event
|
|
164
|
-
S-->>R: ReceiveSlotEvents.SourceUpdate
|
|
165
|
-
R-->>A: RemoteMediaEvents.SourceUpdate
|
|
166
|
-
M->>P: allocateSlot(...)
|
|
167
|
-
P-->>M: allocated ReceiveSlot
|
|
168
|
-
M->>R: construct RemoteMedia with the allocated slot
|
|
169
|
-
M->>Q: commit() after request/allocation changes
|
|
170
|
-
Q-->>M: batched request completion
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Multistream slot and request alternate/failure sequence
|
|
174
|
-
|
|
175
|
-
```mermaid
|
|
176
|
-
sequenceDiagram
|
|
177
|
-
participant C as Media-core slot event
|
|
178
|
-
participant S as ReceiveSlot
|
|
179
|
-
participant R as RemoteMedia
|
|
180
|
-
participant Q as MediaRequestManager
|
|
181
|
-
participant A as Meeting / application consumer
|
|
182
|
-
C-->>S: source state, CSI, or track update
|
|
183
|
-
S-->>R: ReceiveSlotEvents.SourceUpdate
|
|
184
|
-
R-->>A: forwarded RemoteMediaEvents.SourceUpdate
|
|
185
|
-
A->>R: sendMediaRequest(csi, commit)
|
|
186
|
-
alt RemoteMedia still owns a ReceiveSlot
|
|
187
|
-
R->>Q: addRequest(...) and optionally commit
|
|
188
|
-
Q-->>R: media request id
|
|
189
|
-
else RemoteMedia was stopped or request validation throws
|
|
190
|
-
R->>R: cancelMediaRequest(...) and detach ReceiveSlot listeners
|
|
191
|
-
R--xA: synchronous invalidated-media or mixed-preference error
|
|
192
|
-
end
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
## Class / Component Relationships
|
|
196
|
-
|
|
197
|
-
```mermaid
|
|
198
|
-
classDiagram
|
|
199
|
-
class MediaCore
|
|
200
|
-
class Slot
|
|
201
|
-
class SlotManager
|
|
202
|
-
class Remote
|
|
203
|
-
class Group
|
|
204
|
-
class RemoteManager
|
|
205
|
-
class RequestManager
|
|
206
|
-
class SendCore
|
|
207
|
-
class SendManager
|
|
208
|
-
class Meeting
|
|
209
|
-
MediaCore --> Slot
|
|
210
|
-
Slot --> SlotManager
|
|
211
|
-
SlotManager --> Remote
|
|
212
|
-
Remote --> Group
|
|
213
|
-
Group --> RemoteManager
|
|
214
|
-
SlotManager --> RequestManager
|
|
215
|
-
SendCore --> SendManager
|
|
216
|
-
RequestManager --> Meeting
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
The arrows identify ownership and delegation inside `src/multistream/`; files that only declare types or constants are not presented as transports.
|
|
220
|
-
|
|
221
|
-
## Use Cases
|
|
222
|
-
|
|
223
|
-
- **UC-1:** Allocate receive slots and return them to the free pool. `releaseSlot()` preserves the slot object's current CSI/member/source/listener state; callers must perform any required association cleanup through its actual owner before pool reuse. Evidence: `src/multistream/receiveSlotManager.ts`, `src/multistream/receiveSlot.ts`, `src/multistream/remoteMedia.ts`.
|
|
224
|
-
- **UC-2:** Keep a `RemoteMedia` identity stable as its receive slot, track, source state, member id, or size hint changes. Evidence: `src/multistream/remoteMedia.ts`.
|
|
225
|
-
- **UC-3:** Build remote-media groups, switch layouts, update active-speaker/CSI intent, and pin or unpin the active-speaker pane. Evidence: `src/multistream/remoteMediaGroup.ts`, `src/multistream/remoteMediaManager.ts`.
|
|
226
|
-
- **UC-4:** Add, cancel, and commit media requests, applying degradation and current-source limits before synchronously delivering `StreamRequest[]`. Evidence: `src/multistream/mediaRequestManager.ts`.
|
|
227
|
-
- **UC-5:** Reject a commit synchronously when active-speaker request groups disagree on `preferLiveVideo`. Evidence: `src/multistream/mediaRequestManager.ts`.
|
|
228
|
-
- **UC-6:** Publish/unpublish outgoing send slots and update named media groups, source-state overrides, active state, and codec parameters. Evidence: `src/multistream/sendSlotManager.ts`.
|
|
229
|
-
|
|
230
|
-
## State Model
|
|
231
|
-
|
|
232
|
-
Receive/send slots, remote-media objects/groups, requested layouts, CSI mappings, and pending media requests live for the connection lifetime.
|
|
233
|
-
|
|
234
|
-
## Business Rules & Invariants
|
|
235
|
-
|
|
236
|
-
- A slot has one active owner/mapping while allocated. Returning it to the free pool does not itself detach tracks/listeners or reset CSI/member/source state; `RemoteMedia.stop()` and request cancellation own their respective cleanup. Object-local emissions retain the exact literals/payloads listed under Public Surface, and request arbitration preserves the latest supported layout intent. Enforced by current code under `src/multistream/`.
|
|
237
|
-
|
|
238
|
-
## Concurrency & Reactive Flow
|
|
239
|
-
|
|
240
|
-
- Receive-slot and RemoteMedia identity is checked at each association change. `RemoteMedia.stop()` and `MediaRequestManager.cancelRequest()` detach the listeners they own; `ReceiveSlotManager.releaseSlot()` only changes pool membership. `MediaRequestManager` arbitrates changed constraints so a superseded slot/group does not consume a later request result.
|
|
241
|
-
|
|
242
|
-
## State Machine
|
|
243
|
-
|
|
244
|
-
```mermaid
|
|
245
|
-
stateDiagram-v2
|
|
246
|
-
state "no source" as NO_SOURCE
|
|
247
|
-
[*] --> NO_SOURCE
|
|
248
|
-
NO_SOURCE --> live: slot reports a live source
|
|
249
|
-
live --> NO_SOURCE: receive slot reports source removed
|
|
250
|
-
live --> live: CSI/track/source-state update
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
The diagram records the initialized `no source` value and the `live` source path consumed by current multistream code and tests.
|
|
254
|
-
|
|
255
|
-
## Protocol / Wire Format
|
|
256
|
-
|
|
257
|
-
- External payloads are parsed/serialized by files under `src/multistream/` and existing Webex/media dependencies. Preserve current field names, enum/raw values, sequence identifiers, and compatibility behavior; do not treat the normalized client model as the wire schema.
|
|
258
|
-
|
|
259
|
-
## Error Handling & Failure Modes
|
|
260
|
-
|
|
261
|
-
| Condition | Signal | Caller recovery |
|
|
262
|
-
|---|---|---|
|
|
263
|
-
| Slot/CSI is unknown or a remote source is removed | The owning association is absent or detached by its `RemoteMedia`/request lifecycle. Merely calling `releaseSlot()` changes pool membership and provides no cleanup signal. | Reconcile against the current slot/member mapping and invoke the actual association owner before returning a slot to the pool. |
|
|
264
|
-
| Active-speaker requests mix different `preferLiveVideo` values | `MediaRequestManager.commit()` throws synchronously before delivering stream requests. | Make the grouped active-speaker policy consistent, then commit again. |
|
|
265
|
-
| Current slot reports a live source | The stable `RemoteMedia` object receives the slot/track update and emits its scoped update. | Continue using the stable remote-media identity. |
|
|
266
|
-
| `SendSlotManager.reset()` is called and a slot's `unpublishStream()` rejects (e.g. the underlying connection is already closing) | The rejection is caught and logged as a warning; the slot is still removed from the map. `reset()` itself never throws. | No caller action needed; the slot map is cleared regardless of the unpublish outcome. |
|
|
267
|
-
|
|
268
|
-
## Pitfalls
|
|
269
|
-
|
|
270
|
-
- Remote-media identity is not the same as a transient track or slot. Recreating objects on every update breaks consumer references.
|
|
271
|
-
- `Event.InterpretationAudioCreated` is emitted at runtime, but the current exported `Events` interface does not declare its callback alongside the other manager events. Treat the runtime event as observable and the type-interface omission as a separate possible product/type defect.
|
|
272
|
-
- Public behavior may be reachable through a parent `Meeting`/`Meetings` object even when the source helper is not exported directly.
|
|
273
|
-
|
|
274
|
-
## Key Design Trade-off
|
|
275
|
-
|
|
276
|
-
- Stable remote-media objects are favored over exposing raw media-core slots, requiring explicit mapping and lifecycle management.
|
|
277
|
-
|
|
278
|
-
## Test-Case Strategy (module)
|
|
279
|
-
|
|
280
|
-
Use the current mirrored suites: `test/unit/spec/multistream/mediaRequestManager.ts`, `test/unit/spec/multistream/receiveSlot.ts`, `test/unit/spec/multistream/receiveSlotManager.ts`, `test/unit/spec/multistream/remoteMedia.ts`, `test/unit/spec/multistream/remoteMediaGroup.ts`, `test/unit/spec/multistream/remoteMediaManager.ts`, `test/unit/spec/multistream/sendSlotManager.ts`. Characterize the multistream-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
281
|
-
|
|
282
|
-
| Behavior / Requirement | Existing test evidence | Gap |
|
|
283
|
-
|---|---|---|
|
|
284
|
-
| `MULTISTREAM-R-001` | `test/unit/spec/multistream/remoteMediaManager.ts` | cover each receive-slot, remote-media/group/manager, request-manager, layout, and send-slot family |
|
|
285
|
-
| `MULTISTREAM-R-002` | `test/unit/spec/multistream/remoteMediaManager.ts` | simultaneous slot reuse and layout change needs listener-identity coverage |
|
|
286
|
-
| `MULTISTREAM-R-003` | `test/unit/spec/multistream/mediaRequestManager.ts` | assert the synchronous mixed-`preferLiveVideo` throw and that the `void` callback is not treated as a promise |
|
|
287
|
-
| `MULTISTREAM-R-004` | `test/unit/spec/multistream/remoteMedia.ts`, `test/unit/spec/multistream/remoteMediaManager.ts` | none |
|
|
288
|
-
| `MULTISTREAM-R-005` | `test/unit/spec/multistream/receiveSlot.ts`, `test/unit/spec/multistream/receiveSlotManager.ts`, `test/unit/spec/multistream/remoteMedia.ts` | verify rapid slot reuse while distinguishing pool-only release from RemoteMedia/request listener cleanup |
|
|
289
|
-
| `MULTISTREAM-R-006` | `test/unit/spec/multistream/mediaRequestManager.ts`, `test/unit/spec/multistream/sendSlotManager.ts` | verify stale request suppression |
|
|
290
|
-
| `MULTISTREAM-R-007` | `test/unit/spec/multistream/sendSlotManager.ts` | covered for the unpublish-before-clear happy path and the rejected-unpublish warning/no-throw path |
|
|
291
|
-
|
|
292
|
-
## Traceability
|
|
293
|
-
|
|
294
|
-
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
295
|
-
- Coverage state and contracts baseline: `../../../.sdd/manifest.json`
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
<!-- sdd-generated-metadata
|
|
2
|
-
doc_kind: module-spec
|
|
3
|
-
generated_from: module-spec@0.2.2
|
|
4
|
-
generator_plugin: repo-annotation@1.0.5+codex.20260818094939
|
|
5
|
-
generated_by: codex
|
|
6
|
-
approved_by: repository user
|
|
7
|
-
updated_at: 2026-08-22T15:21:29Z
|
|
8
|
-
validation_status: pass-with-warnings
|
|
9
|
-
-->
|
|
10
|
-
# PERSONAL MEETING ROOM — 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/personal-meeting-room/`.
|
|
13
|
-
|
|
14
|
-
## Metadata
|
|
15
|
-
|
|
16
|
-
| Field | Value |
|
|
17
|
-
|---|---|
|
|
18
|
-
| Module id | `personal-meeting-room` |
|
|
19
|
-
| Source path(s) | `src/personal-meeting-room/` |
|
|
20
|
-
| Parent spec | — |
|
|
21
|
-
| Doc kind | Module spec |
|
|
22
|
-
| Coverage score | 93% assessed 2026-08-22; 13/14 mandatory fields present; all critical and Important fields present; one noncritical polish gap remains; pending independent validation of the participant-role repair |
|
|
23
|
-
| Generated from | `module-spec` @ SDLC template library `0.2.2` |
|
|
24
|
-
| generated_by / approved_by / updated_at | codex / repository user / 2026-08-22T15:21:29Z |
|
|
25
|
-
| Validation status | pass-with-warnings |
|
|
26
|
-
|
|
27
|
-
## Evidence Rules
|
|
28
|
-
|
|
29
|
-
Requirements cite current source and mirrored tests. Current code wins over retained prose when they conflict; commit and PR history are excluded. Missing evidence stays a gap.
|
|
30
|
-
|
|
31
|
-
## Source Material Register
|
|
32
|
-
|
|
33
|
-
| Source material | Scope | Decision | Detail location or disposition |
|
|
34
|
-
|---|---|---|---|
|
|
35
|
-
| Retained package consumer documentation | overview / API / behavior / tests | used and verified; PMR retrieval/claim usage was placed in the public surface and use cases |
|
|
36
|
-
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
37
|
-
|
|
38
|
-
## Overview
|
|
39
|
-
|
|
40
|
-
`src/personal-meeting-room/` 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
|
-
Retrieves a user's Personal Meeting Room information and performs the claim operation through the Webex service boundary.
|
|
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/personal-meeting-room/
|
|
54
|
-
├── index.ts — module facade/controller or primary exports
|
|
55
|
-
├── request.ts — PMR-claim validation and HTTP request boundary
|
|
56
|
-
├── util.ts — normalization/helper functions
|
|
57
|
-
└── ai-docs/personal-meeting-room-spec.md — canonical module specification
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Key Files (source of truth)
|
|
61
|
-
|
|
62
|
-
| File | Holds |
|
|
63
|
-
|---|---|
|
|
64
|
-
| `src/personal-meeting-room/index.ts` | module facade/controller or primary exports |
|
|
65
|
-
| `src/personal-meeting-room/request.ts` | PMR-claim validation and HTTP request boundary |
|
|
66
|
-
| `src/personal-meeting-room/util.ts` | normalization/helper functions |
|
|
67
|
-
| `test/unit/spec/personal-meeting-room/personal-meeting-room.js` | mirrored characterization/unit coverage |
|
|
68
|
-
|
|
69
|
-
## Public Surface
|
|
70
|
-
|
|
71
|
-
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
72
|
-
|---|---|---|---|---|---|---|
|
|
73
|
-
| `personal-meeting-room.1` | SDK / remote | `PersonalMeetingRoom.get()` | Fetch the current user's room through the injected meeting-info service and store a valid PMR projection. | Reject absent/non-PMR results; preserve the returned model state. | `src/personal-meeting-room/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
74
|
-
| `personal-meeting-room.2` | SDK / remote | `PersonalMeetingRoom.claim()` | Claim the current PMR through the request dependency, cache accepted response fields, and return the response body. | Preserve request rejection and response-body return semantics. | `src/personal-meeting-room/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
75
|
-
| `personal-meeting-room.3` | request adapter | `PersonalMeetingRoomRequest.claimPmr()` | Issue the PMR claim request with current Webex identity/request context. | This adapter performs claim I/O only; room lookup belongs to the injected meeting-info service. | `src/personal-meeting-room/request.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
76
|
-
|
|
77
|
-
Compatibility notes:
|
|
78
|
-
- 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.
|
|
79
|
-
|
|
80
|
-
## Requires (dependencies)
|
|
81
|
-
|
|
82
|
-
Webex host/request access, user/device identity, PMR service discovery, meeting-info normalization, and request errors.
|
|
83
|
-
|
|
84
|
-
## Requirements
|
|
85
|
-
|
|
86
|
-
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
87
|
-
|---|---|---|---|---|---|---|
|
|
88
|
-
| `PERSONAL-MEETING-ROOM-R-001` | fetch the current user's Personal Meeting Room. | Retrieves a user's Personal Meeting Room information and performs the claim operation through the Webex service boundary. | `src/personal-meeting-room/index.ts` | `test/unit/spec/personal-meeting-room/personal-meeting-room.js` | none | PRESENT |
|
|
89
|
-
| `PERSONAL-MEETING-ROOM-R-002` | Copy a validated PMR response into the instance's PMR, SIP URI, meeting link, owner, name, and number fields. | Both lookup and claim must expose the same current room projection without attributing lookup to the claim-only request helper. | `src/personal-meeting-room/index.ts` | `test/unit/spec/personal-meeting-room/personal-meeting-room.js` | none | PRESENT |
|
|
90
|
-
| `PERSONAL-MEETING-ROOM-R-003` | `PersonalMeetingRoomRequest.claimPmr()` throws `ParameterError` synchronously when required claim options are absent, returns a rejected `ParameterError` promise for an invalid pin or link, and otherwise returns the request promise. Lookup/service failures and an accepted claim response without a body reject their returned chains; the instance owns no listener, timer, lock, or event cleanup. | Callers must distinguish the request builder's synchronous option validation from returned validation/service rejections while not confusing cached room metadata with an async lifecycle resource. | `src/personal-meeting-room/index.ts`, `src/personal-meeting-room/request.ts` | `test/unit/spec/personal-meeting-room/personal-meeting-room.js` | none | PRESENT |
|
|
91
|
-
|
|
92
|
-
## Design Overview
|
|
93
|
-
|
|
94
|
-
`PersonalMeetingRoom.get()` delegates lookup to the injected `meetingInfo.fetchMeetingInfo`; `claim()` delegates only the claim operation to `PersonalMeetingRoomRequest.claimPmr`. `request.ts` and `util.ts` validate/build the claim request, while `index.ts` copies accepted response fields into the instance. The module has no listeners, timers, or event-emission lifecycle.
|
|
95
|
-
|
|
96
|
-
## Data Flow
|
|
97
|
-
|
|
98
|
-
```mermaid
|
|
99
|
-
flowchart LR
|
|
100
|
-
Caller[Meetings / consumer] --> PMR[index.ts]
|
|
101
|
-
PMR --> Lookup[meetingInfo.fetchMeetingInfo]
|
|
102
|
-
PMR --> Request[request.ts claimPmr]
|
|
103
|
-
Request --> Util[util.ts validate/build claim request]
|
|
104
|
-
Lookup --> Service[Meeting-info service]
|
|
105
|
-
Request --> Service2[PMR claim service]
|
|
106
|
-
Service --> PMR
|
|
107
|
-
Service2 --> Request
|
|
108
|
-
Request --> PMR
|
|
109
|
-
PMR --> Caller
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Sequence Diagram(s)
|
|
113
|
-
|
|
114
|
-
Sequence coverage:
|
|
115
|
-
|
|
116
|
-
| Operation group | Diagram | Failure coverage |
|
|
117
|
-
|---|---|---|
|
|
118
|
-
| UC-1…UC-3 — personal-room lookup and claim operation groups | Personal-room lookup and claim primary sequence | absent/non-PMR lookup, claim rejection, and cache preservation |
|
|
119
|
-
| UC-1…UC-3 — personal-room lookup and claim alternate/failure paths | Personal-room lookup and claim alternate/failure sequence | missing identity/site input, unavailable PMR, claim rejection, or request failure |
|
|
120
|
-
|
|
121
|
-
### Personal-room lookup and claim primary sequence
|
|
122
|
-
|
|
123
|
-
```mermaid
|
|
124
|
-
sequenceDiagram
|
|
125
|
-
participant C as Meetings / consumer
|
|
126
|
-
participant P as PersonalMeetingRoom
|
|
127
|
-
participant I as meetingInfo
|
|
128
|
-
participant R as request.ts claimPmr
|
|
129
|
-
C->>P: get() or claim(link, pin, preferred)
|
|
130
|
-
alt get
|
|
131
|
-
P->>I: fetchMeetingInfo({type: PERSONAL_ROOM})
|
|
132
|
-
I-->>P: PMR body or rejection
|
|
133
|
-
else claim
|
|
134
|
-
P->>R: claimPmr(identity, pin, link, preferred)
|
|
135
|
-
R-->>P: PMR body or rejection
|
|
136
|
-
end
|
|
137
|
-
P->>P: copy accepted PMR fields
|
|
138
|
-
P-->>C: PMR body
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Personal-room lookup and claim alternate/failure sequence
|
|
142
|
-
|
|
143
|
-
```mermaid
|
|
144
|
-
sequenceDiagram
|
|
145
|
-
participant C as Consumer
|
|
146
|
-
participant P as PersonalMeetingRoom index.ts
|
|
147
|
-
participant R as claimPmr request helper
|
|
148
|
-
participant S as PMR service
|
|
149
|
-
C->>P: claim(link, pin, preferred)
|
|
150
|
-
P->>P: build identity context
|
|
151
|
-
P->>R: claimPmr(options)
|
|
152
|
-
R->>R: validate required options, pin, and link
|
|
153
|
-
R->>S: claim operation
|
|
154
|
-
alt accepted PMR response
|
|
155
|
-
S-->>P: PMR body
|
|
156
|
-
P->>P: copy PMR/SIP/link/owner/name/number fields
|
|
157
|
-
P-->>C: PMR body
|
|
158
|
-
else required option is absent
|
|
159
|
-
R--xC: synchronous ParameterError
|
|
160
|
-
else pin/link is invalid or service rejects
|
|
161
|
-
R--xC: rejected promise
|
|
162
|
-
end
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Class / Component Relationships
|
|
166
|
-
|
|
167
|
-
```mermaid
|
|
168
|
-
classDiagram
|
|
169
|
-
class Caller
|
|
170
|
-
class PMR
|
|
171
|
-
class MeetingInfo
|
|
172
|
-
class Util
|
|
173
|
-
class Request
|
|
174
|
-
class LookupService
|
|
175
|
-
class ClaimService
|
|
176
|
-
Caller --> PMR
|
|
177
|
-
PMR --> MeetingInfo
|
|
178
|
-
MeetingInfo --> LookupService
|
|
179
|
-
PMR --> Request
|
|
180
|
-
Request --> Util
|
|
181
|
-
Request --> ClaimService
|
|
182
|
-
ClaimService --> Request
|
|
183
|
-
Request --> PMR
|
|
184
|
-
PMR --> Caller
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
The arrows identify ownership and delegation inside `src/personal-meeting-room/`; files that only declare types or constants are not presented as transports.
|
|
188
|
-
|
|
189
|
-
## Use Cases
|
|
190
|
-
|
|
191
|
-
- **UC-1:** Fetch personal-room information through the injected meeting-info service and reject a response that is absent or not a PMR. Evidence: `src/personal-meeting-room/index.ts`.
|
|
192
|
-
- **UC-2:** Claim a PMR through `PersonalMeetingRoomRequest.claimPmr()`, cache accepted response fields, and return the response body. Evidence: `src/personal-meeting-room/index.ts`, `src/personal-meeting-room/request.ts`.
|
|
193
|
-
- **UC-3:** Propagate lookup or claim failures without fabricating a cached room or fallback transport. Evidence: `src/personal-meeting-room/index.ts`, `src/personal-meeting-room/request.ts`.
|
|
194
|
-
|
|
195
|
-
## State Model
|
|
196
|
-
|
|
197
|
-
The plugin retains current PMR information and request helper state for the owning SDK instance.
|
|
198
|
-
|
|
199
|
-
## Business Rules & Invariants
|
|
200
|
-
|
|
201
|
-
- PMR data comes from the service response; claim uses current authenticated identity and never fabricates room ownership. Enforced under `src/personal-meeting-room/`.
|
|
202
|
-
|
|
203
|
-
## Concurrency & Reactive Flow
|
|
204
|
-
|
|
205
|
-
- Lookup and claim calls are independent promises with no cancellation or response-order guard. Each accepted completion calls `set`, so the last completion to resolve overwrites the cached PMR fields.
|
|
206
|
-
|
|
207
|
-
## Error Handling & Failure Modes
|
|
208
|
-
|
|
209
|
-
| Condition | Signal | Caller recovery |
|
|
210
|
-
|---|---|---|
|
|
211
|
-
| A required request-builder option is absent | `PersonalMeetingRoomRequest.claimPmr()` throws `ParameterError` synchronously before it returns a promise. | Supply user id, passcode, meeting address, and a truthy preferred flag before calling. |
|
|
212
|
-
| Pin or meeting link has an invalid format | `PersonalMeetingRoomRequest.claimPmr()` returns a rejected `ParameterError` promise. | Correct the formatted pin/link and handle the returned rejection. |
|
|
213
|
-
| Lookup returns no PMR or lookup/claim service rejects | The returned promise rejects; no listener/timer cleanup is involved. | Handle service availability or retry as a new lookup/claim. |
|
|
214
|
-
| Lookup or claim returns an accepted PMR body | `index.ts` copies the PMR, SIP URI, link, owner, name, and number fields and returns the body. | Read the instance's current cached room projection. |
|
|
215
|
-
|
|
216
|
-
## Pitfalls
|
|
217
|
-
|
|
218
|
-
- A PMR is meeting metadata, not an already joined Meeting. Consumers must still create/join through Meetings.
|
|
219
|
-
- Verify both typed constants/enums and raw wire values before changing a logical condition in this legacy package.
|
|
220
|
-
|
|
221
|
-
## Test-Case Strategy (module)
|
|
222
|
-
|
|
223
|
-
Use the current mirrored suites: `test/unit/spec/personal-meeting-room/personal-meeting-room.js`. Characterize the personal-meeting-room-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
224
|
-
|
|
225
|
-
| Behavior / Requirement | Existing test evidence | Gap |
|
|
226
|
-
|---|---|---|
|
|
227
|
-
| `PERSONAL-MEETING-ROOM-R-001` | `test/unit/spec/personal-meeting-room/personal-meeting-room.js` | cover valid/invalid lookup and successful/failed claim as separate paths |
|
|
228
|
-
| `PERSONAL-MEETING-ROOM-R-002` | `test/unit/spec/personal-meeting-room/personal-meeting-room.js` | cover accepted claim response fields and request-body forwarding together |
|
|
229
|
-
| `PERSONAL-MEETING-ROOM-R-003` | `test/unit/spec/personal-meeting-room/personal-meeting-room.js` | distinguish synchronous missing-option throws from invalid pin/link and service promise rejections, and assert failures leave no fabricated cached state |
|
|
230
|
-
|
|
231
|
-
## Traceability
|
|
232
|
-
|
|
233
|
-
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
234
|
-
- Coverage state and contracts baseline: `../../../.sdd/manifest.json`
|