@webex/plugin-meetings 3.13.0-next.12 → 3.13.0-next.14
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,256 +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
|
-
# 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`
|
|
@@ -1,293 +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-09-08T00:00:00Z
|
|
8
|
-
validation_status: pass-with-warnings
|
|
9
|
-
-->
|
|
10
|
-
# LOCUS INFO — 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/locus-info/`.
|
|
13
|
-
|
|
14
|
-
## Metadata
|
|
15
|
-
|
|
16
|
-
| Field | Value |
|
|
17
|
-
|---|---|
|
|
18
|
-
| Module id | `locus-info` |
|
|
19
|
-
| Source path(s) | `src/locus-info/` |
|
|
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-09-08T00:00:00Z |
|
|
25
|
-
| Revalidated against | `b7b93b443e` (manual diff review of `f9a29f61..b7b93b443e`; not a generator/validator tool run) |
|
|
26
|
-
| Validation status | pass-with-warnings |
|
|
27
|
-
|
|
28
|
-
## Evidence Rules
|
|
29
|
-
|
|
30
|
-
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.
|
|
31
|
-
|
|
32
|
-
## Source Material Register
|
|
33
|
-
|
|
34
|
-
| Source material | Scope | Decision | Detail location or disposition |
|
|
35
|
-
|---|---|---|---|
|
|
36
|
-
| No routed legacy module spec | overview / API / behavior / tests | none; generated from current parser/state code and tests |
|
|
37
|
-
| Current source and mirrored tests | implementation / tests | verified | requirements, flows, failures, and test strategy below |
|
|
38
|
-
|
|
39
|
-
## Overview
|
|
40
|
-
|
|
41
|
-
`src/locus-info/` contains 10 direct source/reference file(s) and has 10 mirrored unit-test file(s). This spec separates its public operations, runtime data movement, component ownership, state applicability, and verification boundary.
|
|
42
|
-
|
|
43
|
-
## Purpose / Responsibility
|
|
44
|
-
|
|
45
|
-
Normalizes Locus full-state, delta, API-response, and hash-tree inputs into one meeting-state projection and scoped callbacks.
|
|
46
|
-
|
|
47
|
-
## Stack
|
|
48
|
-
|
|
49
|
-
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`.
|
|
50
|
-
|
|
51
|
-
## Folder / Package Structure
|
|
52
|
-
|
|
53
|
-
```text
|
|
54
|
-
src/locus-info/
|
|
55
|
-
├── controlsUtils.ts — controlsUtils implementation responsibility
|
|
56
|
-
├── embeddedAppsUtils.ts — embeddedAppsUtils implementation responsibility
|
|
57
|
-
├── fullState.ts — state projection or transition logic
|
|
58
|
-
├── hostUtils.ts — hostUtils implementation responsibility
|
|
59
|
-
├── index.ts — module facade/controller or primary exports
|
|
60
|
-
├── infoUtils.ts — infoUtils implementation responsibility
|
|
61
|
-
├── mediaSharesUtils.ts — mediaSharesUtils implementation responsibility
|
|
62
|
-
├── parser.ts — parser implementation responsibility
|
|
63
|
-
├── selfUtils.ts — selfUtils implementation responsibility
|
|
64
|
-
├── types.ts — module type declarations
|
|
65
|
-
└── ai-docs/locus-info-spec.md — canonical module specification
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Key Files (source of truth)
|
|
69
|
-
|
|
70
|
-
| File | Holds |
|
|
71
|
-
|---|---|
|
|
72
|
-
| `src/locus-info/controlsUtils.ts` | controlsUtils implementation responsibility |
|
|
73
|
-
| `src/locus-info/embeddedAppsUtils.ts` | embeddedAppsUtils implementation responsibility |
|
|
74
|
-
| `src/locus-info/fullState.ts` | state projection or transition logic |
|
|
75
|
-
| `src/locus-info/hostUtils.ts` | hostUtils implementation responsibility |
|
|
76
|
-
| `src/locus-info/index.ts` | module facade/controller or primary exports |
|
|
77
|
-
| `src/locus-info/infoUtils.ts` | infoUtils implementation responsibility |
|
|
78
|
-
| `src/locus-info/mediaSharesUtils.ts` | mediaSharesUtils implementation responsibility |
|
|
79
|
-
| `src/locus-info/parser.ts` | parser implementation responsibility |
|
|
80
|
-
| `src/locus-info/selfUtils.ts` | selfUtils implementation responsibility |
|
|
81
|
-
| `src/locus-info/types.ts` | module type declarations |
|
|
82
|
-
| `test/unit/spec/locus-info/controlsUtils.js` and 9 sibling test file(s) | mirrored characterization/unit coverage |
|
|
83
|
-
|
|
84
|
-
## Public Surface
|
|
85
|
-
|
|
86
|
-
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
87
|
-
|---|---|---|---|---|---|---|
|
|
88
|
-
| `locus-info.1` | SDK / initialization | `init()`, `initialSetup()`, `handleLocusAPIResponse()`, and `applyLocusDeltaData()` / `handleLocusDelta()` | Establish the Locus projection and serialize API/Mercury delta entry paths. | Preserve initialization order and single-event mutation discipline. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
89
|
-
| `locus-info.2` | SDK / hash-tree | `updateLocusFromHashTreeObject()`, `sendClassicVsHashTreeMismatchMetric()`, and `syncAllHashTreeDatasets()` | Convert synchronized hash-tree objects into the same Locus projection and emit the existing metric when the update arrives in the unexpected transport shape. | Preserve parser callback ownership, metric trigger conditions, and dataset synchronization boundaries. | `src/locus-info/index.ts`, `src/hashTree/hashTreeParser.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
90
|
-
| `locus-info.3` | SDK / parsing/event | `parse()`, `emitScoped()`, `onFullLocus()`, `onDeltaLocus()`, and `handleOneOnOneEvent()` | Parse full/delta payloads and notify composed Meeting controllers through scoped callbacks. | Preserve callback names/payloads and one-on-one handling. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
91
|
-
| `locus-info.4` | SDK / projection | `updateLocusInfo()`, `getLocusPartner()`, `isMeetingActive()`, `suspendDestroyMeeting()`, `compareAndUpdate()`, and `compareSelfAndHost()` | Reconcile core meeting activity, partner, self, and host changes without duplicating remote transport. | Preserve comparison semantics and destroy-suspension behavior. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
92
|
-
| `locus-info.5` | SDK / projection | `updateParticipants()`, `updateControls()`, `updateConversationUrl()`, `updateCreated()`, `updateLinks()`, `updateFullState()`, `updateHostInfo()`, `updateMeetingInfo()`, `updateEmbeddedApps()`, `updateMediaShares()`, `updateReplaces()`, `updateSelf()`, `ensureSelfParticipantExists()`, and `mergeParticipants()` | Project the complete set of Locus subdocuments into Meeting, Members, controls, media shares, and related state. | Preserve per-subdocument comparison and callback routing. | `src/locus-info/index.ts`, `src/locus-info/controlsUtils.ts`, `src/locus-info/embeddedAppsUtils.ts`, `src/locus-info/mediaSharesUtils.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
93
|
-
| `locus-info.6` | SDK / identity/cache | `updateLocusUrl()`, `updateAclUrl()`, `updateBasequence()`, `updateSequence()`, `updateLocusCache()`, `getTheLocusToUpdate()`, `updateMainSessionLocusCache()`, `clearMainSessionLocusCache()`, and `cleanUp()` | Maintain the current/main Locus identity and cached payload used for subsequent comparison. | Preserve main-session separation and cleanup of owned parser/cache state. | `src/locus-info/index.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
94
|
-
| `locus-info.7` | parser comparison | `locus2string()`, `checkSequenceOverlap()`, `checkUnequalRanges()`, `checkForUniqueEntries()`, `checkIfOutOfSync()`, `compare()`, `compareFullDtoSequence()`, `isNewFullLocus()`, `compareSequence()`, `compareToAction()`, `extractComparisonState()`, `getMetaData()`, `getUniqueSequences()`, `getNumbersOutOfRange()`, `isValidLocus()`, `isSequenceEmpty()`, and `isLoci()` | Determine whether a delta is contiguous, duplicate, missing, or requires a full sync. | Preserve concrete `IDLE`, `PAUSED`, `WORKING`, and `BLOCKED` parser-state transitions. | `src/locus-info/parser.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
95
|
-
| `locus-info.8` | parser queue/lifecycle | `nextEvent()`, `onDeltaAction()`, `onDeltaEvent()`, `packComparisonResult()`, `pause()`, `processDeltaEvent()`, `resume()`, and `getDebugMessage()` | Serialize queued deltas and expose/debug the parser's current blocking/working state. | Pause/resume and queue ordering are observable through applied callback order. | `src/locus-info/parser.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
96
|
-
| `locus-info.9` | exported helpers/contracts | `findMeetingForHashTreeMessage()`, `createLocusFromHashTreeMessage()`, `LocusLLMEvent`, `LocusApiResponseBody`, `HashTreeParserEntry`, `LocusInfoCallbacks`, `DisplayHintSection`, `EndMeetingReason`, `LocusFullState`, `Links`, `LocusDTO`, `ReplacesInfo`, and `LocusErrorCodes` | Share the exact Locus/hash-tree integration vocabulary used by Meetings and composed controllers. | Add fields compatibly; raw error/status/link shapes remain cross-module contracts. | `src/locus-info/index.ts`, `src/locus-info/types.ts`, `src/locus-info/fullState.ts`, `src/locus-info/infoUtils.ts` | [CONTRACTS](../../../ai-docs/CONTRACTS.md) |
|
|
97
|
-
|
|
98
|
-
Compatibility notes:
|
|
99
|
-
- 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.
|
|
100
|
-
|
|
101
|
-
## Requires (dependencies)
|
|
102
|
-
|
|
103
|
-
Locus payloads and fetch access, hash-tree parser, event scope utilities, member/meeting callbacks, and metrics.
|
|
104
|
-
|
|
105
|
-
## Requirements
|
|
106
|
-
|
|
107
|
-
| ID | WHAT | WHY | Source Evidence | Test / Example Evidence | Assumptions / Gaps | Confidence |
|
|
108
|
-
|---|---|---|---|---|---|---|
|
|
109
|
-
| `LOCUS-INFO-R-001` | initialize/parse/update Locus state. | Normalizes Locus full-state, delta, API-response, and hash-tree inputs into one meeting-state projection and scoped callbacks. | `src/locus-info/index.ts` | `test/unit/spec/locus-info/index.js` | none | PRESENT |
|
|
110
|
-
| `LOCUS-INFO-R-002` | apply full, delta, API, and hash-tree updates. | Full, delta, API, and hash-tree inputs must converge on one ordered Locus projection without applying gaps. | `src/locus-info/index.ts`, `src/locus-info/parser.ts` | `test/unit/spec/locus-info/index.js` | internal full-sync failure while parser is blocked needs explicit recovery coverage | PRESENT |
|
|
111
|
-
| `LOCUS-INFO-R-003` | Malformed or stale deltas follow parser comparison rules. `doLocusSync()` returns `undefined`, intentionally ignores the request chain, falls back from delta to full sync when allowed, logs/destroys on terminal failure, and resumes the parser in `finally` when the meeting survives. | Parser recovery is internal and must not be documented as a caller-visible rejected promise when no such promise is returned. | `src/locus-info/index.ts`, `src/locus-info/parser.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | terminal sync/destroy and parser-resume ordering need explicit coverage | PRESENT |
|
|
112
|
-
| `LOCUS-INFO-R-004` | Full-state, delta, API-response, and hash-tree inputs converge through parsers into the same current Locus projection. | Alternate synchronization transports must not expose divergent meeting state. | `src/locus-info/index.ts`, `src/locus-info/parser.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | none | PRESENT |
|
|
113
|
-
| `LOCUS-INFO-R-005` | Sequence/dataset gaps trigger synchronization rather than speculative application. `sendClassicVsHashTreeMismatchMetric()` reports an unexpected classic-Locus transport shape while hash-tree mode is enabled; it does not compare classic and hash-tree state values. | Applying stale or incomplete remote state can produce false meeting/member/control events, while the metric contract must not imply a state-diff computation that does not exist. | `src/locus-info/index.ts`, `src/hashTree/hashTreeParser.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/hashTree/hashTreeParser.ts` | none | PRESENT |
|
|
114
|
-
| `LOCUS-INFO-R-006` | Normalized changes invoke the correct scoped callback/event for members, self, controls, media shares, host, embedded apps, and meeting lifecycle. | Parent Meeting and consumers need domain-specific deltas, not an undifferentiated Locus payload. | `src/locus-info/index.ts`, `src/locus-info/controlsUtils.ts`, `src/locus-info/selfUtils.ts` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/controlsUtils.js`, `test/unit/spec/locus-info/selfUtils.js` | none | PRESENT |
|
|
115
|
-
| `LOCUS-INFO-R-007` | `LocusErrorCodes` is the shared catalogue of raw Locus `errorCode` values the client branches on: `LOCUS_INACTIVE` (`2403004`) and `LOCUS_USER_FULL` (`2423001`). When constructing the hash-tree parser, `LocusInfo` injects `isLlmExpected: () => this.parsedLocus.self?.joinedWith?.state === 'JOINED'`, so LLM-dataset heartbeat supervision is gated on the current device being joined rather than on `self` being joined from any device. | These numeric codes cross module boundaries and drive caller-visible decisions (see `MEETING-R-009`), so their values are contracts, not internal constants. Anchoring the LLM expectation on `joinedWith` prevents heartbeat watchdogs from supervising a transport this device does not hold. | `src/locus-info/types.ts`, `src/locus-info/index.ts` | `test/unit/spec/locus-info/index.js` | none | PRESENT |
|
|
116
|
-
|
|
117
|
-
## Design Overview
|
|
118
|
-
|
|
119
|
-
`LocusInfo` owns the normalized meeting projection. The utility files compare individual Locus domains, while `parser.ts` serializes delta application and calls `LocusInfo.doLocusSync()` when a gap requires the parent meeting request to fetch a full DTO.
|
|
120
|
-
|
|
121
|
-
## Data Flow
|
|
122
|
-
|
|
123
|
-
```mermaid
|
|
124
|
-
flowchart LR
|
|
125
|
-
LocusEvent[Locus full or delta event] --> Info[index.ts]
|
|
126
|
-
Info --> Parser[parser.ts delta sequencer]
|
|
127
|
-
Parser --> Utils[controls/self/info/media-share/host/app utils]
|
|
128
|
-
Parser --> Sync[LocusInfo.doLocusSync]
|
|
129
|
-
Sync --> Request[meetingRequest.getLocusDTO]
|
|
130
|
-
Request --> Parser
|
|
131
|
-
Utils --> Projection[normalized meeting projection + change flags]
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Sequence Diagram(s)
|
|
135
|
-
|
|
136
|
-
Sequence coverage:
|
|
137
|
-
|
|
138
|
-
| Operation group | Diagram | Failure coverage |
|
|
139
|
-
|---|---|---|
|
|
140
|
-
| UC-1…UC-6 — Locus projection and recovery operation groups | Locus projection and recovery primary sequence | duplicate/out-of-order delta, blocked parser, internal sync failure, and cache cleanup |
|
|
141
|
-
| UC-1…UC-6 — Locus projection and recovery alternate/failure paths | Locus projection and recovery alternate/failure sequence | out-of-order delta, missing sequence range, invalid Locus shape, or full-sync request rejection |
|
|
142
|
-
|
|
143
|
-
### Locus projection and recovery primary sequence
|
|
144
|
-
|
|
145
|
-
```mermaid
|
|
146
|
-
sequenceDiagram
|
|
147
|
-
participant E as Locus event
|
|
148
|
-
participant L as LocusInfo
|
|
149
|
-
participant P as parser.ts
|
|
150
|
-
participant R as meetingRequest
|
|
151
|
-
E-->>L: full DTO or delta
|
|
152
|
-
alt full DTO
|
|
153
|
-
L->>L: onFullLocus applies the authoritative projection
|
|
154
|
-
else delta
|
|
155
|
-
L->>L: handleLocusDelta(response)
|
|
156
|
-
L->>P: onDeltaEvent queues and compares the delta
|
|
157
|
-
alt contiguous delta
|
|
158
|
-
P->>P: apply utility comparisons
|
|
159
|
-
else missing/out-of-order delta
|
|
160
|
-
P->>L: request full synchronization
|
|
161
|
-
L->>R: getLocusDTO()
|
|
162
|
-
R-->>L: synchronized Locus response
|
|
163
|
-
alt response contains a delta
|
|
164
|
-
L->>L: handleLocusDelta(response)
|
|
165
|
-
L->>P: onDeltaEvent(response)
|
|
166
|
-
else response contains a full DTO
|
|
167
|
-
L->>L: onFullLocus applies the synchronized DTO
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
L->>L: expose normalized state and change flags
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Locus projection and recovery alternate/failure sequence
|
|
175
|
-
|
|
176
|
-
```mermaid
|
|
177
|
-
sequenceDiagram
|
|
178
|
-
participant E as Locus delta input
|
|
179
|
-
participant L as LocusInfo
|
|
180
|
-
participant P as parser.ts sequencer
|
|
181
|
-
participant R as meetingRequest.getLocusDTO
|
|
182
|
-
E-->>L: delta with sequence range
|
|
183
|
-
L->>P: enqueue and compare against current sequence
|
|
184
|
-
alt gap or mismatch requires full synchronization
|
|
185
|
-
P->>L: request synchronization
|
|
186
|
-
L->>R: getLocusDTO()
|
|
187
|
-
alt synchronization succeeds
|
|
188
|
-
R-->>L: full DTO
|
|
189
|
-
L->>L: onFullLocus applies the full DTO directly
|
|
190
|
-
L->>P: resume queued deltas after handling settles
|
|
191
|
-
else terminal synchronization rejects
|
|
192
|
-
R--xL: rejected request
|
|
193
|
-
L->>L: log and destroy meeting
|
|
194
|
-
L->>P: do not resume destroyed meeting parser
|
|
195
|
-
end
|
|
196
|
-
else stale or applicable delta
|
|
197
|
-
P->>P: ignore stale input or apply current delta
|
|
198
|
-
end
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
## Class / Component Relationships
|
|
202
|
-
|
|
203
|
-
```mermaid
|
|
204
|
-
classDiagram
|
|
205
|
-
class LocusEvent
|
|
206
|
-
class Info
|
|
207
|
-
class Parser
|
|
208
|
-
class Utils
|
|
209
|
-
class Sync
|
|
210
|
-
class Request
|
|
211
|
-
class Projection
|
|
212
|
-
LocusEvent --> Info
|
|
213
|
-
Info --> Parser
|
|
214
|
-
Parser --> Utils
|
|
215
|
-
Parser --> Sync
|
|
216
|
-
Sync --> Request
|
|
217
|
-
Request --> Parser
|
|
218
|
-
Utils --> Projection
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
The arrows identify ownership and delegation inside `src/locus-info/`; files that only declare types or constants are not presented as transports.
|
|
222
|
-
|
|
223
|
-
## Use Cases
|
|
224
|
-
|
|
225
|
-
- **UC-1:** Initialize from a full Locus API response and project self, host, participants, controls, links, meeting info, shares, embedded apps, and replacement state. Evidence: `src/locus-info/index.ts`.
|
|
226
|
-
- **UC-2:** Serialize incoming Locus deltas so only one queued event mutates the projection at a time. Evidence: `src/locus-info/parser.ts`, `src/locus-info/index.ts`.
|
|
227
|
-
- **UC-3:** Pause/block parsing and initiate the internal full-sync path when sequence comparison finds missing or out-of-order state. Evidence: `src/locus-info/parser.ts`, `src/locus-info/index.ts`.
|
|
228
|
-
- **UC-4:** Convert hash-tree messages/API responses into Locus updates and emit the existing diagnostic when a classic-Locus-shaped update arrives while hash-tree mode is enabled; no classic-vs-hash-tree value comparison is performed. Evidence: `src/locus-info/index.ts`, `src/hashTree/hashTreeParser.ts`.
|
|
229
|
-
- **UC-5:** Emit scoped callbacks only for the Locus subdocuments that changed, preserving Meeting/Members/controller ownership. Evidence: `src/locus-info/index.ts`, `src/locus-info/controlsUtils.ts`, `src/locus-info/embeddedAppsUtils.ts`, `src/locus-info/mediaSharesUtils.ts`.
|
|
230
|
-
- **UC-6:** Maintain and clear distinct current/main-session Locus caches as breakout session context changes. Evidence: `src/locus-info/index.ts`.
|
|
231
|
-
|
|
232
|
-
## State Model
|
|
233
|
-
|
|
234
|
-
Normalized Locus, sequence/dataset state, meeting activity, partner/self/member projections, and suspension flags are held per meeting.
|
|
235
|
-
|
|
236
|
-
## Business Rules & Invariants
|
|
237
|
-
|
|
238
|
-
- Older or mismatched updates must not silently replace newer state; self participant existence and dataset consistency are repaired before callbacks. Enforced by `src/locus-info/index.ts` and supporting code under `src/locus-info/`.
|
|
239
|
-
|
|
240
|
-
## Concurrency & Reactive Flow
|
|
241
|
-
|
|
242
|
-
- Delta inputs are ordered by the parser's sequence state. A gap/mismatch enters the parser's synchronization path and the returned full DTO is parsed before later changes are exposed; stale inputs follow the comparison result instead of being applied speculatively.
|
|
243
|
-
|
|
244
|
-
## State Machine
|
|
245
|
-
|
|
246
|
-
```mermaid
|
|
247
|
-
stateDiagram-v2
|
|
248
|
-
[*] --> IDLE
|
|
249
|
-
IDLE --> WORKING: dequeue delta
|
|
250
|
-
WORKING --> IDLE: queue drained
|
|
251
|
-
WORKING --> BLOCKED: missing predecessor
|
|
252
|
-
BLOCKED --> WORKING: predecessor arrives
|
|
253
|
-
WORKING --> PAUSED: full sync starts
|
|
254
|
-
PAUSED --> WORKING: resume after sync
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
The diagram uses the parser's `IDLE`, `WORKING`, `BLOCKED`, and `PAUSED` values from `src/locus-info/parser.ts`.
|
|
258
|
-
|
|
259
|
-
## Protocol / Wire Format
|
|
260
|
-
|
|
261
|
-
- External payloads are parsed/serialized by files under `src/locus-info/` 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.
|
|
262
|
-
|
|
263
|
-
## Error Handling & Failure Modes
|
|
264
|
-
|
|
265
|
-
| Condition | Signal | Caller recovery |
|
|
266
|
-
|---|---|---|
|
|
267
|
-
| Delta sequence is stale, out of order, or has a missing range | `parser.ts` follows its sequence comparison result: stale input is not speculatively applied, and a gap requests full synchronization. | Wait for the synchronized DTO before consuming later projected changes. |
|
|
268
|
-
| `getLocusDTO()` rejects during `doLocusSync()` | The private method's internal promise chain handles the failure by logging and, on the terminal path, destroying the meeting; `doLocusSync()` itself returns `undefined`, so no rejection is propagated to a caller. Its `finally` resumes the parser when the meeting survives. | Observe the owning meeting/parser lifecycle rather than awaiting a nonexistent synchronization promise. |
|
|
269
|
-
| Full/API/hash-tree input is accepted | `LocusInfo` updates its normalized projection and invokes only the callbacks for changed member, self, control, share, host, app, or lifecycle fields. | Consume the scoped change callback rather than the raw Locus payload. |
|
|
270
|
-
|
|
271
|
-
## Pitfalls
|
|
272
|
-
|
|
273
|
-
- Full, delta, and hash-tree messages can overlap or arrive out of order. Updating callbacks before reconciliation creates transient false state.
|
|
274
|
-
- Public behavior may be reachable through a parent `Meeting`/`Meetings` object even when the source helper is not exported directly.
|
|
275
|
-
|
|
276
|
-
## Test-Case Strategy (module)
|
|
277
|
-
|
|
278
|
-
Use the current mirrored suites: `test/unit/spec/locus-info/controlsUtils.js`, `test/unit/spec/locus-info/embeddedAppsUtils.js`, `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/infoUtils.js`, `test/unit/spec/locus-info/lib/BasicSeqCmp.json`, `test/unit/spec/locus-info/lib/SeqCmp.json`, `test/unit/spec/locus-info/mediaSharesUtils.ts`, `test/unit/spec/locus-info/parser.js`, `test/unit/spec/locus-info/selfConstant.js`, `test/unit/spec/locus-info/selfUtils.js`. Characterize the locus-info-specific use cases above and each listed failure condition; add cleanup or transition cases only for resources and state this module actually owns.
|
|
279
|
-
|
|
280
|
-
| Behavior / Requirement | Existing test evidence | Gap |
|
|
281
|
-
|---|---|---|
|
|
282
|
-
| `LOCUS-INFO-R-001` | `test/unit/spec/locus-info/index.js` | cover full/API/delta/hash-tree entry paths and every changed-subdocument callback family |
|
|
283
|
-
| `LOCUS-INFO-R-002` | `test/unit/spec/locus-info/index.js` | internal full-sync failure while parser is blocked needs explicit recovery coverage |
|
|
284
|
-
| `LOCUS-INFO-R-003` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | characterize internal sync failure handling, blocked-queue resume, and cleanup without implying caller rejection |
|
|
285
|
-
| `LOCUS-INFO-R-004` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/locus-info/parser.js` | none |
|
|
286
|
-
| `LOCUS-INFO-R-005` | `test/unit/spec/locus-info/index.js`, `test/unit/spec/hashTree/hashTreeParser.ts` | verify sequence/dataset recovery separately from the unexpected-transport-shape metric trigger |
|
|
287
|
-
| `LOCUS-INFO-R-006` | `test/unit/spec/locus-info/controlsUtils.js`, `test/unit/spec/locus-info/selfUtils.js` | verify every callback family during focused changes |
|
|
288
|
-
| `LOCUS-INFO-R-007` | `test/unit/spec/locus-info/index.js` | covered for the `isLlmExpected` joined and self-joined-but-device-not-joined cases; add a case per `LocusErrorCodes` value as new codes are added |
|
|
289
|
-
|
|
290
|
-
## Traceability
|
|
291
|
-
|
|
292
|
-
- Repo architecture: [`ARCHITECTURE.md`](../../../ai-docs/ARCHITECTURE.md) · Registry: [`SPEC_INDEX.md`](../../../ai-docs/SPEC_INDEX.md)
|
|
293
|
-
- Coverage state and contracts baseline: `../../../.sdd/manifest.json`
|