@webex/plugin-device-manager 3.12.0 → 3.13.0-next.10

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,488 @@
1
+ {
2
+ "$schema": "./schemas/repo-context.schema.json",
3
+ "version": 1,
4
+ "repository": {
5
+ "name": "@webex/plugin-device-manager",
6
+ "purpose": "Public plugin registered as webex.devicemanager that manages the user's Webex room devices and Lyra spaces: refresh lists the recent auxiliary devices from WDM (devices/auxiliary) into a module-level collection that getAll reads, upsert and remove add and delete WDM entries, search finds devices through the directory search plugin, get resolves the Lyra endpoint for an ultrasound token, requestPin and pair run a Lyra PIN challenge and record the paired device on the instance, bindSpace and unbindSpace bind a conversation to the paired device, getAudioState and the mute and volume methods call the Lyra device API for the paired device and reject without one, while putAudioState passes the caller's space and audio state to Lyra with no pairing guard. A Mercury lyra.space_updated listener drops a pairing Lyra no longer verifies. User-assigned device names are decrypted through the encryption plugin. Argument and pairing guards log and reject with DeviceManager#method messages; Lyra, search, and WDM failures are logged and rejected, except that audio failures reject unlogged, refresh logs and resolves undefined, and the Mercury handler logs and resolves; a failed name decryption logs and yields undefined; nothing is persisted."
7
+ },
8
+ "commands": {
9
+ "install": "yarn",
10
+ "compile": "yarn workspace @webex/plugin-device-manager build",
11
+ "build": "yarn workspace @webex/plugin-device-manager build:src",
12
+ "unit-test": "yarn workspace @webex/plugin-device-manager test:unit",
13
+ "lint": "yarn workspace @webex/plugin-device-manager test:style",
14
+ "browser-test": "yarn workspace @webex/plugin-device-manager test:browser",
15
+ "deploy": "yarn workspace @webex/plugin-device-manager deploy:npm"
16
+ },
17
+ "public_interfaces": [
18
+ {
19
+ "name": "@webex/plugin-device-manager package entry",
20
+ "kind": "package_export",
21
+ "source": "src/index.js",
22
+ "entrypoints": [
23
+ "import '@webex/plugin-device-manager'",
24
+ "import DeviceManager, {config} from '@webex/plugin-device-manager'"
25
+ ],
26
+ "audience": "SDK bundles (webex, webex-node) and applications that build their own webex instance",
27
+ "notes": "Importing the package imports @webex/internal-plugin-device and registers DeviceManager as public plugin 'devicemanager' with config {}; src/device-manager.js also imports the Lyra and search plugins. The first registration of the name wins. The entry exports the default DeviceManager and the named config."
28
+ },
29
+ {
30
+ "name": "webex.devicemanager methods",
31
+ "kind": "plugin_api",
32
+ "source": "src/device-manager.js",
33
+ "entrypoints": [
34
+ "webex.devicemanager.getAll()",
35
+ "webex.devicemanager.refresh()",
36
+ "webex.devicemanager.search(options)",
37
+ "webex.devicemanager.upsert(device)",
38
+ "webex.devicemanager.get(token)",
39
+ "webex.devicemanager.remove(deviceId)",
40
+ "webex.devicemanager.requestPin(device, options)",
41
+ "webex.devicemanager.pair(options)",
42
+ "webex.devicemanager.unpair(options)",
43
+ "webex.devicemanager.bindSpace(options)",
44
+ "webex.devicemanager.unbindSpace()",
45
+ "webex.devicemanager.getAudioState()",
46
+ "webex.devicemanager.putAudioState(space, audioState)",
47
+ "webex.devicemanager.mute()",
48
+ "webex.devicemanager.unmute()",
49
+ "webex.devicemanager.increaseVolume()",
50
+ "webex.devicemanager.decreaseVolume()",
51
+ "webex.devicemanager.setVolume(level)",
52
+ "webex.devicemanager.getPairedDevice()",
53
+ "webex.devicemanager.getPairedMethod()",
54
+ "webex.devicemanager.setPairedMethod(method)"
55
+ ],
56
+ "audience": "applications",
57
+ "notes": "getAll returns an array synchronously; refresh resolves the device array, or undefined after any failure; binding and audio methods except putAudioState reject without a paired device; upsert always moves the pending PIN device to paired; guards reject with an Error whose message starts with DeviceManager#method."
58
+ },
59
+ {
60
+ "name": "package scripts",
61
+ "kind": "npm_scripts",
62
+ "source": "package.json",
63
+ "entrypoints": [
64
+ "build",
65
+ "build:src",
66
+ "test:unit",
67
+ "test:style",
68
+ "test:browser",
69
+ "test",
70
+ "deploy:npm"
71
+ ],
72
+ "audience": "contributors and CI",
73
+ "notes": "build runs build:src, which writes dist. test:unit runs 14 jest cases in test/unit/spec. test:browser (commands.browser-test) collects test/integration/spec, which does not exist, so it starts nothing and exits 0. The aggregate test script runs test:style and test:unit, then exits 1 because test:integration is not defined; it is deliberately not a manifest command."
74
+ }
75
+ ],
76
+ "source_of_truth": [
77
+ {
78
+ "surface": "Device Manager plugin implementation",
79
+ "paths": [
80
+ "src/index.js",
81
+ "src/device-manager.js",
82
+ "src/collection.js",
83
+ "src/constants.js",
84
+ "src/config.js"
85
+ ],
86
+ "generated_artifacts": [
87
+ "dist"
88
+ ],
89
+ "refresh_with": [
90
+ "yarn workspace @webex/plugin-device-manager build:src"
91
+ ],
92
+ "validate_with": [
93
+ "yarn workspace @webex/plugin-device-manager test:unit",
94
+ "yarn workspace @webex/plugin-device-manager test:style"
95
+ ]
96
+ },
97
+ {
98
+ "surface": "module specification",
99
+ "paths": [
100
+ "src/docs/README.md"
101
+ ],
102
+ "generated_artifacts": [],
103
+ "refresh_with": [
104
+ "update alongside the behavior change in the same commit"
105
+ ],
106
+ "validate_with": [
107
+ "spec-validator on an independent runtime"
108
+ ]
109
+ }
110
+ ],
111
+ "generated_artifacts": [
112
+ {
113
+ "path": "dist",
114
+ "generated_from": "src",
115
+ "refresh_with": "yarn workspace @webex/plugin-device-manager build:src"
116
+ },
117
+ {
118
+ "path": "../../../.sdd/templates/repo-standards/template-map.json",
119
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
120
+ "refresh_with": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
121
+ }
122
+ ],
123
+ "validation_matrix": [
124
+ {
125
+ "paths": [
126
+ "src/**"
127
+ ],
128
+ "minimum": [
129
+ "yarn workspace @webex/plugin-device-manager build:src",
130
+ "yarn workspace @webex/plugin-device-manager test:unit",
131
+ "yarn workspace @webex/plugin-device-manager test:style"
132
+ ],
133
+ "recommended": [
134
+ "add a test/unit/spec case for the changed behavior; most methods have none"
135
+ ]
136
+ },
137
+ {
138
+ "paths": [
139
+ "src/device-manager.js",
140
+ "src/collection.js"
141
+ ],
142
+ "minimum": [
143
+ "yarn workspace @webex/plugin-device-manager build:src",
144
+ "yarn workspace @webex/plugin-device-manager test:unit",
145
+ "yarn workspace @webex/plugin-device-manager test:style"
146
+ ],
147
+ "recommended": [
148
+ "pin the guards, the pairing transitions, the WDM requests, and the refresh result with unit cases before changing them; reset DeviceCollection between cases"
149
+ ]
150
+ },
151
+ {
152
+ "paths": [
153
+ "src/index.js"
154
+ ],
155
+ "minimum": [
156
+ "yarn workspace @webex/plugin-device-manager build:src",
157
+ "yarn workspace @webex/plugin-device-manager test:unit",
158
+ "yarn workspace @webex/plugin-device-manager test:style"
159
+ ],
160
+ "recommended": [
161
+ "check the bundles that register the plugin (webex, webex-node) when the registered name or the side-effect imports change"
162
+ ]
163
+ }
164
+ ],
165
+ "change_impact": [
166
+ {
167
+ "paths": [
168
+ "src/device-manager.js"
169
+ ],
170
+ "affects": [
171
+ "the WDM devices/auxiliary requests and the refresh result",
172
+ "the Lyra PIN, binding, and audio calls and their space URLs",
173
+ "the pairing state and its guards",
174
+ "the lyra.space_updated handler",
175
+ "the DeviceManager#method log and error messages"
176
+ ],
177
+ "refresh_with": [
178
+ "yarn workspace @webex/plugin-device-manager build:src"
179
+ ],
180
+ "validate_with": [
181
+ "yarn workspace @webex/plugin-device-manager test:unit",
182
+ "yarn workspace @webex/plugin-device-manager test:style"
183
+ ],
184
+ "avoid_direct_edits": [
185
+ "dist"
186
+ ],
187
+ "notes": "Unit cases cover only getPairedDevice and the paired-method accessors; add cases before changing other behavior."
188
+ },
189
+ {
190
+ "paths": [
191
+ "src/collection.js"
192
+ ],
193
+ "affects": [
194
+ "the device list shared by every instance in the process"
195
+ ],
196
+ "refresh_with": [
197
+ "yarn workspace @webex/plugin-device-manager build:src"
198
+ ],
199
+ "validate_with": [
200
+ "yarn workspace @webex/plugin-device-manager test:unit",
201
+ "yarn workspace @webex/plugin-device-manager test:style"
202
+ ],
203
+ "avoid_direct_edits": [
204
+ "dist"
205
+ ],
206
+ "notes": "INV-004: one object per loaded module."
207
+ },
208
+ {
209
+ "paths": [
210
+ "src/index.js"
211
+ ],
212
+ "affects": [
213
+ "the registered plugin name and the side-effect imports"
214
+ ],
215
+ "refresh_with": [
216
+ "yarn workspace @webex/plugin-device-manager build:src"
217
+ ],
218
+ "validate_with": [
219
+ "yarn workspace @webex/plugin-device-manager test:unit",
220
+ "yarn workspace @webex/plugin-device-manager test:style"
221
+ ],
222
+ "avoid_direct_edits": [
223
+ "dist"
224
+ ],
225
+ "notes": "webex and webex-node register the plugin by import (MOD-001)."
226
+ }
227
+ ],
228
+ "evidence_rules": [
229
+ {
230
+ "claim_category": "command_name",
231
+ "sources": [
232
+ "package.json"
233
+ ],
234
+ "requirement": "The script must exist in package.json scripts.",
235
+ "notes": "test:integration does not exist, so the aggregate test script fails; test:browser currently verifies nothing."
236
+ },
237
+ {
238
+ "claim_category": "import_path",
239
+ "sources": [
240
+ "src/index.js"
241
+ ],
242
+ "requirement": "A binding is public only if exported from src/index.js.",
243
+ "notes": "The exports are the default DeviceManager and the named config."
244
+ },
245
+ {
246
+ "claim_category": "behavior_claim",
247
+ "sources": [
248
+ "src",
249
+ "test/unit/spec"
250
+ ],
251
+ "requirement": "Ground every behavioral claim in source or test evidence.",
252
+ "notes": "Commit history is not an evidence source for this package. README.md is context only (docs/adr/0001-retain-product-readme.md). The lyra, search, mercury, device, and webex-core specs were consulted; encryption has no spec, so its code was read, and the mercury code was checked for the emit scheme."
253
+ }
254
+ ],
255
+ "negative_guidance": [
256
+ {
257
+ "rule": "Do not call Lyra, search, or KMS endpoints directly; go through webex.internal.lyra, webex.internal.search, and webex.internal.encryption.",
258
+ "why": "Those plugins own the URLs, request bodies, and KMS wrapping."
259
+ },
260
+ {
261
+ "rule": "Do not change when upsert sets the paired device without a change request.",
262
+ "why": "pair relies on upsert moving the pending PIN device to paired (INV-003)."
263
+ },
264
+ {
265
+ "rule": "Do not make the device list per instance or reset it outside refresh without a change request.",
266
+ "why": "getAll and the Mercury handler read the shared module-level list (INV-004)."
267
+ },
268
+ {
269
+ "rule": "Do not pass absolute space URLs to join, leave, or the bindings.",
270
+ "why": "Lyra sends them as catalog resources and needs the relative form (INV-005)."
271
+ },
272
+ {
273
+ "rule": "Do not log PINs, decrypted device names, KMS key URLs, ultrasound tokens, or search queries through webex.logger.",
274
+ "why": "They identify users and grant access; the plugin logs only messages, error objects, and one device id today."
275
+ },
276
+ {
277
+ "rule": "Do not treat README.md as the behavior reference.",
278
+ "why": "Its samples command, connect snippet, and chained flow do not run; see docs/adr/0001-retain-product-readme.md."
279
+ },
280
+ {
281
+ "rule": "Do not infer a coverage threshold for this package.",
282
+ "why": "No coverage script or threshold exists."
283
+ }
284
+ ],
285
+ "confidence_policy": {
286
+ "high": {
287
+ "action": "update",
288
+ "expectation": "Source and a unit case agree, as for getPairedDevice and the paired-method accessors."
289
+ },
290
+ "medium": {
291
+ "action": "narrow-scope",
292
+ "expectation": "Only source evidence exists, as for every other method today. Pin current behavior with a unit case before modifying."
293
+ },
294
+ "low": {
295
+ "action": "noop",
296
+ "expectation": "Neither source, tests, nor a dependency's spec or code settles the question, as for why upsert changes pairing or why uc-cloud ids get the WDM URL. Stop and report the gap."
297
+ }
298
+ },
299
+ "repository_topology": {
300
+ "main_entrypoints": [
301
+ {
302
+ "name": "package entry",
303
+ "path": "src/index.js",
304
+ "purpose": "Registers the devicemanager plugin and exports the class and config",
305
+ "notes": "No subpath exports; package.json main is dist/index.js and devMain is src/index.js."
306
+ }
307
+ ],
308
+ "workspace_packages": [
309
+ {
310
+ "name": "@webex/plugin-device-manager",
311
+ "paths": [
312
+ "src",
313
+ "test"
314
+ ],
315
+ "notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
316
+ }
317
+ ],
318
+ "source_surfaces": [
319
+ {
320
+ "name": "Device Manager plugin",
321
+ "paths": [
322
+ "src"
323
+ ],
324
+ "notes": "index.js, device-manager.js, collection.js, constants.js, and config.js. Specified at src/docs/README.md."
325
+ },
326
+ {
327
+ "name": "tests",
328
+ "paths": [
329
+ "test/unit/spec"
330
+ ],
331
+ "notes": "One jest spec with 14 cases. There is no integration spec."
332
+ },
333
+ {
334
+ "name": "manual trial files",
335
+ "paths": [
336
+ "webex.js",
337
+ "sample"
338
+ ],
339
+ "notes": "A browser harness and page that no script builds or serves."
340
+ }
341
+ ],
342
+ "generated_surfaces": [
343
+ {
344
+ "name": "build output",
345
+ "paths": [
346
+ "dist"
347
+ ],
348
+ "generated_from": "src",
349
+ "refresh_with": "yarn workspace @webex/plugin-device-manager build:src",
350
+ "notes": "JavaScript and source maps from webex-legacy-tools; no type declarations. Do not edit by hand."
351
+ },
352
+ {
353
+ "name": "repo-standards template map",
354
+ "paths": [
355
+ "../../../.sdd/templates/repo-standards"
356
+ ],
357
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
358
+ "refresh_with": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package.",
359
+ "notes": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
360
+ }
361
+ ],
362
+ "validation_entrypoints": [
363
+ {
364
+ "name": "compile",
365
+ "command": "yarn workspace @webex/plugin-device-manager build",
366
+ "scope": "src",
367
+ "notes": "Runs build:src."
368
+ },
369
+ {
370
+ "name": "unit-test",
371
+ "command": "yarn workspace @webex/plugin-device-manager test:unit",
372
+ "scope": "test/unit/spec",
373
+ "notes": "Jest through webex-legacy-tools; imports src by relative path."
374
+ },
375
+ {
376
+ "name": "lint",
377
+ "command": "yarn workspace @webex/plugin-device-manager test:style",
378
+ "scope": "src",
379
+ "notes": "eslint via the local .eslintrc.js; docs/** and *.md are ignored."
380
+ }
381
+ ],
382
+ "sync_paths": [
383
+ {
384
+ "source": "src/device-manager.js",
385
+ "targets": [
386
+ "src/docs/README.md"
387
+ ],
388
+ "mechanism": "Manual; update the module specification in the same change that alters observable behavior.",
389
+ "notes": "Keep the requirement, state machine, failure-mode, and wire rows of the specification aligned with src/device-manager.js, src/collection.js, and src/index.js."
390
+ },
391
+ {
392
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
393
+ "targets": [
394
+ "../../../.sdd/templates/repo-standards"
395
+ ],
396
+ "mechanism": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package.",
397
+ "notes": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
398
+ }
399
+ ]
400
+ },
401
+ "folder_readme_contract": {
402
+ "required_sections": [
403
+ "purpose",
404
+ "boundaries",
405
+ "key-files",
406
+ "common-tasks"
407
+ ],
408
+ "rules": [
409
+ "Orient the reader before describing detail.",
410
+ "Link to the module specification rather than duplicating it."
411
+ ],
412
+ "example_policy": "Examples are allowed only when verified against src/ or test/.",
413
+ "fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
414
+ },
415
+ "regression_feedback_rules": [
416
+ {
417
+ "trigger": "A WDM request or the refresh result in src/device-manager.js changes.",
418
+ "required_followups": [
419
+ "Add a test/unit/spec case asserting the request options and the resolved value",
420
+ "Update MOD-004, MOD-006, MOD-008, and the Protocol and wire format rows in src/docs/README.md"
421
+ ],
422
+ "notes": "No unit case covers a WDM request today."
423
+ },
424
+ {
425
+ "trigger": "The pairing state, a guard, or the lyra.space_updated handler changes.",
426
+ "required_followups": [
427
+ "Add parametrized unit cases for the guards and the transitions",
428
+ "Update INV-001, INV-003, the Client state model, and the State machine in src/docs/README.md"
429
+ ],
430
+ "notes": "upsert, unpair, and the Mercury handler have recorded behavior callers may rely on."
431
+ },
432
+ {
433
+ "trigger": "The registration or side-effect imports in src/index.js or src/device-manager.js change.",
434
+ "required_followups": [
435
+ "Check webex and webex-node",
436
+ "Update MOD-001 in src/docs/README.md"
437
+ ],
438
+ "notes": "Applications reach the plugin as webex.devicemanager."
439
+ }
440
+ ],
441
+ "surface_owners": [
442
+ {
443
+ "surface": "module implementation and specifications",
444
+ "owner": "@webex/web-client @webex/web-sdk",
445
+ "edit_boundary": "The monorepo .github/CODEOWNERS line for packages/@webex/plugin-device-manager assigns @webex/web-client and @webex/web-sdk."
446
+ }
447
+ ],
448
+ "do_not_edit": [
449
+ "dist",
450
+ "../../../.sdd/templates/repo-standards"
451
+ ],
452
+ "marker_scopes": {
453
+ "sdd": [
454
+ ".sdd/manifest.json",
455
+ "src/docs/README.md",
456
+ "docs"
457
+ ]
458
+ },
459
+ "fallback_rules": [
460
+ "When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
461
+ "When neither source nor tests settle a question, report it as a gap instead of inferring.",
462
+ "Commit history is not a valid rationale source for this package.",
463
+ "When a dependency's specification disagrees with that dependency's code, use the code and record the disagreement; when a dependency has no specification, use its code."
464
+ ],
465
+ "downstream_context_pack": {
466
+ "required_human_surfaces": [
467
+ "README.md",
468
+ "docs/index.md",
469
+ "docs/architecture.md",
470
+ "src/docs/README.md"
471
+ ],
472
+ "required_agent_operational_surfaces": [
473
+ "AGENTS.md",
474
+ "docs/specs/README.md"
475
+ ],
476
+ "required_machine_readable_surface": ".sdd/manifest.json",
477
+ "recommended_machine_readable_sections": [
478
+ "public_interfaces",
479
+ "change_impact",
480
+ "evidence_rules",
481
+ "negative_guidance",
482
+ "confidence_policy",
483
+ "repository_topology",
484
+ "folder_readme_contract",
485
+ "regression_feedback_rules"
486
+ ]
487
+ }
488
+ }