@webex/internal-plugin-locus 3.13.0-next.4 → 3.13.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.repo-context.json +425 -0
- package/.sdd/manifest.json +368 -0
- package/AGENTS.md +194 -0
- package/dist/locus.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +93 -0
- package/docs/adr/index.md +22 -0
- package/docs/architecture.md +257 -0
- package/docs/getting-started.md +112 -0
- package/docs/index.md +48 -0
- package/docs/specs/README.md +71 -0
- package/package.json +9 -9
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +498 -0
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./schemas/repo-context.schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"repository": {
|
|
5
|
+
"name": "@webex/internal-plugin-locus",
|
|
6
|
+
"purpose": "Internal Webex JS SDK plugin for the Locus call and meeting state service. It registers webex.internal.locus, wraps the Locus REST operations (create, join, alert, decline, leave, get, list, sync, media update, DTMF, and floor grant) and the Janus call-history query, compares Locus sequence objects to decide whether an incoming Locus DTO replaces, is ignored, or requires a fetch, merges Locus delta DTOs into a caller-held working copy, and exports a fixed list of 17 Locus event names (not exhaustive)."
|
|
7
|
+
},
|
|
8
|
+
"commands": {
|
|
9
|
+
"install": "yarn",
|
|
10
|
+
"compile": "yarn workspace @webex/internal-plugin-locus build:src",
|
|
11
|
+
"build": "yarn workspace @webex/internal-plugin-locus build",
|
|
12
|
+
"unit-test": "yarn workspace @webex/internal-plugin-locus test:unit",
|
|
13
|
+
"browser-test": "yarn workspace @webex/internal-plugin-locus test:browser",
|
|
14
|
+
"lint": "yarn workspace @webex/internal-plugin-locus test:style",
|
|
15
|
+
"deploy": "yarn workspace @webex/internal-plugin-locus deploy:npm"
|
|
16
|
+
},
|
|
17
|
+
"public_interfaces": [
|
|
18
|
+
{
|
|
19
|
+
"name": "@webex/internal-plugin-locus package barrel",
|
|
20
|
+
"kind": "package_export",
|
|
21
|
+
"source": "src/index.js",
|
|
22
|
+
"entrypoints": [
|
|
23
|
+
"import Locus, {eventKeys, USE_INCOMING, USE_CURRENT, EQUAL, FETCH, GREATER_THAN, LESS_THAN, DESYNC} from '@webex/internal-plugin-locus'"
|
|
24
|
+
],
|
|
25
|
+
"audience": "the sibling package internal-plugin-lyra, which lists this package as a dependency and imports it in its integration spec",
|
|
26
|
+
"notes": "Importing the package also imports @webex/internal-plugin-mercury for its side effect and registers Locus as internal plugin 'locus' with no config."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "webex.internal.locus runtime methods",
|
|
30
|
+
"kind": "plugin_api",
|
|
31
|
+
"source": "src/locus.js",
|
|
32
|
+
"entrypoints": [
|
|
33
|
+
"webex.internal.locus.alert()",
|
|
34
|
+
"webex.internal.locus.compare()",
|
|
35
|
+
"webex.internal.locus.compareSequence()",
|
|
36
|
+
"webex.internal.locus.create()",
|
|
37
|
+
"webex.internal.locus.createOrJoin()",
|
|
38
|
+
"webex.internal.locus.decline()",
|
|
39
|
+
"webex.internal.locus.get()",
|
|
40
|
+
"webex.internal.locus.getCallHistory()",
|
|
41
|
+
"webex.internal.locus.join()",
|
|
42
|
+
"webex.internal.locus.leave()",
|
|
43
|
+
"webex.internal.locus.list()",
|
|
44
|
+
"webex.internal.locus.merge()",
|
|
45
|
+
"webex.internal.locus.releaseFloorGrant()",
|
|
46
|
+
"webex.internal.locus.requestFloorGrant()",
|
|
47
|
+
"webex.internal.locus.sendDtmf()",
|
|
48
|
+
"webex.internal.locus.sync()",
|
|
49
|
+
"webex.internal.locus.updateMedia()"
|
|
50
|
+
],
|
|
51
|
+
"audience": "SDK plugins and applications that manage Locus calls directly",
|
|
52
|
+
"notes": "createOrJoin is documented as private in JSDoc; compareDelta is also defined on the plugin and documented as private. The plugin holds no state; callers own the Locus working copy passed to compare and merge."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "package scripts",
|
|
56
|
+
"kind": "npm_scripts",
|
|
57
|
+
"source": "package.json",
|
|
58
|
+
"entrypoints": [
|
|
59
|
+
"build",
|
|
60
|
+
"build:src",
|
|
61
|
+
"test:style",
|
|
62
|
+
"test:unit",
|
|
63
|
+
"test:browser",
|
|
64
|
+
"deploy:npm"
|
|
65
|
+
],
|
|
66
|
+
"audience": "contributors and CI",
|
|
67
|
+
"notes": "Do not run the aggregate test script: it chains test:integration, which is not defined. test:browser invokes webex-legacy-tools with --integration --runner karma; with no test/integration directory it collects no files and does not start karma."
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"source_of_truth": [
|
|
71
|
+
{
|
|
72
|
+
"surface": "Locus plugin implementation",
|
|
73
|
+
"paths": [
|
|
74
|
+
"src/index.js",
|
|
75
|
+
"src/locus.js",
|
|
76
|
+
"src/event-keys.js"
|
|
77
|
+
],
|
|
78
|
+
"generated_artifacts": [
|
|
79
|
+
"dist"
|
|
80
|
+
],
|
|
81
|
+
"refresh_with": [
|
|
82
|
+
"yarn workspace @webex/internal-plugin-locus build:src"
|
|
83
|
+
],
|
|
84
|
+
"validate_with": [
|
|
85
|
+
"yarn workspace @webex/internal-plugin-locus test:unit",
|
|
86
|
+
"yarn workspace @webex/internal-plugin-locus test:style"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"surface": "sequence comparison fixtures",
|
|
91
|
+
"paths": [
|
|
92
|
+
"test/unit/lib/BasicSeqCmp.json",
|
|
93
|
+
"test/unit/lib/SeqCmp.json"
|
|
94
|
+
],
|
|
95
|
+
"generated_artifacts": [],
|
|
96
|
+
"refresh_with": [
|
|
97
|
+
"edit by hand together with the compareSequence or compare change it pins"
|
|
98
|
+
],
|
|
99
|
+
"validate_with": [
|
|
100
|
+
"yarn workspace @webex/internal-plugin-locus test:unit"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"surface": "module specification",
|
|
105
|
+
"paths": [
|
|
106
|
+
"src/docs/README.md"
|
|
107
|
+
],
|
|
108
|
+
"generated_artifacts": [],
|
|
109
|
+
"refresh_with": [
|
|
110
|
+
"update alongside the behavior change in the same commit"
|
|
111
|
+
],
|
|
112
|
+
"validate_with": [
|
|
113
|
+
"spec-validator on an independent runtime"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"generated_artifacts": [
|
|
118
|
+
{
|
|
119
|
+
"path": "dist",
|
|
120
|
+
"generated_from": "src",
|
|
121
|
+
"refresh_with": "yarn workspace @webex/internal-plugin-locus build:src"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"path": "../../../.sdd/templates/repo-standards/template-map.json",
|
|
125
|
+
"generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
126
|
+
"refresh_with": "Run the setup script of the active Repo Annotation installation against the monorepo root"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"validation_matrix": [
|
|
130
|
+
{
|
|
131
|
+
"paths": [
|
|
132
|
+
"src/**"
|
|
133
|
+
],
|
|
134
|
+
"minimum": [
|
|
135
|
+
"yarn workspace @webex/internal-plugin-locus test:unit"
|
|
136
|
+
],
|
|
137
|
+
"recommended": [
|
|
138
|
+
"yarn workspace @webex/internal-plugin-locus test:style",
|
|
139
|
+
"yarn workspace @webex/internal-plugin-locus build:src"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"paths": [
|
|
144
|
+
"src/locus.js"
|
|
145
|
+
],
|
|
146
|
+
"minimum": [
|
|
147
|
+
"yarn workspace @webex/internal-plugin-locus test:unit"
|
|
148
|
+
],
|
|
149
|
+
"recommended": [
|
|
150
|
+
"add a unit case for any REST wrapper or merge change, because none exists today",
|
|
151
|
+
"review the sibling package internal-plugin-lyra integration spec test/integration/spec/space.js, which imports this package"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"change_impact": [
|
|
156
|
+
{
|
|
157
|
+
"paths": [
|
|
158
|
+
"src/locus.js"
|
|
159
|
+
],
|
|
160
|
+
"affects": [
|
|
161
|
+
"callers that apply Locus DTOs through compare and merge",
|
|
162
|
+
"Locus service request bodies and URLs"
|
|
163
|
+
],
|
|
164
|
+
"refresh_with": [
|
|
165
|
+
"yarn workspace @webex/internal-plugin-locus build:src"
|
|
166
|
+
],
|
|
167
|
+
"validate_with": [
|
|
168
|
+
"yarn workspace @webex/internal-plugin-locus test:unit"
|
|
169
|
+
],
|
|
170
|
+
"avoid_direct_edits": [
|
|
171
|
+
"dist"
|
|
172
|
+
],
|
|
173
|
+
"notes": "The sequence comparison result for every fixture in test/unit/lib must stay unchanged unless the Locus sequencing algorithm itself changes."
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"paths": [
|
|
177
|
+
"src/index.js",
|
|
178
|
+
"src/event-keys.js"
|
|
179
|
+
],
|
|
180
|
+
"affects": [
|
|
181
|
+
"the package export list",
|
|
182
|
+
"the internal plugin name 'locus'"
|
|
183
|
+
],
|
|
184
|
+
"refresh_with": [
|
|
185
|
+
"yarn workspace @webex/internal-plugin-locus build:src"
|
|
186
|
+
],
|
|
187
|
+
"validate_with": [
|
|
188
|
+
"yarn workspace @webex/internal-plugin-locus test:unit"
|
|
189
|
+
],
|
|
190
|
+
"avoid_direct_edits": [
|
|
191
|
+
"dist"
|
|
192
|
+
],
|
|
193
|
+
"notes": "Removing an export or renaming the plugin is a breaking change for importers."
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"evidence_rules": [
|
|
197
|
+
{
|
|
198
|
+
"claim_category": "command_name",
|
|
199
|
+
"sources": [
|
|
200
|
+
"package.json"
|
|
201
|
+
],
|
|
202
|
+
"requirement": "The script must exist in package.json scripts. test:integration is referenced by test but undefined.",
|
|
203
|
+
"notes": "Never cite the aggregate test script as runnable."
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"claim_category": "import_path",
|
|
207
|
+
"sources": [
|
|
208
|
+
"src/index.js"
|
|
209
|
+
],
|
|
210
|
+
"requirement": "A binding is public only if exported from src/index.js.",
|
|
211
|
+
"notes": "Consumers import from the package root; there are no subpath entry points."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"claim_category": "behavior_claim",
|
|
215
|
+
"sources": [
|
|
216
|
+
"src",
|
|
217
|
+
"test/unit/spec",
|
|
218
|
+
"test/unit/lib"
|
|
219
|
+
],
|
|
220
|
+
"requirement": "Ground every behavioral claim in source or test evidence.",
|
|
221
|
+
"notes": "Commit history is not an evidence source for this package. README.md is retained product documentation, not the behavioral authority."
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"negative_guidance": [
|
|
225
|
+
{
|
|
226
|
+
"rule": "Do not change compareSequence without rerunning both JSON fixtures.",
|
|
227
|
+
"why": "The 134 fixture cases are the only executable definition of the Locus sequencing algorithm in this package."
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"rule": "Do not pass a delta DTO without a participants array to merge.",
|
|
231
|
+
"why": "merge reads incoming.participants.length when participants is absent and throws a TypeError."
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"rule": "Do not pass localSdp to updateMedia.",
|
|
235
|
+
"why": "updateMedia destructures sdp, although its JSDoc names options.localSdp; a localSdp key is ignored."
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"rule": "Do not treat README.md as the method list.",
|
|
239
|
+
"why": "Its usage block shows a placeholder property. See docs/adr/0001-retain-product-readme.md."
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"rule": "Do not infer a coverage threshold for this package.",
|
|
243
|
+
"why": "The developer confirmed no coverage gate applies; jest-config-legacy sets collectCoverage false."
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"confidence_policy": {
|
|
247
|
+
"high": {
|
|
248
|
+
"action": "update",
|
|
249
|
+
"expectation": "Source and unit test evidence both support the change, which today means compareSequence and compare."
|
|
250
|
+
},
|
|
251
|
+
"medium": {
|
|
252
|
+
"action": "narrow-scope",
|
|
253
|
+
"expectation": "Only source evidence exists, for example the REST wrappers, merge, and the Conflict recovery. Pin current behavior with a characterization test before modifying."
|
|
254
|
+
},
|
|
255
|
+
"low": {
|
|
256
|
+
"action": "noop",
|
|
257
|
+
"expectation": "Neither source nor tests settle the question, for example a Locus service response shape. Stop and report the gap."
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"repository_topology": {
|
|
261
|
+
"main_entrypoints": [
|
|
262
|
+
{
|
|
263
|
+
"name": "package barrel",
|
|
264
|
+
"path": "src/index.js",
|
|
265
|
+
"purpose": "Imports Mercury for its side effect, registers the plugin, and re-exports Locus, eventKeys, and the sequence constants",
|
|
266
|
+
"notes": "No subpath exports."
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"workspace_packages": [
|
|
270
|
+
{
|
|
271
|
+
"name": "@webex/internal-plugin-locus",
|
|
272
|
+
"paths": [
|
|
273
|
+
"src",
|
|
274
|
+
"test"
|
|
275
|
+
],
|
|
276
|
+
"notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"source_surfaces": [
|
|
280
|
+
{
|
|
281
|
+
"name": "Locus plugin",
|
|
282
|
+
"paths": [
|
|
283
|
+
"src"
|
|
284
|
+
],
|
|
285
|
+
"notes": "index.js, locus.js, event-keys.js. Specified at src/docs/README.md."
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "tests",
|
|
289
|
+
"paths": [
|
|
290
|
+
"test/unit/spec",
|
|
291
|
+
"test/unit/lib"
|
|
292
|
+
],
|
|
293
|
+
"notes": "One Jest spec driven by two JSON fixtures. No integration specs exist."
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"generated_surfaces": [
|
|
297
|
+
{
|
|
298
|
+
"name": "build output",
|
|
299
|
+
"paths": [
|
|
300
|
+
"dist"
|
|
301
|
+
],
|
|
302
|
+
"generated_from": "src",
|
|
303
|
+
"refresh_with": "yarn workspace @webex/internal-plugin-locus build:src",
|
|
304
|
+
"notes": "Produced by webex-legacy-tools. Do not edit by hand."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "repo-standards template map",
|
|
308
|
+
"paths": [
|
|
309
|
+
"../../../.sdd/templates/repo-standards"
|
|
310
|
+
],
|
|
311
|
+
"generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
312
|
+
"refresh_with": "Run the setup script of the active Repo Annotation installation against the monorepo root",
|
|
313
|
+
"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."
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"validation_entrypoints": [
|
|
317
|
+
{
|
|
318
|
+
"name": "unit tests",
|
|
319
|
+
"command": "yarn workspace @webex/internal-plugin-locus test:unit",
|
|
320
|
+
"scope": "test/unit/spec",
|
|
321
|
+
"notes": "Jest via webex-legacy-tools --runner jest."
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "browser tests",
|
|
325
|
+
"command": "yarn workspace @webex/internal-plugin-locus test:browser",
|
|
326
|
+
"scope": "integration specs, of which this package has none",
|
|
327
|
+
"notes": "karma via webex-legacy-tools --integration; with no integration specs it collects no files and starts no browser."
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "lint",
|
|
331
|
+
"command": "yarn workspace @webex/internal-plugin-locus test:style",
|
|
332
|
+
"scope": "src",
|
|
333
|
+
"notes": "eslint via the local root .eslintrc.js."
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"sync_paths": [
|
|
337
|
+
{
|
|
338
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
339
|
+
"targets": [
|
|
340
|
+
"../../../.sdd/templates/repo-standards"
|
|
341
|
+
],
|
|
342
|
+
"mechanism": "Setup script of the active Repo Annotation installation",
|
|
343
|
+
"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."
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"folder_readme_contract": {
|
|
348
|
+
"required_sections": [
|
|
349
|
+
"purpose",
|
|
350
|
+
"boundaries",
|
|
351
|
+
"key-files",
|
|
352
|
+
"common-tasks"
|
|
353
|
+
],
|
|
354
|
+
"rules": [
|
|
355
|
+
"Orient the reader before describing detail.",
|
|
356
|
+
"Link to the module specification rather than duplicating it."
|
|
357
|
+
],
|
|
358
|
+
"example_policy": "Examples are allowed only when verified against src/ or test/.",
|
|
359
|
+
"fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
|
|
360
|
+
},
|
|
361
|
+
"regression_feedback_rules": [
|
|
362
|
+
{
|
|
363
|
+
"trigger": "A Locus DTO is applied, ignored, or fetched contrary to the Locus sequencing rules.",
|
|
364
|
+
"required_followups": [
|
|
365
|
+
"Add the current, incoming, and base sequences and the expected result to test/unit/lib/SeqCmp.json",
|
|
366
|
+
"Update the sequencing invariants in src/docs/README.md"
|
|
367
|
+
],
|
|
368
|
+
"notes": "Basic comparisons belong in test/unit/lib/BasicSeqCmp.json; delta decisions belong in update_actions of test/unit/lib/SeqCmp.json."
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"trigger": "A merged working copy loses or keeps a participant or field incorrectly.",
|
|
372
|
+
"required_followups": [
|
|
373
|
+
"Add the first unit case for merge in test/unit/spec/locus.js",
|
|
374
|
+
"Record the rule in src/docs/README.md"
|
|
375
|
+
],
|
|
376
|
+
"notes": "merge has no test today."
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"surface_owners": [
|
|
380
|
+
{
|
|
381
|
+
"surface": "module implementation and specification",
|
|
382
|
+
"owner": "@webex/web-sdk",
|
|
383
|
+
"edit_boundary": "The monorepo .github/CODEOWNERS has no entry for packages/@webex/internal-plugin-locus, so the default * rule applies."
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
"do_not_edit": [
|
|
387
|
+
"dist",
|
|
388
|
+
"../../../.sdd/templates/repo-standards"
|
|
389
|
+
],
|
|
390
|
+
"marker_scopes": {
|
|
391
|
+
"sdd": [
|
|
392
|
+
".sdd/manifest.json",
|
|
393
|
+
"src/docs/README.md",
|
|
394
|
+
"docs"
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
"fallback_rules": [
|
|
398
|
+
"When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
|
|
399
|
+
"When neither source nor tests settle a question, report it as a gap instead of inferring.",
|
|
400
|
+
"Commit history is not a valid rationale source for this package."
|
|
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
|
+
}
|