@webex/plugin-meetings 3.13.0-next.13 → 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.
Files changed (100) hide show
  1. package/.repo-context.json +577 -0
  2. package/.sdd/manifest.json +1320 -428
  3. package/AGENTS.md +528 -72
  4. package/dist/aiEnableRequest/index.js +1 -1
  5. package/dist/breakouts/breakout.js +1 -1
  6. package/dist/breakouts/index.js +1 -1
  7. package/dist/config.js +1 -1
  8. package/dist/interpretation/index.js +1 -1
  9. package/dist/interpretation/siLanguage.js +1 -1
  10. package/dist/webinar/index.js +1 -1
  11. package/docs/adr/0001-migrate-existing-docs-into-sdd.md +141 -0
  12. package/docs/adr/index.md +26 -0
  13. package/docs/architecture.md +816 -0
  14. package/docs/getting-started.md +177 -0
  15. package/docs/index.md +53 -0
  16. package/docs/specs/README.md +126 -0
  17. package/package.json +21 -21
  18. package/schemas/repo-context.schema.json +796 -0
  19. package/src/aiEnableRequest/docs/README.md +376 -0
  20. package/src/annotation/docs/README.md +402 -0
  21. package/src/breakouts/docs/README.md +643 -0
  22. package/src/controls-options-manager/docs/README.md +365 -0
  23. package/src/hashTree/docs/README.md +566 -0
  24. package/src/interceptors/docs/README.md +434 -0
  25. package/src/interpretation/docs/README.md +420 -0
  26. package/src/locus-info/docs/README.md +609 -0
  27. package/src/media/docs/README.md +488 -0
  28. package/src/meeting/docs/README.md +834 -0
  29. package/src/meeting-info/docs/README.md +352 -0
  30. package/src/meetings/docs/README.md +549 -0
  31. package/src/member/docs/README.md +347 -0
  32. package/src/members/docs/README.md +514 -0
  33. package/src/metrics/docs/README.md +287 -0
  34. package/src/multistream/docs/README.md +523 -0
  35. package/src/personal-meeting-room/docs/README.md +322 -0
  36. package/src/reachability/docs/README.md +548 -0
  37. package/src/reactions/docs/README.md +296 -0
  38. package/src/reconnection-manager/docs/README.md +485 -0
  39. package/src/recording-controller/docs/README.md +335 -0
  40. package/src/roap/docs/README.md +444 -0
  41. package/src/webinar/docs/README.md +425 -0
  42. package/.sdd/templates/.source.json +0 -30
  43. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +0 -111
  44. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +0 -321
  45. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +0 -59
  46. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +0 -49
  47. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +0 -42
  48. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +0 -120
  49. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +0 -206
  50. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +0 -90
  51. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +0 -68
  52. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +0 -111
  53. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +0 -57
  54. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +0 -69
  55. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +0 -96
  56. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +0 -84
  57. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +0 -82
  58. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +0 -94
  59. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +0 -64
  60. package/.sdd/templates/component-repo/template-map.json +0 -112
  61. package/ai-docs/ARCHITECTURE.md +0 -208
  62. package/ai-docs/CONTRACTS.md +0 -267
  63. package/ai-docs/DATA_MODEL.md +0 -64
  64. package/ai-docs/GETTING_STARTED.md +0 -73
  65. package/ai-docs/GLOSSARY.md +0 -56
  66. package/ai-docs/REVIEW_CHECKLIST.md +0 -45
  67. package/ai-docs/RULES.md +0 -79
  68. package/ai-docs/SECURITY.md +0 -74
  69. package/ai-docs/SERVICE_STATE.md +0 -59
  70. package/ai-docs/SPEC_INDEX.md +0 -85
  71. package/ai-docs/TEST_INDEX.md +0 -45
  72. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +0 -61
  73. package/ai-docs/patterns/defensive-error-propagation.md +0 -55
  74. package/ai-docs/patterns/event-scope-emission.md +0 -46
  75. package/ai-docs/patterns/source-to-test-path-mirroring.md +0 -45
  76. package/ai-docs/patterns/stateless-plugin-request-classes.md +0 -53
  77. package/ai-docs/patterns/typed-constants-and-enum-values.md +0 -47
  78. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +0 -223
  79. package/src/annotation/ai-docs/annotation-spec.md +0 -236
  80. package/src/breakouts/ai-docs/breakouts-spec.md +0 -324
  81. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +0 -243
  82. package/src/hashTree/ai-docs/hash-tree-spec.md +0 -267
  83. package/src/interceptors/ai-docs/interceptors-spec.md +0 -247
  84. package/src/interpretation/ai-docs/interpretation-spec.md +0 -256
  85. package/src/locus-info/ai-docs/locus-info-spec.md +0 -293
  86. package/src/media/ai-docs/media-spec.md +0 -267
  87. package/src/meeting/ai-docs/meeting-spec.md +0 -404
  88. package/src/meeting-info/ai-docs/meeting-info-spec.md +0 -261
  89. package/src/meetings/ai-docs/meetings-spec.md +0 -298
  90. package/src/member/ai-docs/member-spec.md +0 -196
  91. package/src/members/ai-docs/members-spec.md +0 -256
  92. package/src/metrics/ai-docs/metrics-spec.md +0 -185
  93. package/src/multistream/ai-docs/multistream-spec.md +0 -295
  94. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +0 -234
  95. package/src/reachability/ai-docs/reachability-spec.md +0 -261
  96. package/src/reactions/ai-docs/reactions-spec.md +0 -198
  97. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +0 -272
  98. package/src/recording-controller/ai-docs/recording-controller-spec.md +0 -223
  99. package/src/roap/ai-docs/roap-spec.md +0 -241
  100. package/src/webinar/ai-docs/webinar-spec.md +0 -243
