@webex/internal-plugin-wdm 3.12.0 → 3.13.0-next.2

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.
@@ -0,0 +1,270 @@
1
+ ---
2
+ type: Module Spec
3
+ title: 'src specification'
4
+ description: Responsibilities, boundaries, design, invariants, and verification for the deprecated WDM alias entry point of @webex/internal-plugin-wdm.
5
+ tags: [module, specification]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: module-spec
9
+ generated_from: module-spec@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: riag@cisco.com
12
+ updated_at: 2026-10-28T14:58:37Z
13
+ validation_status: pass
14
+ -->
15
+
16
+ # src (deprecated WDM alias entry point)
17
+
18
+ This source-local document at `src/docs/README.md` owns the stable
19
+ specification for **the `src` module** of `@webex/internal-plugin-wdm`. It links to the
20
+ [package architecture](../../docs/architecture.md) instead of repeating broader facts. The package has no
21
+ deployable service, so no service specification exists.
22
+
23
+ Related context: [documentation index](../../docs/index.md) ·
24
+ [agent instructions](../../AGENTS.md) ·
25
+ [specification registry](../../docs/specs/README.md)
26
+
27
+ ## Metadata
28
+
29
+ | Field | Value |
30
+ | ----------------- | ------------------------------------------------------------------------------------------------------ |
31
+ | Owner | Cisco Webex for Developers (named as maintainer in `README.md`) |
32
+ | Source path | `src/` |
33
+ | Resource kind | module (the package's only module; a re-export alias) |
34
+ | Status | Draft |
35
+ | Last verified | 2026-10-28 against the working tree (`src/index.js`, `package.json`, `README.md`, `test/`) |
36
+ | Module id | `src` |
37
+ | Parent spec | — |
38
+ | Doc kind | Module spec |
39
+ | Coverage score | 86.7% (13 of 15 mandatory fields; critical 7 of 7) assessed 2026-10-12; weak: tests, WHAT/WHY |
40
+ | Validation status | pass — validator `01a18302-bd56-78f3-906e-7393e5034b42`, assessed 2026-10-28; 0 findings |
41
+
42
+ ## Applicability
43
+
44
+ | Condition ID | Status | Evidence or reason | Owned section |
45
+ | ------------------------------------ | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------- |
46
+ | `module.has_tiers` | N/A | No tier policy is defined in `package.json` or any file of this package | Tier |
47
+ | `module.has_ui` | N/A | `src/index.js` contains no UI code | UI use-case flow |
48
+ | `module.crosses_service_boundaries` | N/A | `src/index.js` makes no network, event, or service call; all calls happen in the device package | Cross-boundary use-case flow |
49
+ | `module.holds_client_state` | N/A | `src/index.js` declares no state; state belongs to the Device model in the device package | Client state model |
50
+ | `module.enforces_domain_rules` | N/A | `src/index.js` holds no entity rules; it only re-exports bindings | Business rules and invariants |
51
+ | `module.is_concurrent_async` | N/A | `src/index.js` has no asynchronous code | Concurrency and reactive flow |
52
+ | `module.owns_persistence` | N/A | No store, schema, or migration exists in this package | Data, schema, and migration |
53
+ | `module.stateful_transitions` | N/A | `src/index.js` has no states or transitions | State machine |
54
+ | `module.exposes_wire_protocol` | N/A | No serialized format or protocol is produced or parsed here | Protocol and wire format |
55
+ | `module.ui_multi_screen` | N/A | No UI | UI flow |
56
+ | `module.large_data_model` | N/A | No data model is defined here | Data model |
57
+ | `module.returns_caller_errors` | N/A | `src/index.js` raises and handles no errors of its own (it contains no throw, try, or catch) | Caller-visible failure modes |
58
+ | `module.module_specific_conventions` | Applicable | `README.md` declares the package a deprecated alias; changes belong in the device package | Module-specific rules |
59
+ | `module.published_package` | Applicable | `package.json` declares main and deploy:npm | Export stability |
60
+ | `module.embedded_in_host` | N/A | A plugin alias for the @webex/webex-core host, not mounted into a host UI | Host integration and theming |
61
+ | `module.has_design_tradeoff` | N/A | No code comment or committed decision record documents a trade-off; the owner has not been asked | Key design trade-off |
62
+ | `module.has_submodules` | N/A | `src/index.js` is the only file under the src directory and no child module exists | Sub-modules |
63
+
64
+ ## Evidence register
65
+
66
+ Source basis by category and disposition; no routed legacy spec exists for this module.
67
+
68
+ | Evidence | What it establishes |
69
+ | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
70
+ | `src/index.js` | The complete runtime behavior: one default and six named re-exports from `@webex/internal-plugin-device`; no plugin registration of its own |
71
+ | `package.json` | Entry points (`main`, `devMain`), scripts, declared dependencies, Node engine floor, and browserify transforms |
72
+ | `README.md` | Deprecation statement (alias of the device plugin), install and usage text, and the maintainer statement; its usage snippet is stale (see Pitfalls) |
73
+ | `process` | A one-line module exporting `{browser: true}` |
74
+ | `test/unit/spec/device.js` | A placeholder suite asserting `true`; no behavior is exercised |
75
+ | `test/integration/spec/webex.js` | Importing the package makes `webex.internal.device` defined and exposing eleven named methods (needs provisioned test users) |
76
+ | Device package source (the entry module of the @webex/internal-plugin-device package) | The re-exported bindings exist, and importing the device package calls `registerInternalPlugin('device', …)` |
77
+ | Device package specification (the module spec of the @webex/internal-plugin-device package, beside its source) | Behavior, public surface, and export stability of the delegated implementation; used in place of re-reading its source for behavior |
78
+ | Core package source (the index and core modules of the @webex/webex-core package) | `registerInternalPlugin` and the default `WebexCore` export used by the integration test; no specification exists for that package |
79
+ | `jest.config.js`, `package.json` at the monorepo root | The package is listed in the root jest project list and in the `@legacy` script scope; no source file in the monorepo imports it |
80
+ | `babel.config.js`, `jest.config.js`, `.eslintrc.js` in this package | Build, test, and lint configuration are delegated to the shared legacy configs |
81
+
82
+ ## Purpose and boundary
83
+
84
+ - Responsibility: keep the historical `@webex/internal-plugin-wdm` package name importable by re-exporting the
85
+ device plugin's default export and six named exports from `@webex/internal-plugin-device`. Importing it
86
+ therefore loads the device plugin and its registration side effect.
87
+ - In scope: the entry file `src/index.js`, the package manifest, the test files, and the deprecation notice in
88
+ `README.md`.
89
+ - Out of scope: all registration, refresh, unregister, feature-toggle, inactivity, interceptor, and network-detection
90
+ behavior. That is owned by `@webex/internal-plugin-device` and specified in its module specification. This
91
+ package registers no plugin named `wdm` and defines no `webex.internal.wdm` property.
92
+ - Consumers: code that still imports `@webex/internal-plugin-wdm`. No source file in this monorepo does (the only
93
+ references are the root jest and `@legacy` script package lists and this package's own integration test).
94
+
95
+ ## Structure and key files
96
+
97
+ | Path | Responsibility |
98
+ | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
99
+ | `src/index.js` | The only source file: imports from the device package and re-exports them |
100
+ | `package.json` | Package identity, `main: dist/index.js`, `devMain: src/index.js`, scripts, dependencies, `engines.node >=16`, browserify transforms |
101
+ | `process` | Exports `{browser: true}` (the consumer of this flag is tooling outside this package) |
102
+ | `babel.config.js`, `jest.config.js`, `.eslintrc.js` | Re-export the shared `@webex/babel-config-legacy`, `@webex/jest-config-legacy`, and `@webex/eslint-config-legacy` configs |
103
+ | `test/unit/spec/device.js` | Placeholder unit suite |
104
+ | `test/integration/spec/webex.js` | Integration suite that imports the package and inspects `webex.internal.device` |
105
+ | `README.md` | Consumer-facing deprecation notice, install, and usage text |
106
+ | dist directory (ignored by git) | Build output of `build:src`; never edited by hand |
107
+
108
+ ## Public surface
109
+
110
+ Exact declarations stay in the native source `src/index.js`; contract IDs resolve in `.sdd/manifest.json`.
111
+
112
+ | Surface | Consumer | Compatibility commitment | Source |
113
+ | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------- |
114
+ | `wdm-alias-sdk`: default export `Device` and named exports `config`, `constants`, `DeviceUrlInterceptor`, `FeatureCollection`, `FeatureModel`, `FeaturesModel` | Legacy importers of the package name | Deprecated alias; mirrors the device package; internal plugin, semantic versioning not strictly followed (`README.md`) | `src/index.js` |
115
+
116
+ The repository-wide index of contracts is `Public and consumer surfaces` in the
117
+ [package architecture](../../docs/architecture.md). The behavior behind each binding is specified by the device
118
+ package; see the `Public surface` and `Export stability` sections of the device
119
+ package's module specification (`@webex/internal-plugin-device`, `src/docs/README.md` inside that package). The device package's
120
+ `CatalogDetails` and `DeviceRegistrationOptions` exports are not re-exported here.
121
+
122
+ ## Dependencies
123
+
124
+ | Dependency | Why it is required | Failure behavior |
125
+ | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
126
+ | @webex/internal-plugin-device (module spec present: used for behavior; its source for the re-exported bindings) | Provides every re-exported binding, and its entry module registers the `device` internal plugin (its requirement `MOD-001`) | Not handled here: `src/index.js` has no `try`/`catch`, so a resolution or load failure propagates to the importer |
127
+ | @webex/webex-core (source; no specification) | Declared in `dependencies`; imported only by `test/integration/spec/webex.js` (`WebexCore`). Its `registerInternalPlugin` is called by the device package, not here | Not used at runtime by `src/index.js` |
128
+ | @webex/test-helper-chai (source; no specification) | Declared in `dependencies` and `devDependencies`; supplies `assert` to both test files | Test-only |
129
+ | @webex/test-helper-test-users (source; no specification) | Declared in `dependencies` and `devDependencies`; `testUsers.create({count: 1})` provisions the integration test user | Test-only; requires network access and credentials from the environment |
130
+ | `@webex/legacy-tools`, `@webex/babel-config-legacy`, `@webex/jest-config-legacy`, `@webex/eslint-config-legacy` | Build, test, and lint tooling invoked by the scripts in `package.json` | Tooling only |
131
+
132
+ ## Requirements
133
+
134
+ | ID | WHAT | WHY | Source evidence | Test or example evidence | Assumptions or gaps | Confidence |
135
+ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
136
+ | `MOD-001` | The package's default export is the default export of `@webex/internal-plugin-device` (`Device`) | Importers of the old name keep receiving the device plugin class | `src/index.js` | none found | No test imports the default binding | Present |
137
+ | `MOD-002` | The package re-exports exactly `config`, `constants`, `DeviceUrlInterceptor`, `FeatureCollection`, `FeatureModel`, and `FeaturesModel` from the device package | Legacy importers rely on these names; removing one breaks them | `src/index.js` | none found | No test asserts the export list | Present |
138
+ | `MOD-003` | The package does not re-export `CatalogDetails` or `DeviceRegistrationOptions`, both of which the device package exports | Records an observable difference between the alias and its target | `src/index.js` | none found | Whether the omission is intentional is not stated anywhere in the package; the owner has not been asked | Approved unknown |
139
+ | `MOD-004` | Importing the package loads the device package, whose entry module registers the internal plugin `device`, so `webex.internal.device` is defined on a `WebexCore` instance | The alias exists so the old import path still produces a working device plugin | `src/index.js` | `test/integration/spec/webex.js` (needs provisioned test users and network) | Behavior is implemented by the device package; the test cannot run without credentials | Present |
140
+ | `MOD-005` | The package registers no plugin of its own: it defines no `webex.internal.wdm` property | Prevents a second registration of the same capability under a different name | `src/index.js` | none found | Absence is evidenced by `src/index.js` containing no `registerInternalPlugin` call and no file elsewhere in the monorepo registering `wdm` | Present |
141
+ | `MOD-006` | The package is published as compiled `dist/index.js` (`main`), with `src/index.js` as `devMain`, built by `build:src` | Consumers install the compiled entry; monorepo tooling resolves the source entry | `package.json` | none found | Build output is not tested | Present |
142
+ | `MOD-007` | The package is documented as deprecated: new imports should use `@webex/internal-plugin-device` | Steers consumers to the maintained package | `README.md` | none found | Documentation only; no runtime deprecation warning is emitted (`src/index.js` has none) | Present |
143
+
144
+ ## Design overview
145
+
146
+ The module is a pure re-export barrel. `src/index.js` imports one default and six named bindings from
147
+ `@webex/internal-plugin-device` and re-exports the same seven names, adding no logic, state, configuration, or
148
+ side effect of its own. All behavior, including plugin registration, comes from the device package's entry module
149
+ when it is evaluated as a consequence of the import. The ownership of state is therefore entirely outside this
150
+ module: the Device model, feature collections, interceptor, and configuration are owned and specified by the
151
+ device package.
152
+
153
+ Internal shape: one source file with no helper functions. Packaging and tooling are delegated: the build is
154
+ `webex-legacy-tools build` over `src` into `dist`, and the test and lint configurations re-export shared
155
+ workspace configs. The module-level `process` file marks the package as browser-capable for the legacy tooling.
156
+
157
+ ## Data flow and sequence coverage
158
+
159
+ Call style: in-process module import (ES module syntax compiled by Babel). The module has one operation group, the
160
+ import-time re-export, and it is a trivial pass-through, so a single sequence diagram is complete for it. It has
161
+ no runtime entry points, requests, or events.
162
+
163
+ | Operation group | Entry and outcome | Diagram or evidence | Failure and recovery coverage |
164
+ | ---------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
165
+ | Import-time re-export | Consumer imports the package; the device package is loaded and registered; seven bindings are returned | Sequence diagram below; `src/index.js` | No handling in this module: a module resolution or evaluation error in the device package propagates to the importer |
166
+
167
+ ```mermaid
168
+ sequenceDiagram
169
+ participant Consumer
170
+ participant Alias as wdm src/index.js
171
+ participant Device as internal-plugin-device entry
172
+ participant Core as webex-core
173
+ Consumer->>Alias: import '@webex/internal-plugin-wdm'
174
+ Alias->>Device: import default and six named bindings
175
+ Device->>Core: registerInternalPlugin('device', Device, options)
176
+ Core-->>Device: plugin registered
177
+ Device-->>Alias: bindings
178
+ Alias-->>Consumer: default Device and six named exports
179
+ alt device package fails to resolve or evaluate
180
+ Device--xAlias: error
181
+ Alias--xConsumer: error propagates unchanged
182
+ end
183
+ ```
184
+
185
+ ## Class and component relationships
186
+
187
+ ```mermaid
188
+ classDiagram
189
+ class WdmEntry {
190
+ default Device
191
+ config
192
+ constants
193
+ DeviceUrlInterceptor
194
+ FeatureCollection
195
+ FeatureModel
196
+ FeaturesModel
197
+ }
198
+ class DeviceEntry {
199
+ registerInternalPlugin device
200
+ }
201
+ WdmEntry --> DeviceEntry : re-exports
202
+ DeviceEntry --> WebexCore : registers plugin with
203
+ ```
204
+
205
+ `WdmEntry` is `src/index.js`; `DeviceEntry` is the entry module of `@webex/internal-plugin-device`. Types and
206
+ internals behind each binding are described in the device specification.
207
+
208
+ ## Use cases and flows
209
+
210
+ | Use case | Actor or caller | Primary steps and outcome | Failure or boundary behavior | Evidence |
211
+ | -------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
212
+ | `UC-001` | Legacy SDK consumer, import for effect | `import '@webex/internal-plugin-wdm'`, create a `WebexCore`, read `webex.internal.device`; the device plugin and its methods are present | Not-registered or load errors come from the device package and propagate unchanged | `src/index.js`, `test/integration/spec/webex.js` |
213
+ | `UC-002` | Legacy SDK consumer, named import | Import `Device`, `config`, `constants`, `DeviceUrlInterceptor`, `FeatureCollection`, `FeatureModel`, or `FeaturesModel` from the alias | The alias does not export `CatalogDetails` or `DeviceRegistrationOptions` (see `MOD-003`), so a consumer's static named import of either fails at module linkage or build under ES-module semantics | `src/index.js` |
214
+ | `UC-003` | Maintainer migrating a consumer | Replace the import path with `@webex/internal-plugin-device`; every alias export keeps its name there | None: the target package exports a superset of the alias | `README.md`, `src/index.js` |
215
+
216
+ ## Pitfalls and constraints
217
+
218
+ - The `README.md` usage snippet ends with `webex.internal.wdm.WHATEVER`, but no code in the monorepo registers a
219
+ `wdm` plugin, so `webex.internal.wdm` is not defined by this package; use `webex.internal.device`. Evidence:
220
+ `src/index.js`, `README.md`, `test/integration/spec/webex.js`. The README is a retained, separately owned
221
+ document and was not edited.
222
+ - The unit test `test/unit/spec/device.js` asserts `true` and exercises nothing; a passing `test:unit` run says
223
+ nothing about the alias behavior. Only the credential-requiring integration suite observes the re-export effect.
224
+ - `package.json` `scripts.test` chains `test:integration`, which the package does not define, so the aggregate
225
+ `test` script cannot complete; use the individual `test:unit`, `test:style`, and `test:browser` scripts.
226
+ - `@webex/test-helper-chai` and `@webex/test-helper-test-users` appear under `dependencies` as well as
227
+ `devDependencies`, although only test files use them (`package.json`, `test/`). Treat that as a packaging
228
+ inconsistency to confirm with the owner before changing it.
229
+ - Any change to the alias surface must match the device package, otherwise the two entry points diverge silently:
230
+ nothing in this package compares the two export lists.
231
+
232
+ ## Module-specific rules
233
+
234
+ - Do: put every behavior change in `@webex/internal-plugin-device`, and keep this module a pure re-export
235
+ (`README.md`: the plugin only acts as an alias).
236
+ - Do: update `MOD-002`, `MOD-003`, and the public surface in this document in the same change if the export list of
237
+ `src/index.js` changes.
238
+ - Do not: add logic, state, or a `registerInternalPlugin` call here; a second registration would conflict with the
239
+ device plugin's registration under another name.
240
+ - Do not: create new imports of `@webex/internal-plugin-wdm` in the monorepo; the README directs new imports to the
241
+ device package.
242
+
243
+ ## Export stability
244
+
245
+ | Export or entry point | Consumer | Stability | Versioning and deprecation rule | Declaration or API report |
246
+ | ---------------------------------------------------------------------------------- | ----------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------- |
247
+ | Default export `Device` | Legacy importers | Deprecated alias; internal plugin | `README.md`: deprecated, alias of the device plugin; semantic versioning is not strictly followed | `src/index.js` |
248
+ | `config`, `constants`, `DeviceUrlInterceptor`, `FeatureCollection`, `FeatureModel`, `FeaturesModel` | Legacy importers | Deprecated alias; stability follows the device package | Same; stability of each binding is specified by the device package's `Export stability` section | `src/index.js` |
249
+
250
+ No API report or generated declaration is committed; `package.json` and `src/index.js` are the native artifacts.
251
+ The package version is not recorded in `package.json`.
252
+
253
+ ## Verification
254
+
255
+ | Requirement or invariant | Test level | Positive evidence | Negative or boundary evidence | Gap |
256
+ | ------------------------ | ----------- | ------------------------------------------------------------------------------ | ----------------------------- | --------------------------------------------------------------------------------------------------- |
257
+ | `MOD-001` | none | none found | none found | No test imports or asserts the default binding |
258
+ | `MOD-002` | none | none found | none found | No test asserts the named export list |
259
+ | `MOD-003` | none | none found | none found | No test records the omission |
260
+ | `MOD-004` | Integration | `test/integration/spec/webex.js` (defines the device plugin and eleven methods) | none found | Requires provisioned test users and network; not runnable in unit CI; no negative case |
261
+ | `MOD-005` | none | none found | none found | No test asserts `webex.internal.wdm` is undefined |
262
+ | `MOD-006` | none | none found | none found | The build output and entry points are not tested |
263
+ | `MOD-007` | none | none found | none found | Documentation-only claim |
264
+
265
+ `test/unit/spec/device.js` is not counted as coverage: it asserts `true` and invokes no behavior. Gap summary: the
266
+ module has no behavioral unit test, so no requirement has automated evidence except `MOD-004`, which depends on
267
+ credentials. Follow-up: add a unit test that imports `src/index.js` and asserts the seven re-exports equal the
268
+ device package's bindings, and decide whether the alias should also re-export `CatalogDetails` and
269
+ `DeviceRegistrationOptions`. A module specification is complete only when its public surface and test evidence
270
+ agree with the implementation.