@webex/plugin-rooms 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,425 @@
1
+ {
2
+ "$schema": "./schemas/repo-context.schema.json",
3
+ "version": 1,
4
+ "repository": {
5
+ "name": "@webex/plugin-rooms",
6
+ "purpose": "Public plugin registered as webex.rooms that manages Webex rooms (spaces) through the Webex REST API rooms resource (catalog service hydra): create POSTs rooms, get and remove take a room object or id, list resolves a webex-core Page, and update PUTs the whole room object. listWithReadStatus(maxRecent) and getWithReadStatus(roomId) wait for the postauth service catalog, read conversations from the internal conversation plugin, and resolve objects with the hydra room id, type direct or group, title, lastActivityDate, and lastSeenActivityDate, newest activity first. listen() builds a webhook-style event envelope, connects the Mercury socket, and turns conversation activities with the verbs create, update, lock, and unlock into created and updated events on webex.rooms. Importing the package also registers the conversation and mercury internal plugins. Nothing is cached or persisted."
7
+ },
8
+ "commands": {
9
+ "install": "yarn",
10
+ "compile": "yarn workspace @webex/plugin-rooms build",
11
+ "build": "yarn workspace @webex/plugin-rooms build:src",
12
+ "lint": "yarn workspace @webex/plugin-rooms test:style",
13
+ "browser-test": "yarn workspace @webex/plugin-rooms test:browser:broken",
14
+ "deploy": "yarn workspace @webex/plugin-rooms deploy:npm"
15
+ },
16
+ "public_interfaces": [
17
+ {
18
+ "name": "@webex/plugin-rooms package entry",
19
+ "kind": "package_export",
20
+ "source": "src/index.js",
21
+ "entrypoints": [
22
+ "import '@webex/plugin-rooms'",
23
+ "import Rooms from '@webex/plugin-rooms'"
24
+ ],
25
+ "audience": "SDK bundles (webex, webex-node) and applications that build their own webex instance",
26
+ "notes": "Importing the package registers the internal plugins conversation and mercury, then Rooms as public plugin 'rooms' with no config; the first registration of the name wins. The default export Rooms is the only export."
27
+ },
28
+ {
29
+ "name": "webex.rooms methods and events",
30
+ "kind": "plugin_api",
31
+ "source": "src/rooms.js",
32
+ "entrypoints": [
33
+ "webex.rooms.create(room)",
34
+ "webex.rooms.get(room, options)",
35
+ "webex.rooms.list(options)",
36
+ "webex.rooms.update(room)",
37
+ "webex.rooms.remove(room)",
38
+ "webex.rooms.listWithReadStatus(maxRecent)",
39
+ "webex.rooms.getWithReadStatus(roomId)",
40
+ "webex.rooms.listen()",
41
+ "webex.rooms.on('created' or 'updated', handler)"
42
+ ],
43
+ "audience": "applications and the workspace samples browser-socket and browser-read-status",
44
+ "notes": "create, get, list, update, and remove send one hydra rooms request each; list resolves a webex-core Page and remove resolves undefined on 204. listWithReadStatus rejects a negative maxRecent before any request, but a value above 100 is not rejected; it resolves {items} sorted newest activity first. getWithReadStatus decodes a hydra room id. listen() needs spark:all and spark:kms; each call adds another Mercury listener. onWebexApiEvent and getRoomEvent are marked @private."
45
+ },
46
+ {
47
+ "name": "package scripts",
48
+ "kind": "npm_scripts",
49
+ "source": "package.json",
50
+ "entrypoints": [
51
+ "build",
52
+ "build:src",
53
+ "test:style",
54
+ "test:browser:broken",
55
+ "test",
56
+ "deploy:npm"
57
+ ],
58
+ "audience": "contributors and CI",
59
+ "notes": "build runs build:src, which writes dist. There is no test:unit script and no unit test. test:browser:broken (commands.browser-test) runs karma over test/integration/spec but bundles nothing today (no case run, exit 0). The aggregate test script runs test:style, then exits 1 because test:unit is not defined (it also names test:integration and test:browser, which are not defined either); it is deliberately not a manifest command."
60
+ }
61
+ ],
62
+ "source_of_truth": [
63
+ {
64
+ "surface": "Rooms plugin implementation",
65
+ "paths": [
66
+ "src/index.js",
67
+ "src/rooms.js"
68
+ ],
69
+ "generated_artifacts": [
70
+ "dist"
71
+ ],
72
+ "refresh_with": [
73
+ "yarn workspace @webex/plugin-rooms build:src"
74
+ ],
75
+ "validate_with": [
76
+ "yarn workspace @webex/plugin-rooms test:style"
77
+ ]
78
+ },
79
+ {
80
+ "surface": "module specification",
81
+ "paths": [
82
+ "src/docs/README.md"
83
+ ],
84
+ "generated_artifacts": [],
85
+ "refresh_with": [
86
+ "update alongside the behavior change in the same commit"
87
+ ],
88
+ "validate_with": [
89
+ "spec-validator on an independent runtime"
90
+ ]
91
+ }
92
+ ],
93
+ "generated_artifacts": [
94
+ {
95
+ "path": "dist",
96
+ "generated_from": "src",
97
+ "refresh_with": "yarn workspace @webex/plugin-rooms build:src"
98
+ },
99
+ {
100
+ "path": "../../../.sdd/templates/repo-standards/template-map.json",
101
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
102
+ "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."
103
+ }
104
+ ],
105
+ "validation_matrix": [
106
+ {
107
+ "paths": [
108
+ "src/**"
109
+ ],
110
+ "minimum": [
111
+ "yarn workspace @webex/plugin-rooms build:src",
112
+ "yarn workspace @webex/plugin-rooms test:style"
113
+ ],
114
+ "recommended": [
115
+ "add a test/unit/spec case and a test:unit script for the changed behavior; the package has no unit tests"
116
+ ]
117
+ },
118
+ {
119
+ "paths": [
120
+ "src/rooms.js"
121
+ ],
122
+ "minimum": [
123
+ "yarn workspace @webex/plugin-rooms build:src",
124
+ "yarn workspace @webex/plugin-rooms test:style"
125
+ ],
126
+ "recommended": [
127
+ "pin the request paths, the read-status object, the maxRecent checks, and the verb-to-event mapping with unit cases before changing them; check the workspace samples browser-socket and browser-read-status, which use listen and listWithReadStatus"
128
+ ]
129
+ },
130
+ {
131
+ "paths": [
132
+ "src/index.js"
133
+ ],
134
+ "minimum": [
135
+ "yarn workspace @webex/plugin-rooms build:src",
136
+ "yarn workspace @webex/plugin-rooms test:style"
137
+ ],
138
+ "recommended": [
139
+ "check the bundles that register the plugin (webex, webex-node) when the registered name or the conversation and mercury imports change"
140
+ ]
141
+ }
142
+ ],
143
+ "change_impact": [
144
+ {
145
+ "paths": [
146
+ "src/rooms.js"
147
+ ],
148
+ "affects": [
149
+ "the hydra rooms requests and their result shapes",
150
+ "the read-status object and the maxRecent rules",
151
+ "the created and updated events and their envelope"
152
+ ],
153
+ "refresh_with": [
154
+ "yarn workspace @webex/plugin-rooms build:src"
155
+ ],
156
+ "validate_with": [
157
+ "yarn workspace @webex/plugin-rooms test:style"
158
+ ],
159
+ "avoid_direct_edits": [
160
+ "dist"
161
+ ],
162
+ "notes": "No unit case covers any method; add one before changing behavior."
163
+ },
164
+ {
165
+ "paths": [
166
+ "src/index.js"
167
+ ],
168
+ "affects": [
169
+ "the registered plugin name",
170
+ "registration of webex.internal.conversation and webex.internal.mercury"
171
+ ],
172
+ "refresh_with": [
173
+ "yarn workspace @webex/plugin-rooms build:src"
174
+ ],
175
+ "validate_with": [
176
+ "yarn workspace @webex/plugin-rooms test:style"
177
+ ],
178
+ "avoid_direct_edits": [
179
+ "dist"
180
+ ],
181
+ "notes": "The read-status methods and listen() depend on the two internal plugins registered here (MOD-001)."
182
+ }
183
+ ],
184
+ "evidence_rules": [
185
+ {
186
+ "claim_category": "command_name",
187
+ "sources": [
188
+ "package.json"
189
+ ],
190
+ "requirement": "The script must exist in package.json scripts.",
191
+ "notes": "test:unit, test:integration, and test:browser do not exist, so the aggregate test script fails; test:browser:broken currently verifies nothing."
192
+ },
193
+ {
194
+ "claim_category": "import_path",
195
+ "sources": [
196
+ "src/index.js"
197
+ ],
198
+ "requirement": "A binding is public only if exported from src/index.js.",
199
+ "notes": "The only export is the default Rooms."
200
+ },
201
+ {
202
+ "claim_category": "behavior_claim",
203
+ "sources": [
204
+ "src"
205
+ ],
206
+ "requirement": "Ground every behavioral claim in source evidence.",
207
+ "notes": "Commit history is not an evidence source for this package. README.md is context only (docs/adr/0001-retain-product-readme.md). The integration spec under test/integration/spec states intended behavior but no script runs it. The webex-core, common, and internal-plugin-mercury specs were consulted; internal-plugin-conversation has no spec, so its code was read, as were the webex-core services and the common helpers where those specs are silent."
208
+ }
209
+ ],
210
+ "negative_guidance": [
211
+ {
212
+ "rule": "Do not build Hydra ids by hand or with a fixed cluster.",
213
+ "why": "Read-status and event ids must match the ids the rooms resource returns (INV-003)."
214
+ },
215
+ {
216
+ "rule": "Do not let getRoomEvent or onWebexApiEvent throw.",
217
+ "why": "They run inside the Mercury listener chain; getRoomEvent logs and returns null on error (INV-004)."
218
+ },
219
+ {
220
+ "rule": "Do not fill an event without deep-cloning the stored envelope.",
221
+ "why": "One envelope is shared by every event (INV-005)."
222
+ },
223
+ {
224
+ "rule": "Do not log room titles, room ids, or person ids through webex.logger.",
225
+ "why": "They identify users and spaces; only the conversion error is logged today."
226
+ },
227
+ {
228
+ "rule": "Do not treat README.md as the behavior reference.",
229
+ "why": "It shows only get(id); see docs/adr/0001-retain-product-readme.md."
230
+ },
231
+ {
232
+ "rule": "Do not infer a coverage threshold or a unit-test command for this package.",
233
+ "why": "No unit test, test:unit script, coverage script, or threshold exists."
234
+ }
235
+ ],
236
+ "confidence_policy": {
237
+ "high": {
238
+ "action": "update",
239
+ "expectation": "Source and a unit case agree; no such case exists in this package yet."
240
+ },
241
+ "medium": {
242
+ "action": "narrow-scope",
243
+ "expectation": "Only source evidence exists, or only the unrun integration spec, as for every method and event today. Pin current behavior with a unit case before modifying."
244
+ },
245
+ "low": {
246
+ "action": "noop",
247
+ "expectation": "Neither source, tests, nor a dependency's spec or code settles the question, as for which activity fields Mercury delivers for each verb. Stop and report the gap."
248
+ }
249
+ },
250
+ "repository_topology": {
251
+ "main_entrypoints": [
252
+ {
253
+ "name": "package entry",
254
+ "path": "src/index.js",
255
+ "purpose": "Registers the conversation and mercury internal plugins and the rooms plugin, and exports the class",
256
+ "notes": "No subpath exports; package.json main is dist/index.js and devMain is src/index.js."
257
+ }
258
+ ],
259
+ "workspace_packages": [
260
+ {
261
+ "name": "@webex/plugin-rooms",
262
+ "paths": [
263
+ "src",
264
+ "test"
265
+ ],
266
+ "notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
267
+ }
268
+ ],
269
+ "source_surfaces": [
270
+ {
271
+ "name": "Rooms plugin",
272
+ "paths": [
273
+ "src"
274
+ ],
275
+ "notes": "index.js and rooms.js. Specified at src/docs/README.md."
276
+ },
277
+ {
278
+ "name": "tests",
279
+ "paths": [
280
+ "test/integration/spec"
281
+ ],
282
+ "notes": "One live-service integration spec that only test:browser:broken would run, and it bundles nothing today. There is no unit spec."
283
+ }
284
+ ],
285
+ "generated_surfaces": [
286
+ {
287
+ "name": "build output",
288
+ "paths": [
289
+ "dist"
290
+ ],
291
+ "generated_from": "src",
292
+ "refresh_with": "yarn workspace @webex/plugin-rooms build:src",
293
+ "notes": "JavaScript and source maps from webex-legacy-tools; no type declarations. Do not edit by hand."
294
+ },
295
+ {
296
+ "name": "repo-standards template map",
297
+ "paths": [
298
+ "../../../.sdd/templates/repo-standards"
299
+ ],
300
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
301
+ "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.",
302
+ "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."
303
+ }
304
+ ],
305
+ "validation_entrypoints": [
306
+ {
307
+ "name": "compile",
308
+ "command": "yarn workspace @webex/plugin-rooms build",
309
+ "scope": "src",
310
+ "notes": "Runs build:src."
311
+ },
312
+ {
313
+ "name": "lint",
314
+ "command": "yarn workspace @webex/plugin-rooms test:style",
315
+ "scope": "src",
316
+ "notes": "eslint via the local .eslintrc.js; docs/** and *.md are ignored."
317
+ }
318
+ ],
319
+ "sync_paths": [
320
+ {
321
+ "source": "src/rooms.js",
322
+ "targets": [
323
+ "src/docs/README.md"
324
+ ],
325
+ "mechanism": "Manual; update the module specification in the same change that alters observable behavior.",
326
+ "notes": "Keep the request, read-status, event, and wire rows of the specification aligned with src/rooms.js and src/index.js."
327
+ },
328
+ {
329
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
330
+ "targets": [
331
+ "../../../.sdd/templates/repo-standards"
332
+ ],
333
+ "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.",
334
+ "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."
335
+ }
336
+ ]
337
+ },
338
+ "folder_readme_contract": {
339
+ "required_sections": [
340
+ "purpose",
341
+ "boundaries",
342
+ "key-files",
343
+ "common-tasks"
344
+ ],
345
+ "rules": [
346
+ "Orient the reader before describing detail.",
347
+ "Link to the module specification rather than duplicating it."
348
+ ],
349
+ "example_policy": "Examples are allowed only when verified against src/ or test/.",
350
+ "fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
351
+ },
352
+ "regression_feedback_rules": [
353
+ {
354
+ "trigger": "A rooms request or its result handling in src/rooms.js changes.",
355
+ "required_followups": [
356
+ "Add a test:unit script and a test/unit/spec case asserting the request options and the resolved value",
357
+ "Update MOD-002 to MOD-006 in src/docs/README.md"
358
+ ],
359
+ "notes": "No unit case exists for any method today."
360
+ },
361
+ {
362
+ "trigger": "listWithReadStatus, getWithReadStatus, or buildRoomInfo in src/rooms.js changes.",
363
+ "required_followups": [
364
+ "Add unit cases for the maxRecent branches, the catalog wait, and the read-status object",
365
+ "Update MOD-007 to MOD-009, INV-001 to INV-003 in src/docs/README.md"
366
+ ],
367
+ "notes": "The samples read items, lastActivityDate, and lastSeenActivityDate."
368
+ },
369
+ {
370
+ "trigger": "listen, onWebexApiEvent, or getRoomEvent in src/rooms.js, or the imports in src/index.js, change.",
371
+ "required_followups": [
372
+ "Add parametrized unit cases for each activity verb, the lock flag, and the logged error path",
373
+ "Update MOD-001, MOD-010 to MOD-012, INV-004, and INV-005 in src/docs/README.md"
374
+ ],
375
+ "notes": "Listeners rely on the event names created and updated and on the envelope fields."
376
+ }
377
+ ],
378
+ "surface_owners": [
379
+ {
380
+ "surface": "module implementation and specifications",
381
+ "owner": "@webex/web-client @webex/web-sdk",
382
+ "edit_boundary": "Owners per the packages/@webex/plugin-rooms line of the monorepo .github/CODEOWNERS."
383
+ }
384
+ ],
385
+ "do_not_edit": [
386
+ "dist",
387
+ "../../../.sdd/templates/repo-standards"
388
+ ],
389
+ "marker_scopes": {
390
+ "sdd": [
391
+ ".sdd/manifest.json",
392
+ "src/docs/README.md",
393
+ "docs"
394
+ ]
395
+ },
396
+ "fallback_rules": [
397
+ "When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
398
+ "When neither source nor tests settle a question, report it as a gap instead of inferring.",
399
+ "Commit history is not a valid rationale source for this package.",
400
+ "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."
401
+ ],
402
+ "downstream_context_pack": {
403
+ "required_human_surfaces": [
404
+ "README.md",
405
+ "docs/index.md",
406
+ "docs/architecture.md",
407
+ "src/docs/README.md"
408
+ ],
409
+ "required_agent_operational_surfaces": [
410
+ "AGENTS.md",
411
+ "docs/specs/README.md"
412
+ ],
413
+ "required_machine_readable_surface": ".sdd/manifest.json",
414
+ "recommended_machine_readable_sections": [
415
+ "public_interfaces",
416
+ "change_impact",
417
+ "evidence_rules",
418
+ "negative_guidance",
419
+ "confidence_policy",
420
+ "repository_topology",
421
+ "folder_readme_contract",
422
+ "regression_feedback_rules"
423
+ ]
424
+ }
425
+ }