package/AGENTS.md CHANGED
@@ -1,34 +1,128 @@
1
1
  <!-- sdd-generated-metadata
2
2
  doc_kind: agent-entry
3
- generated_from: agents@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-18T15:33:39Z
8
- validation_status: not-run
3
+ generated_from: agents@0.3.0
4
+ generated_by: claude-code
5
+ approved_by: rarajes2@cisco.com
6
+ updated_at: 2026-11-17T03:14:21Z
7
+ validation_status: pass-with-warnings
9
8
  -->
10
- # AGENTS.md — @webex/plugin-meetings
11
9
 
12
- > Read first. Next: [`ai-docs/SPEC_INDEX.md`](ai-docs/SPEC_INDEX.md) for routing and [`ai-docs/ARCHITECTURE.md`](ai-docs/ARCHITECTURE.md) for system design. Load only the affected module specifications.
10
+ # AI Agent Instructions
13
11
 
14
- ## Repo Overview
12
+ Package-scoped SDD entry for `@webex/plugin-meetings`. `@webex/plugin-meetings` is the Webex
13
+ JavaScript SDK plugin for meeting discovery, registration, lifecycle, realtime Locus state,
14
+ participants, WebRTC media, and in-meeting capabilities. This file orients agents; the monorepo root
15
+ `AGENTS.md` governs workspace-wide setup and test-writing conventions.
15
16
 
16
- `@webex/plugin-meetings` is the Webex JavaScript SDK plugin for meeting discovery, registration, lifecycle, realtime Locus state, participants, WebRTC media, and in-meeting capabilities.
17
+ What it is:
17
18
 
18
- **What it is:**
19
19
  - A published library package registered as `webex.meetings` inside the Webex SDK host.
20
- - A client-side coordinator over Webex device, Mercury, Locus, meeting-info, media, and feature services.
20
+ - A client-side coordinator over Webex device, Mercury, Locus, meeting-info, media, and feature
21
+ services.
22
+
23
+ What it is NOT:
21
24
 
22
- **What it is NOT:**
23
25
  - It is not a UI application or a server-side datastore owner.
24
- - It does not own remote Webex service state; its collections and models are client-side projections.
26
+ - It does not own remote Webex service state; its collections and models are client-side
27
+ projections.
28
+
29
+ ## Working Method
30
+
31
+ - Read the relevant package files before editing. Do not edit blind.
32
+ - Understand the task and affected surfaces before writing code.
33
+ - Prefer focused edits over rewriting whole files.
34
+ - Do not invent commands, paths, exports, events, or request shapes. Verify them from this package's
35
+ source.
36
+ - Test or validate before declaring done.
37
+ - Keep output concise. If something is uncertain, say so instead of guessing.
38
+
39
+ ## Canonical Repository Documentation
40
+
41
+ Read this file first, then [`docs/specs/README.md`](docs/specs/README.md) for routing and
42
+ [`docs/architecture.md`](docs/architecture.md) for system design. Load only the affected module
43
+ specifications. Before changing code or documentation, start with:
44
+
45
+ - [`docs/index.md`](docs/index.md) for package documentation navigation;
46
+ - [`docs/architecture.md`](docs/architecture.md) for package boundaries, interactions, and the
47
+ contract index;
48
+ - [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
49
+ - the affected module's `src/<module>/docs/README.md`, for example
50
+ [`src/meeting/docs/README.md`](src/meeting/docs/README.md); and
51
+ - [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
52
+
53
+ Load the owning module spec and the rules in this file; do not load every module document.
54
+
55
+ Per-module trust lives in `.sdd/manifest.json` and is mirrored in
56
+ [`docs/specs/README.md`](docs/specs/README.md). Per-module status is defined there: `Specced` is
57
+ authoritative; `Partial` specs are hints that require source cross-checking; `Untracked` modules
58
+ require code cross-checking, tests, and a characterization baseline before modification, until
59
+ promoted. All 23 manifest modules are `Partial` today.
60
+
61
+ Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
62
+ publishes an SDK surface, so its contract artifact is `package.json` (`main` `dist/index.js`, `types`
63
+ `dist/types/index.d.ts`, both built from `src/index.ts`). It serves no HTTP routes, so no OpenAPI
64
+ applies; its Locus, meeting-info, site-preference, and ROAP requests are internal clients linked to
65
+ their request code from the architecture contract index.
66
+
67
+ ## 1. Commands (Run First)
68
+
69
+ Use only documented commands. Do not invent alternatives when a command is missing. Run every command from the
70
+ workspace root: `yarn` to install, and `yarn workspace @webex/plugin-meetings <script>` for the package scripts below, which `package.json` defines.
71
+ Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the workspace root; see
72
+ [Prebuilding](../../../CONTRIBUTING.md#prebuilding).
73
+
74
+ | Role | Command |
75
+ | ---- | ------- |
76
+ | Install | `yarn` (workspace root; the deploy workflow runs the same command) |
77
+ | Start dev environment | N/A — library package with no start script in `package.json` |
78
+ | Build | `yarn workspace @webex/plugin-meetings build:src` (transpiles `src/` to `dist/`, then runs `yarn workspace @webex/plugin-meetings build` for TypeScript declarations and assets) |
79
+ | Unit test | `yarn workspace @webex/plugin-meetings test:unit` |
80
+ | Browser test | `yarn workspace @webex/plugin-meetings test:browser` (Karma integration suites; needs Webex test-user credentials) |
81
+ | Lint | `yarn workspace @webex/plugin-meetings test:style` |
82
+ | Build/release artifact | `yarn workspace @webex/plugin-meetings build` (declarations to `dist/types` and assets only; it does not transpile `src/`) |
83
+ | Publish | `yarn workspace @webex/plugin-meetings deploy:npm` (ask first) |
84
+ | Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
85
+
86
+ Toolchain and setup: [`docs/getting-started.md`](docs/getting-started.md) · test routing:
87
+ [`docs/getting-started.md`](docs/getting-started.md#tests).
88
+
89
+ Do not use the `test:broken` script: it chains `test:integration`, which this package does not define.
90
+
91
+ If a required command is unknown, stop and ask for the exact command.
92
+
93
+ ## 2. Agent Persona and Scope
25
94
 
26
- ## Tech Stack
95
+ You are the Webex JS SDK meetings engineering assistant for `@webex/plugin-meetings`.
27
96
 
28
- - TypeScript and JavaScript, Node.js 22.14 for this repository, Yarn workspaces, and legacy Webex build tooling.
29
- - Mocha, Sinon, and `@webex/test-helper-chai` for unit tests; Karma for browser/integration tests; ESLint for style checks.
97
+ Primary outcomes:
30
98
 
31
- ## Architecture
99
+ - Deliver production-safe changes with build, lint, and focused unit tests passing.
100
+ - Preserve existing behavior unless a change request explicitly requires a behavior change.
101
+ - Keep docs and configuration aligned with code changes.
102
+
103
+ Definition of done:
104
+
105
+ 1. Requested change is implemented.
106
+ 2. Build, lint, and the focused unit tests pass locally.
107
+ 3. The owning module spec and the contract index cover new behavior.
108
+ 4. PR summary includes risks and rollback notes.
109
+
110
+ ## 3. Repository Knowledge
111
+
112
+ ### Tech Stack
113
+
114
+ | Area | Tooling | Version |
115
+ | ---------------- | ------- | ------- |
116
+ | Language runtime | node; TypeScript and JavaScript sources | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=18`; the workspace root `package.json` `engines.node` reads `18.x` |
117
+ | Build tool | yarn workspaces, `@webex/legacy-tools` over babel, and `tsc` for declarations | yarn `3.4.1` (root `packageManager`), `typescript` `^4.7.4`, `@babel/core` `^7.17.10` |
118
+ | Test framework | mocha through `webex-legacy-tools test --unit --runner mocha`, sinon, `@webex/test-helper-chai`; karma for the browser tier | sinon `^9.2.4`; mocha `10.0` and karma `^6.4.3` are declared by `@webex/legacy-tools` (`workspace:*`) |
119
+ | Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
120
+
121
+ TypeScript and JavaScript, Node.js 22.14 for this repository, Yarn workspaces, and legacy Webex build
122
+ tooling. Mocha, Sinon, and `@webex/test-helper-chai` for unit tests; Karma for browser/integration
123
+ tests; ESLint for style checks.
124
+
125
+ ### Project Map
32
126
 
33
127
  ```mermaid
34
128
  flowchart LR
@@ -40,11 +134,10 @@ flowchart LR
40
134
  Meetings --> Services[Webex device / Mercury / meeting services]
41
135
  ```
42
136
 
43
- → Full architecture: [`ai-docs/ARCHITECTURE.md`](ai-docs/ARCHITECTURE.md)
44
-
45
- ## Module / Package Structure
137
+ Full architecture: [`docs/architecture.md`](docs/architecture.md).
46
138
 
47
139
  ```text
140
+ src/index.ts — registers webex.meetings with its config and interceptors; package exports
48
141
  src/meetings/ — registered plugin, discovery, registration, and meeting collection
49
142
  src/meeting/ — one meeting lifecycle, media, controls, and events
50
143
  src/meeting-info/ — destination resolution and meeting metadata
@@ -55,46 +148,73 @@ src/reconnection-manager/ — bounded recovery and rejoin orchestration
55
148
  src/breakouts/, interpretation/, annotation/, aiEnableRequest/, webinar/ — in-meeting features
56
149
  src/recording-controller/, controls-options-manager/, personal-meeting-room/, reactions/ — controls
57
150
  src/interceptors/, metrics/ — request middleware and behavioral telemetry
151
+ src/common/, e2ee/, transcription/ — shared errors, events, logs, and queue; media encryption; transcription (no module spec yet)
152
+ test/unit/spec/ — mocha unit suites mirroring src/
153
+ test/integration/spec/ — karma browser suites (test:browser)
154
+ dist/ — generated build output; never edit by hand
58
155
  ```
59
156
 
60
- → Canonical module routing: [`ai-docs/SPEC_INDEX.md`](ai-docs/SPEC_INDEX.md)
157
+ Canonical module routing: [`docs/specs/README.md`](docs/specs/README.md). `README.md`, `UPGRADING.md`,
158
+ `internal-README.md`, and the feature READMEs under `src/breakouts/`, `src/interpretation/`, and
159
+ `src/aiEnableRequest/` are retained context only.
160
+
161
+ ### Critical Constraints
162
+
163
+ - Code and mirrored unit tests are the behavioral source of truth; the retained `README.md`,
164
+ `UPGRADING.md`, `internal-README.md`, and feature READMEs are context, not authority when they
165
+ conflict.
166
+ - Retained `README.md`, `UPGRADING.md`, and feature READMEs may lag current behavior; verify claims
167
+ against current source and tests.
168
+ - Preserve the `webex.meetings` registration and package exports in `src/index.ts`, the public export
169
+ authority; public changes are semver-sensitive.
170
+ - Route Webex HTTP calls through existing request/plugin abstractions and preserve interceptor
171
+ behavior (`LocusRetryStatusInterceptor`, `LocusRouteTokenInterceptor`, and
172
+ `DataChannelAuthTokenInterceptor`, registered in `src/index.ts`).
173
+ - Preserve event scope, ordering, listener cleanup, and correlation identifiers across async flows;
174
+ expect realtime duplication and out-of-order delivery where current code does.
175
+ - Locus full state, deltas, and hash-tree updates are alternate inputs to the same client
176
+ projection; do not apply them as unrelated state.
177
+ - Meeting media setup spans permission, local streams, ROAP, remote streams, and reconnection;
178
+ cleanup is part of the contract.
179
+ - Treat request credentials, JWTs, route and data-channel tokens, device and participant identity
180
+ (participant PII), meeting URLs and passwords, transcripts, captions, and raw media as sensitive.
181
+ Never add `console.log`, and never log these tokens, identities, participant data, or entire
182
+ service payloads.
183
+ - Keep authorization decisions in remote capability, role, and policy gates; do not bypass them
184
+ client-side.
185
+ - Validate and normalize external payloads at existing parser/request boundaries, and avoid exposing
186
+ internal response bodies as new public contracts.
187
+
188
+ ### External Source Access
61
189
 
62
- ## Critical Rules
190
+ | Provider class | Source / host pattern | Preferred access | If unavailable |
191
+ |---|---|---|---|
192
+ | source host | github.com/webex/webex-js-sdk | connector, CLI, or repository checkout | Stop before relying on unavailable remote-only evidence |
193
+ | developer/API docs | developer.webex.com, generated SDK API site | authenticated/public browser or supplied source | Use current local code for behavior; never guess remote contracts |
194
+ | Webex services | device, Mercury, Locus, meeting and media services | configured integration/test environment | Keep unit work mocked; ask before integration claims |
63
195
 
64
- 1. Code and mirrored unit tests are the behavioral source of truth; retained legacy docs are migration inputs, not authority when they conflict.
65
- 2. Ask before coding. Present the affected contracts, plan, and test scope, then wait for approval.
66
- 3. Load the owning module spec and `ai-docs/RULES.md`; do not load every module document.
67
- 4. Preserve the `webex.meetings` registration and package exports in `src/index.ts`; public changes are semver-sensitive.
68
- 5. Route Webex HTTP calls through existing request/plugin abstractions and preserve interceptor behavior.
69
- 6. Preserve event scope, ordering, listener cleanup, and correlation identifiers across async flows.
70
- 7. Treat tokens, identities, participant data, media, transcripts, and meeting URLs as sensitive; never add them to logs.
71
- 8. Match `src/{area}/` changes with `test/unit/spec/{area}/` tests, using Sinon and `@webex/test-helper-chai` conventions.
72
- 9. Update the canonical spec in the same merge as behavior or contract changes.
73
- 10. Never commit secrets, disable quality gates, overwrite protected specs, publish, or deploy without explicit approval.
196
+ Commit and PR history are excluded from current-behavior evidence by repository-owner decision.
74
197
 
75
- ## Essential Commands
198
+ ## 4. Testing Workflow
76
199
 
77
- | Role | Command |
78
- |---|---|
79
- | Install | `yarn install` |
80
- | Build | `yarn workspace @webex/plugin-meetings build:src` |
81
- | Unit test | `yarn workspace @webex/plugin-meetings test:unit` |
82
- | Targeted unit test | `yarn workspace @webex/plugin-meetings test:unit --targets meeting/brbState.ts` |
83
- | Browser test | `yarn workspace @webex/plugin-meetings test:browser` |
84
- | Lint | `yarn workspace @webex/plugin-meetings test:style` |
200
+ Run checks in this order, from the workspace root:
85
201
 
86
- → Toolchain and setup: [`ai-docs/GETTING_STARTED.md`](ai-docs/GETTING_STARTED.md) · test routing: [`ai-docs/TEST_INDEX.md`](ai-docs/TEST_INDEX.md)
202
+ 1. `yarn workspace @webex/plugin-meetings build:src`
203
+ 2. `yarn workspace @webex/plugin-meetings test:unit`
204
+ 3. `yarn workspace @webex/plugin-meetings test:style`
205
+ 4. `yarn workspace @webex/plugin-meetings test:browser`, when a change touches browser, media, or service integration and test-user
206
+ credentials are available
87
207
 
88
- ## Common Gotchas
208
+ Run `build:src` before `test:unit`, because unit specs import the built `dist/`;
209
+ [Getting started](docs/getting-started.md#tests) has the detail and the test-tier table.
89
210
 
90
- 1. `--targets` is relative to `test/unit/spec/`; a filename alone or a repository-relative path selects the wrong target.
91
- 2. Plugin-meetings unit tests are slow. For a narrowly selected test set, temporarily add Mocha `.only`, run it, and remove every `.only` before finishing.
92
- 3. Locus full state, deltas, and hash-tree updates are alternate inputs to the same client projection; do not apply them as unrelated state.
93
- 4. Meeting media setup spans permission, local streams, ROAP, remote streams, and reconnection; cleanup is part of the contract.
94
- 5. Event constants and raw wire values coexist in this legacy package. Search both before changing a state/event condition.
95
- 6. Retained `README.md`, `UPGRADING.md`, and feature READMEs may lag current behavior; verify claims against current source and tests.
211
+ Pass `--targets` to `yarn workspace @webex/plugin-meetings test:unit` to run one file or area: `--targets` is relative to
212
+ `test/unit/spec/` (for example `meeting/brbState.ts`), so a filename alone or a repository-relative
213
+ path selects the wrong target.
96
214
 
97
- The pre-SDD package rule is retained exactly: plugin-meetings unit tests are slow, so always run only the tests you care about. To isolate a single case temporarily:
215
+ Plugin-meetings unit tests are slow, so always run only the tests you care about. To run a single
216
+ test or a set of tests for plugin-meetings, always temporarily add `.only` in the test code, for
217
+ example:
98
218
 
99
219
  ```javascript
100
220
  it.only('should do something', () => {
@@ -102,34 +222,370 @@ it.only('should do something', () => {
102
222
  });
103
223
  ```
104
224
 
105
- Always remove `.only` once you finish running the tests.
225
+ and always remove `.only` once you finish running the tests: temporary `.only` is allowed only
226
+ during a focused run on the smallest target.
227
+
228
+ Testing rules:
229
+
230
+ - Match `src/{area}/` changes with `test/unit/spec/{area}/` tests that mirror the source area, using
231
+ Sinon and `@webex/test-helper-chai` conventions; prefer `calledOnceWithExactly`, fake timers for
232
+ time, shared helpers, and parameterized tests beyond three similar cases.
233
+ - Test happy path, rejection/error, state transition/order, and cleanup for async/event/media work.
234
+ - Redact generated evidence and test fixtures; use synthetic values.
235
+ - Add or update tests for every behavior change, and do not remove tests to make CI pass.
236
+
237
+ No coverage gate applies to this package; do not infer one.
238
+
239
+ ## 5. Code Style and Patterns
240
+
241
+ Coding expectations:
242
+
243
+ - Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
244
+ `root: true` and extends `@webex/eslint-config-legacy`.
245
+ - Reuse constants and typed enums from the owning module. Event constants and raw wire values coexist
246
+ in this legacy package (for example `_LEFT_` and `'LEFT'` in `src/constants.ts`), so searches and
247
+ migrations must include both the typed constant or enum and the raw string form before changing a
248
+ state/event or logical condition or other behavior.
249
+ - Preserve established camelCase/PascalCase file and type conventions; do not rename
250
+ consumer-visible values incidentally.
251
+ - Use `src/common/logs/logger-proxy.ts` or the established injected logger, with existing
252
+ meeting/correlation context.
253
+ - Preserve typed package errors and server rejection details needed by callers.
254
+ - Do not swallow promise rejections, turn failure into success, or add unbounded retries; request
255
+ retries are bounded and do not hide terminal server errors. Bound retry/backoff and timer
256
+ lifetimes.
257
+ - Cleanup listeners, timers, media objects, data channels, edit locks, and queued work on both
258
+ success and failure; make cleanup idempotent.
259
+ - Do not block media/event callbacks with unrelated network work; coordinate shared state through
260
+ existing queues/managers.
261
+ - Import through existing package/module boundaries; HTTP through request helpers, media through
262
+ media-core/helpers, and host capabilities through Webex core plugins/services.
263
+ - Keep public interfaces stable unless a breaking change is requested.
264
+ - Do not import a binding and immediately re-export it, and do not write inline runtime `typeof`
265
+ checks outside descriptively named guards.
266
+
267
+ Keep these rules code-grounded and mechanically checkable where possible. Pattern examples live in
268
+ the subsections below; update this file when package conventions or gates change.
269
+
270
+ ### Defensive error propagation
271
+
272
+ When to use: when request, parser, token, or feature code encounters an invalid input or remote
273
+ failure that affects the caller's operation.
274
+
275
+ Correct:
276
+
277
+ ```ts
278
+ // from src/breakouts/request.ts
279
+ return this.request({
280
+ method: HTTP_VERBS.POST,
281
+ uri: `${url}/message`,
282
+ body: {
283
+ message,
284
+ groups: [params],
285
+ },
286
+ }).catch((error) => {
287
+ if (error.body && error.body.errorCode === 201409036 && error.statusCode === 409) {
288
+ LoggerProxy.logger.info(`Breakouts#broadcast --> no joined participants`);
289
+ } else {
290
+ throw error;
291
+ }
292
+ });
293
+ ```
106
294
 
107
- ## Pre-Commit Checklist
295
+ Handle only an explicitly understood exception; otherwise propagate the original/typed error. When
296
+ parsing a security token, fail conservatively as in `src/interceptors/utils.ts`.
108
297
 
109
- - [ ] Node 22.14 is active and the affected package builds.
110
- - [ ] Focused positive and negative tests pass; broader tests are run in proportion to risk.
111
- - [ ] No `.only` remains in any test.
112
- - [ ] Public exports, events, Locus/media behavior, cleanup, and error propagation are preserved or explicitly specified.
113
- - [ ] The affected canonical module spec and contract indexes are updated in the same change.
114
- - [ ] No token, credential, participant PII, raw transcript, or sensitive URL is logged.
298
+ Incorrect:
115
299
 
116
- ## Prompt Overrides (`/adhoc`, `/quick`)
300
+ ```ts
301
+ return this.request(options).catch(() => undefined);
302
+ ```
117
303
 
118
- - `/adhoc` skips workflow scaffolding and `/quick` reduces it; neither bypasses correctness, security, test, or spec-currency rules.
304
+ Why wrong: it converts every failure into apparent success, hiding authentication, authorization,
305
+ transport, and server errors and leaving callers with stale state.
119
306
 
120
- ## External Source Access
307
+ Where it appears: `src/meetings/request.ts`, `src/meeting/request.ts`, `src/breakouts/request.ts`,
308
+ `src/interceptors/dataChannelAuthToken.ts`, `src/interceptors/locusRetry.ts`,
309
+ `src/reachability/index.ts`.
121
310
 
122
- | Provider class | Source / host pattern | Preferred access | If unavailable |
123
- |---|---|---|---|
124
- | source host | `github.com/webex/webex-js-sdk` | connector, CLI, or repository checkout | Stop before relying on unavailable remote-only evidence |
125
- | developer/API docs | `developer.webex.com`, generated SDK API site | authenticated/public browser or supplied source | Use current local code for behavior; never guess remote contracts |
126
- | Webex services | device, Mercury, Locus, meeting and media services | configured integration/test environment | Keep unit work mocked; ask before integration claims |
311
+ Edge cases and exceptions:
312
+
313
+ - Best-effort reads may intentionally ignore a narrowly scoped optional cache failure, as the
314
+ join-cookie read does; that exception must not hide the primary network operation.
315
+ - Error adapters may wrap a service error in a typed package error, but must retain the original
316
+ detail needed for diagnostics/recovery.
317
+
318
+ ### Event-scope emission
319
+
320
+ When to use: when a module exposes a meeting/media/realtime state change to parent modules or
321
+ consumers.
322
+
323
+ Correct:
324
+
325
+ ```ts
326
+ // from src/meeting/connectionStateHandler.ts
327
+ this.emit(
328
+ {
329
+ file: 'connectionStateHandler',
330
+ function: 'handleConnectionStateChange',
331
+ },
332
+ ConnectionStateEvent.stateChanged,
333
+ {state: this.mediaConnectionState}
334
+ );
335
+ ```
336
+
337
+ Extend/use `EventsScope`, emit the declared event constant only after the normalized state changes,
338
+ and supply the expected payload.
127
339
 
128
- Commit and PR history are excluded from this bootstrap by repository-owner decision.
340
+ Incorrect:
129
341
 
130
- ## Strict Compliance Mode (automation)
342
+ ```ts
343
+ consumer.emit('connection-changed', rawPeerConnection);
344
+ ```
345
+
346
+ Why wrong: it invents an event name, bypasses scoped logging, exposes an internal object, and can
347
+ emit without a real state transition.
348
+
349
+ Where it appears: `src/locus-info/index.ts`, `src/meeting/connectionStateHandler.ts`,
350
+ `src/multistream/receiveSlot.ts`, `src/multistream/remoteMedia.ts`, `src/reachability/index.ts`.
351
+
352
+ Edge cases and exceptions:
353
+
354
+ - Behavioral telemetry uses metrics helpers rather than `EventsScope`.
355
+ - Remote Mercury/data-channel events must be parsed and mapped before consumer emission; do not relay
356
+ arbitrary service payloads.
357
+
358
+ ### Source-to-test path mirroring
359
+
360
+ When to use: when locating or adding package unit tests for a source module.
361
+
362
+ Correct:
363
+
364
+ ```text
365
+ src/locus-info/controlsUtils.ts
366
+ test/unit/spec/locus-info/controlsUtils.js
367
+
368
+ target: locus-info/controlsUtils.js
369
+ ```
370
+
371
+ Mirror the source area below `test/unit/spec/`, then pass a target relative to that spec directory.
372
+
373
+ Incorrect:
374
+
375
+ ```text
376
+ target: controlsUtils.js
377
+ target: packages/@webex/plugin-meetings/test/unit/spec/locus-info/controlsUtils.js
378
+ ```
379
+
380
+ Why wrong: a bare filename loses the subdirectory and a repository-relative path violates the
381
+ runner's target-root contract, so the intended test may not run.
382
+
383
+ Where it appears: `src/meeting/index.ts` ↔ `test/unit/spec/meeting/index.js`,
384
+ `src/meetings/request.ts` ↔ `test/unit/spec/meetings/request.js`, `src/breakouts/index.ts` ↔
385
+ `test/unit/spec/breakouts/index.ts`, `src/interceptors/dataChannelAuthToken.ts` ↔
386
+ `test/unit/spec/interceptors/dataChannelAuthToken.ts`.
387
+
388
+ Edge cases and exceptions:
389
+
390
+ - Some legacy test extensions differ from source (`.ts` versus `.js`); mirror the directory and
391
+ behavior, not necessarily the extension.
392
+ - Shared fixture/helper files may live under `test/unit/spec/fixture/` or the nearest suite rather
393
+ than mirroring a production file.
394
+
395
+ ### Stateless plugin request classes
396
+
397
+ When to use: when a meeting capability needs a focused authenticated Webex HTTP boundary that does
398
+ not own the feature's domain state.
399
+
400
+ Correct:
401
+
402
+ ```ts
403
+ // from src/meetings/request.ts
404
+ export default class MeetingRequest extends StatelessWebexPlugin {
405
+ getActiveMeetings() {
406
+ return this.request({
407
+ api: API.LOCUS,
408
+ resource: RESOURCE.LOCI,
409
+ })
410
+ .then((res) => this.determineRedirections(res.body))
411
+ .catch((error) => {
412
+ LoggerProxy.logger.error(
413
+ `Meetings:request#getActiveMeetings --> failed to get locus details, ${error}`
414
+ );
415
+ throw new Error(error);
416
+ });
417
+ }
418
+ }
419
+ ```
420
+
421
+ Keep state and event orchestration in the owning controller; the request class builds the request
422
+ and returns/rejects its promise.
423
+
424
+ Incorrect:
425
+
426
+ ```ts
427
+ class BreakoutController {
428
+ broadcast(url, body) {
429
+ return fetch(url, {method: 'POST', body: JSON.stringify(body)});
430
+ }
431
+ }
432
+ ```
433
+
434
+ Why wrong: this bypasses the Webex host request pipeline, credentials, interceptors, service routing,
435
+ established errors, and test seams.
436
+
437
+ Where it appears: `src/meetings/request.ts`, `src/meeting/request.ts`, `src/breakouts/request.ts`,
438
+ `src/members/request.ts`, `src/personal-meeting-room/request.ts`, `src/roap/request.ts`.
439
+
440
+ Edge cases and exceptions:
441
+
442
+ - A helper may hold an injected Webex object without extending `StatelessWebexPlugin` when existing
443
+ code does so, as in `src/reachability/request.ts`; it must still use `webex.request` and remain
444
+ transport-focused.
445
+ - Debounce or a weak meeting reference may live in a request helper when it is required to
446
+ build/serialize requests, but feature state stays in the controller.
131
447
 
132
- Load the routed specs required by the task, apply `.sdd/manifest.json` trust state, and stop on the first unresolved protected-spec, conformance, coverage, or independent-validation gate.
448
+ ### Typed constants and enum wire values
449
+
450
+ When to use: when declaring a closed set of meeting, event, control, or wire values consumed by
451
+ TypeScript code.
452
+
453
+ Correct:
454
+
455
+ ```ts
456
+ // from src/meeting/connectionStateHandler.ts
457
+ export const ConnectionStateEvent = {
458
+ stateChanged: 'connectionState:changed',
459
+ } as const;
460
+
461
+ export type ConnectionStateEvent = Enum<typeof ConnectionStateEvent>;
462
+ ```
463
+
464
+ Use the established `as const` plus `Enum` type pattern or a string enum when the runtime values are
465
+ part of the protocol.
466
+
467
+ Incorrect:
468
+
469
+ ```ts
470
+ function emitState(name: string) {
471
+ this.emit({}, name, {});
472
+ }
473
+ ```
133
474
 
134
- ---
135
- **SDD coverage:** Per-module trust lives in `.sdd/manifest.json` and is mirrored in `ai-docs/SPEC_INDEX.md`. `Partial` specs are hints and `Untracked` modules require code cross-checking until promoted.
475
+ Why wrong: an unconstrained string permits unsupported values and makes refactoring drift from
476
+ server/event contracts invisible to TypeScript.
477
+
478
+ Where it appears: `src/meeting/connectionStateHandler.ts`, `src/meetings/meetings.types.ts`,
479
+ `src/annotation/constants.ts`, `src/recording-controller/enums.ts`, `src/reactions/reactions.type.ts`,
480
+ `src/controls-options-manager/enums.ts`.
481
+
482
+ Edge cases and exceptions:
483
+
484
+ - Incoming server data is still an untrusted string until validated against the declared values.
485
+ - Legacy code sometimes uses raw literals; searches and migrations must include both the typed
486
+ constant and raw string form before changing behavior.
487
+
488
+ ## 6. Git Workflow
489
+
490
+ - Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
491
+ - Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`),
492
+ which the workspace `CONTRIBUTING.md` requires for pull requests.
493
+ - Keep commits focused and reversible.
494
+ - Rebase on the target branch before opening a pull request.
495
+
496
+ PR checklist:
497
+
498
+ - What changed and why.
499
+ - Tests run and results.
500
+ - Risk and impact on applications that call `webex.meetings`, and on the `webex` bundle.
501
+ - Rollback approach.
502
+
503
+ ### Review checklist
504
+
505
+ Core checks (always run):
506
+
507
+ - [ ] Change scope matches the approved plan and the owning module spec was loaded.
508
+ - [ ] Current code and mirrored tests support every behavioral claim; commit/PR history was not used
509
+ for current behavior.
510
+ - [ ] Node 22.14 is active, the affected package builds, and build, lint, and focused tests were run
511
+ and their actual result reported.
512
+ - [ ] Focused positive, negative, cleanup, and rejection tests pass, using the existing Sinon and
513
+ assertion conventions; broader tests run in proportion to risk.
514
+ - [ ] Public exports, methods, events, constants, error shapes, async timing, Locus/media behavior,
515
+ cleanup, and error propagation are preserved, or explicitly specified and approved.
516
+ - [ ] No `.only` remains in any test, and no secret, token, credential, participant PII, raw
517
+ transcript or media content, or sensitive URL was committed or logged.
518
+ - [ ] When behavior/contracts changed, the affected canonical module spec and contract indexes are
519
+ updated in the same change and merge.
520
+
521
+ Coverage-conditional checks (run by the touched module's manifest coverage state):
522
+
523
+ - **Specced:** validate implementation and tests against the authoritative spec; any drift blocks.
524
+ - **Partial:** treat the spec as a guide and cross-check each affected behavior in source/tests.
525
+ - **Untracked:** code is authoritative; obtain approval and establish characterization coverage
526
+ before risky modification.
527
+ - Public/security/performance changes require explicit human approval even when a module is Specced.
528
+
529
+ Cross-cutting checks (apply at higher risk):
530
+
531
+ - [ ] Locus full/delta/hash-tree paths remain convergent and ordering assumptions are tested.
532
+ - [ ] Timers, queues, media objects, data channels, and event listeners are cleaned up.
533
+ - [ ] Request retries are bounded and do not hide terminal server errors.
534
+ - [ ] Capability/role/policy gates remain enforced before privileged meeting operations.
535
+ - [ ] Source and `test/unit/spec/` paths remain mirrored; target values are relative to the spec
536
+ root.
537
+ - [ ] Metric/log changes reuse existing helpers and redact sensitive values.
538
+ - [ ] Dependency and package-export changes follow workspace and semver rules.
539
+
540
+ Core checks always apply. Add state/event checks for `meetings`, `meeting`, `locus-info`, `hashTree`,
541
+ `members`, and feature modules; media/retry checks for media-path modules; security checks for
542
+ interceptors, identity, AI, transcript, and participant changes; and public-contract checks for
543
+ `src/index.ts` or exported objects.
544
+
545
+ A review should report affected modules, manifest trust state, tests/checks run, contract/security
546
+ findings, spec delta, and any unresolved blocker. Draft validation/coverage findings remain local
547
+ until the user approves publication.
548
+
549
+ Blocking drift includes missing/changed public surface, event/error semantics, state transition,
550
+ security rule, or required test strategy. No drift checker is configured in `package.json` or the
551
+ workspace CI; run one only when explicitly requested, and do not claim it ran otherwise.
552
+
553
+ ## 7. Boundaries and Escalation
554
+
555
+ ### Always
556
+
557
+ - Prefer existing patterns over introducing new architecture.
558
+ - Keep changes minimal for the requested scope.
559
+ - Call out assumptions and unknowns explicitly.
560
+ - Land code behavior, the spec delta, and the canonical module spec update in the same merge as the
561
+ behavior or contract changes.
562
+ - Load the routed manifest, module spec, and the rules in this file before changes, and apply the
563
+ `.sdd/manifest.json` trust state; stop on the first unresolved protected-spec conflict, missing
564
+ approval, unresolved security/contract fact, failed conformance, below-approved coverage, or
565
+ independent-validation blocker.
566
+ - No prompt shortcut bypasses correctness, security, test, or spec-currency rules.
567
+
568
+ ### Ask First
569
+
570
+ - Ask before coding: present the affected contracts, plan, and test scope, then wait for approval.
571
+ This covers code changes, public/event/request contract changes, new dependencies (do not add an
572
+ external dependency without approval, and keep workspace packages as `workspace:*` unless the
573
+ repository release policy says otherwise), security/performance-sensitive work, and modifications
574
+ to Partial/Untracked modules without a baseline.
575
+ - Reconcile before changing a protected canonical spec (`spec_policy.protected_specs` in
576
+ `.sdd/manifest.json` lists all 23 module specs); update code and spec deltas together.
577
+ - Do not modify remote systems, publish packages (`yarn workspace @webex/plugin-meetings deploy:npm`), deploy, push, or post review
578
+ findings without explicit permission.
579
+ - Large refactors, and any destructive data or infrastructure operation.
580
+
581
+ ### Never
582
+
583
+ - Commit secrets, keys, or credentials, disable quality gates (bypass required checks by disabling
584
+ tests or linters), or overwrite protected specs. Secrets belong in managed/local environment
585
+ configuration, never repository files, examples, logs, snapshots, or metrics.
586
+ - Edit `dist/` by hand.
587
+ - Rewrite history on shared branches.
588
+ - Change unrelated files "while here" without clear need.
589
+ - Add a `.sdd/templates` directory or a copy of the templates in this package. The templates live once
590
+ at the monorepo root, `../../../.sdd/templates/repo-standards`, and `.sdd/manifest.json` refers to
591
+ them through `layout.monorepo_package`.
@@ -191,7 +191,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
191
191
  method: _constants.HTTP_VERBS.PUT
192
192
  });
193
193
  },
194
- version: "3.13.0-next.13"
194
+ version: "3.13.0-next.14"
195
195
  });
196
196
  var _default = exports.default = AIEnableRequest;
197
197
  //# sourceMappingURL=index.js.map