@webex/internal-plugin-locus 3.13.0-next.3 → 3.13.0-next.5
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 +3 -3
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +498 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/internal-plugin-locus",
|
|
5
|
+
"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).",
|
|
6
|
+
"category": "cat2-legacy",
|
|
7
|
+
"primary_languages": [
|
|
8
|
+
"javascript"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"topology": "Orchestrator-plus-components",
|
|
12
|
+
"commands": {
|
|
13
|
+
"install": {
|
|
14
|
+
"command": "yarn install",
|
|
15
|
+
"source_file": "package.json",
|
|
16
|
+
"role": "install"
|
|
17
|
+
},
|
|
18
|
+
"compile": {
|
|
19
|
+
"command": "yarn workspace @webex/internal-plugin-locus build:src",
|
|
20
|
+
"source_file": "package.json",
|
|
21
|
+
"role": "compile"
|
|
22
|
+
},
|
|
23
|
+
"build": {
|
|
24
|
+
"command": "yarn workspace @webex/internal-plugin-locus build",
|
|
25
|
+
"source_file": "package.json",
|
|
26
|
+
"role": "package"
|
|
27
|
+
},
|
|
28
|
+
"unit-test": {
|
|
29
|
+
"command": "yarn workspace @webex/internal-plugin-locus test:unit",
|
|
30
|
+
"source_file": "package.json",
|
|
31
|
+
"role": "unit-test"
|
|
32
|
+
},
|
|
33
|
+
"browser-test": {
|
|
34
|
+
"command": "yarn workspace @webex/internal-plugin-locus test:browser",
|
|
35
|
+
"source_file": "package.json",
|
|
36
|
+
"role": "other"
|
|
37
|
+
},
|
|
38
|
+
"lint": {
|
|
39
|
+
"command": "yarn workspace @webex/internal-plugin-locus test:style",
|
|
40
|
+
"source_file": "package.json",
|
|
41
|
+
"role": "lint"
|
|
42
|
+
},
|
|
43
|
+
"deploy": {
|
|
44
|
+
"command": "yarn workspace @webex/internal-plugin-locus deploy:npm",
|
|
45
|
+
"source_file": "package.json",
|
|
46
|
+
"role": "deploy"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"toolchain": [
|
|
50
|
+
{
|
|
51
|
+
"name": "node",
|
|
52
|
+
"version": "22.14",
|
|
53
|
+
"origin": "human-declared",
|
|
54
|
+
"declared_by": "akulakum@cisco.com (bootstrap instruction 'nvm use 22.14.0'; the workspace root AGENTS.md requires Node 22.14 for development; package.json engines >=18 is the consumer floor; the root package.json engines.node still declares 18.x)"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "babel",
|
|
58
|
+
"version": "^7.17.10",
|
|
59
|
+
"origin": "repo-config",
|
|
60
|
+
"source_file": "package.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "eslint",
|
|
64
|
+
"version": "^8.24.0",
|
|
65
|
+
"origin": "repo-config",
|
|
66
|
+
"source_file": "package.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "prettier",
|
|
70
|
+
"version": "^2.7.1",
|
|
71
|
+
"origin": "repo-config",
|
|
72
|
+
"source_file": "package.json"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"tests": {
|
|
76
|
+
"unit": {
|
|
77
|
+
"command_ref": "unit-test",
|
|
78
|
+
"dir": "test/unit/spec",
|
|
79
|
+
"framework": "jest"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"quality_gates": {
|
|
83
|
+
"code_coverage": {
|
|
84
|
+
"origin": "none",
|
|
85
|
+
"declared_by": "akulakum@cisco.com via bootstrap questionnaire (delegated check: jest.config.js re-exports @webex/jest-config-legacy, which sets collectCoverage false and no coverageThreshold; test:unit runs webex-legacy-tools with --runner jest; package.json defines no coverage script)"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"coverage_status_definitions": {
|
|
89
|
+
"specced": ">=80% public surface specced, drift <5% - spec is authoritative",
|
|
90
|
+
"partial": "40-80% specced - spec is a hint, cross-check code",
|
|
91
|
+
"untracked": "<40% specced - code is the source of truth"
|
|
92
|
+
},
|
|
93
|
+
"spec_source_policy": {
|
|
94
|
+
"mode": "keep-separate",
|
|
95
|
+
"migrated_source_disposition": "retain",
|
|
96
|
+
"disposition_decided_by": "akulakum@cisco.com",
|
|
97
|
+
"disposition_decided_at": "2026-10-09T06:22:13Z",
|
|
98
|
+
"decided_by": "akulakum@cisco.com",
|
|
99
|
+
"decided_at": "2026-10-09T06:22:13Z",
|
|
100
|
+
"decision_record": "docs/adr/0001-retain-product-readme.md"
|
|
101
|
+
},
|
|
102
|
+
"spec_sources": [],
|
|
103
|
+
"modules": [
|
|
104
|
+
{
|
|
105
|
+
"path": "src",
|
|
106
|
+
"canonical_spec": "src/docs/README.md",
|
|
107
|
+
"coverage_status": "Partial",
|
|
108
|
+
"coverage_evidence": "Field coverage 93.3% (14/15) assessed 2026-10-09 by the generator; critical field coverage 8/8. The one WEAK field is test strategy: test/unit/spec/locus.js runs 134 fixture cases that cover compareSequence and compare (including the delta and empty-sequence paths), but no test exercises registration, any REST wrapper, the Conflict recovery in decline and leave, merge, getCallHistory, or eventKeys, and no characterization baseline exists. Independent validation (spec-validator, runtime current-session, run ID 01a1cf57-d89e-7bc0-9a6a-d3345c695e50) returned pass-with-warnings on 2026-11-12 with 0 Blocking at HEAD 8cae6c46ec329bc0b2666cc9d1d5ab657d018db3. Held at Partial: untested REST and merge behavior, no characterization baseline, and no spec-drift record.",
|
|
109
|
+
"last_assessed": "2026-10-09",
|
|
110
|
+
"contracts": {
|
|
111
|
+
"provides": [
|
|
112
|
+
"locus-sdk"
|
|
113
|
+
],
|
|
114
|
+
"requires": [
|
|
115
|
+
"locus-service-http",
|
|
116
|
+
"janus-history-http",
|
|
117
|
+
"webex-core-plugin-host",
|
|
118
|
+
"webex-device-registration",
|
|
119
|
+
"mercury-sdk",
|
|
120
|
+
"lodash",
|
|
121
|
+
"uuid"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"section_profile": {
|
|
125
|
+
"has_tiers": false,
|
|
126
|
+
"has_ui": false,
|
|
127
|
+
"crosses_service_boundaries": true,
|
|
128
|
+
"holds_client_state": false,
|
|
129
|
+
"enforces_domain_rules": true,
|
|
130
|
+
"is_concurrent_async": true,
|
|
131
|
+
"owns_persistence": false,
|
|
132
|
+
"stateful_transitions": false,
|
|
133
|
+
"exposes_wire_protocol": true,
|
|
134
|
+
"ui_multi_screen": false,
|
|
135
|
+
"large_data_model": false,
|
|
136
|
+
"returns_caller_errors": true,
|
|
137
|
+
"module_specific_conventions": true,
|
|
138
|
+
"published_package": true,
|
|
139
|
+
"embedded_in_host": false,
|
|
140
|
+
"has_design_tradeoff": true,
|
|
141
|
+
"resolved_by": "claude-cowork (code evidence; bootstrap questionnaire)",
|
|
142
|
+
"resolved_at": "2026-10-09T06:22:13Z",
|
|
143
|
+
"has_submodules": false,
|
|
144
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
145
|
+
"has_submodules_computed_at": "2026-10-09T06:22:13Z"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"contract_catalog": {
|
|
150
|
+
"index_path": "docs/architecture.md",
|
|
151
|
+
"definitions": {
|
|
152
|
+
"locus-sdk": {
|
|
153
|
+
"kind": "sdk",
|
|
154
|
+
"publication": "published",
|
|
155
|
+
"source_kind": "repository-path",
|
|
156
|
+
"source": "package.json",
|
|
157
|
+
"summary": "Published npm package. main is dist/index.js and devMain is src/index.js. Importing the package imports @webex/internal-plugin-mercury for its side effect and registers Locus as the internal plugin 'locus' with no config. The barrel src/index.js exports Locus as default, eventKeys from src/event-keys.js, and the constants USE_INCOMING, USE_CURRENT, EQUAL, FETCH, GREATER_THAN, LESS_THAN, and DESYNC from src/locus.js. Per-method behavior is in src/docs/README.md."
|
|
158
|
+
},
|
|
159
|
+
"locus-service-http": {
|
|
160
|
+
"kind": "http",
|
|
161
|
+
"publication": "internal",
|
|
162
|
+
"source_kind": "external",
|
|
163
|
+
"source": "Locus service REST API (catalog service 'locus' and the URLs carried in Locus DTOs)",
|
|
164
|
+
"summary": "Consumed, not served. Calls POST loci/call and GET loci on service locus; POST <locus.url>/participant; PUT <locus.url>/participant/alert and /participant/decline; GET <locus.url>; GET <locus.syncUrl>; PUT <locus.self.url>/leave and /media; POST <locus.self.url>/sendDtmf; PUT <share.url> with a floor body. Request bodies are listed under Protocol and wire format in src/docs/README.md."
|
|
165
|
+
},
|
|
166
|
+
"janus-history-http": {
|
|
167
|
+
"kind": "http",
|
|
168
|
+
"publication": "internal",
|
|
169
|
+
"source_kind": "external",
|
|
170
|
+
"source": "Janus service REST API (catalog service 'janus')",
|
|
171
|
+
"summary": "Consumed, not served. getCallHistory calls GET history/userSessions on service janus with query from set to an ISO-8601 timestamp."
|
|
172
|
+
},
|
|
173
|
+
"webex-core-plugin-host": {
|
|
174
|
+
"kind": "rpc",
|
|
175
|
+
"publication": "internal",
|
|
176
|
+
"source_kind": "external",
|
|
177
|
+
"source": "@webex/webex-core (WebexPlugin, registerInternalPlugin, WebexHttpError)",
|
|
178
|
+
"summary": "Host contract consumed by Locus: WebexPlugin.extend supplies this.webex and request(), which delegates to webex.request; registerInternalPlugin installs the plugin; WebexHttpError.Conflict is the 409 subtype built by the sibling http-core makeSubTypes and is checked in decline and leave."
|
|
179
|
+
},
|
|
180
|
+
"webex-device-registration": {
|
|
181
|
+
"kind": "sdk",
|
|
182
|
+
"publication": "internal",
|
|
183
|
+
"source_kind": "external",
|
|
184
|
+
"source": "@webex/internal-plugin-device (webex.internal.device)",
|
|
185
|
+
"summary": "Locus reads webex.internal.device.url as the deviceUrl in request bodies. The device plugin is not a declared dependency of this package; it is registered transitively because src/index.js imports @webex/internal-plugin-mercury, whose index imports the device plugin."
|
|
186
|
+
},
|
|
187
|
+
"mercury-sdk": {
|
|
188
|
+
"kind": "sdk",
|
|
189
|
+
"publication": "published",
|
|
190
|
+
"source_kind": "external",
|
|
191
|
+
"source": "@webex/internal-plugin-mercury (packages/@webex/internal-plugin-mercury/src/docs/README.md)",
|
|
192
|
+
"summary": "Imported only for its registration side effect in src/index.js. Locus calls no Mercury method and subscribes to no Mercury event. Owned and specified by @webex/internal-plugin-mercury."
|
|
193
|
+
},
|
|
194
|
+
"lodash": {
|
|
195
|
+
"kind": "sdk",
|
|
196
|
+
"publication": "published",
|
|
197
|
+
"source_kind": "external",
|
|
198
|
+
"source": "lodash@^4.17.21 (npm)",
|
|
199
|
+
"summary": "src/locus.js imports cloneDeep (merge), difference, first, last, and memoize (compareSequence)."
|
|
200
|
+
},
|
|
201
|
+
"uuid": {
|
|
202
|
+
"kind": "sdk",
|
|
203
|
+
"publication": "published",
|
|
204
|
+
"source_kind": "external",
|
|
205
|
+
"source": "uuid@^3.3.2 (npm)",
|
|
206
|
+
"summary": "uuid.v4 generates the dtmf.correlationId in sendDtmf."
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"spec_policy": {
|
|
211
|
+
"require_what_and_why": true,
|
|
212
|
+
"require_provenance": true,
|
|
213
|
+
"protected_specs": [
|
|
214
|
+
"src/docs/README.md"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"validation": {
|
|
218
|
+
"generator_runtime": "claude-cowork",
|
|
219
|
+
"generator_model": "claude-opus-5-5",
|
|
220
|
+
"generator_runtime_source": "host-metadata",
|
|
221
|
+
"generator_run_id": "spark-853128-sdd-stage0-2026-10-09",
|
|
222
|
+
"minimum_independence": "different-runtime",
|
|
223
|
+
"runtime_fallback_tier": "different-runtime",
|
|
224
|
+
"blocking_severities": [
|
|
225
|
+
"Blocking"
|
|
226
|
+
],
|
|
227
|
+
"base_ref": "next",
|
|
228
|
+
"head_ref": "LOCUS_WEBEX_INTERNAL_PLUGIN_SDD",
|
|
229
|
+
"validator_runtime": "current-session",
|
|
230
|
+
"validator_runtime_source": "invocation-input",
|
|
231
|
+
"validator_run_id": "01a1cf57-d89e-7bc0-9a6a-d3345c695e50",
|
|
232
|
+
"source_commit": "8cae6c46ec329bc0b2666cc9d1d5ab657d018db3"
|
|
233
|
+
},
|
|
234
|
+
"layout": {
|
|
235
|
+
"sdd_root": ".sdd",
|
|
236
|
+
"docs_root": "docs",
|
|
237
|
+
"agent_entry_path": "AGENTS.md",
|
|
238
|
+
"standing_docs_root": "docs",
|
|
239
|
+
"spec_index_path": "docs/specs/README.md",
|
|
240
|
+
"module_docs_strategy": "source-local",
|
|
241
|
+
"module_docs_relative_path": "docs/README.md",
|
|
242
|
+
"module_docs_decision": {
|
|
243
|
+
"basis": "repo-standards-default",
|
|
244
|
+
"reason": "No module-local documentation existed. The source-local default gives src/docs/README.md. test:style runs eslint ./src/**/*.* and build:src processes -js -ts only, so Markdown under src/ does not enter the build output, and eslint reports it as ignored.",
|
|
245
|
+
"decided_by": "akulakum@cisco.com (bootstrap questionnaire)",
|
|
246
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
247
|
+
},
|
|
248
|
+
"repo_context_decision": {
|
|
249
|
+
"path": ".repo-context.json",
|
|
250
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
251
|
+
"action": "create",
|
|
252
|
+
"schema_action": "create",
|
|
253
|
+
"reason": "Neither the operational context nor its schema existed in this package. The context is created from package evidence and the schema is copied from packages/@webex/common/schemas/repo-context.schema.json (Repo Standards 0.3.0).",
|
|
254
|
+
"decided_by": "akulakum@cisco.com (bootstrap questionnaire)",
|
|
255
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
256
|
+
},
|
|
257
|
+
"artifact_decisions": [
|
|
258
|
+
{
|
|
259
|
+
"path": "docs/service.md",
|
|
260
|
+
"action": "omit",
|
|
261
|
+
"reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
|
|
262
|
+
"decided_by": "claude-cowork (code evidence)",
|
|
263
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"path": "mkdocs.yml",
|
|
267
|
+
"action": "omit",
|
|
268
|
+
"reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
|
|
269
|
+
"decided_by": "akulakum@cisco.com (bootstrap questionnaire)",
|
|
270
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"path": "api-specs/openapi.yaml",
|
|
274
|
+
"action": "omit",
|
|
275
|
+
"reason": "The package serves no HTTP routes. It is a client of the Locus and Janus services, recorded as the external internal-publication contracts locus-service-http and janus-history-http; its published surface is the npm export described by locus-sdk.",
|
|
276
|
+
"decided_by": "claude-cowork (code evidence)",
|
|
277
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"path": "SECURITY.md",
|
|
281
|
+
"action": "omit",
|
|
282
|
+
"reason": "No package-level security policy exists. The workspace root SECURITY.md is not overwritten and a per-package copy would duplicate it.",
|
|
283
|
+
"decided_by": "akulakum@cisco.com (bootstrap questionnaire)",
|
|
284
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"path": "CONTRIBUTING.md",
|
|
288
|
+
"action": "omit",
|
|
289
|
+
"reason": "Contribution instructions are owned at the workspace root and linked from this package README.md.",
|
|
290
|
+
"decided_by": "akulakum@cisco.com (bootstrap questionnaire)",
|
|
291
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"path": "CHANGELOG.md",
|
|
295
|
+
"action": "omit",
|
|
296
|
+
"reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
|
|
297
|
+
"decided_by": "akulakum@cisco.com (bootstrap questionnaire)",
|
|
298
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"path": "CTO_CHECKLIST.yml",
|
|
302
|
+
"action": "omit",
|
|
303
|
+
"reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
|
|
304
|
+
"decided_by": "claude-cowork (code evidence)",
|
|
305
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
309
|
+
"action": "omit",
|
|
310
|
+
"reason": "Omitted together with CTO_CHECKLIST.yml.",
|
|
311
|
+
"decided_by": "claude-cowork (code evidence)",
|
|
312
|
+
"decided_at": "2026-10-09T06:22:13Z"
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
"template_roots": {
|
|
316
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
317
|
+
},
|
|
318
|
+
"repo_skills_root": ".sdd/skills",
|
|
319
|
+
"contract_index_path": "docs/architecture.md",
|
|
320
|
+
"monorepo_package": {
|
|
321
|
+
"package_path": "packages/@webex/internal-plugin-locus",
|
|
322
|
+
"root_manifest_path": "../../../.sdd/manifest.json",
|
|
323
|
+
"templates_root_path": "../../../.sdd/templates/repo-standards"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"coverage_ratchet": {
|
|
327
|
+
"enabled": true,
|
|
328
|
+
"waivers": []
|
|
329
|
+
},
|
|
330
|
+
"substrate": {
|
|
331
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
332
|
+
"consumed": [
|
|
333
|
+
"@webex/eslint-config-legacy via .eslintrc.js",
|
|
334
|
+
"@webex/babel-config-legacy via babel.config.js",
|
|
335
|
+
"@webex/jest-config-legacy via jest.config.js",
|
|
336
|
+
"@webex/legacy-tools build and test runner via package.json",
|
|
337
|
+
"package README.md",
|
|
338
|
+
"Repo Standards 0.3.0 templates at the monorepo root .sdd/templates/repo-standards, referred to through layout.monorepo_package.templates_root_path; the package holds no templates"
|
|
339
|
+
],
|
|
340
|
+
"compliance_tier": "baseline"
|
|
341
|
+
},
|
|
342
|
+
"section_profiles": {
|
|
343
|
+
"repo": {
|
|
344
|
+
"owns_datastore": false,
|
|
345
|
+
"holds_client_state": false,
|
|
346
|
+
"components_interact": false,
|
|
347
|
+
"domain_data_across_components": false,
|
|
348
|
+
"caches_data": false,
|
|
349
|
+
"observability_convention": false,
|
|
350
|
+
"deploys_to_infra": false,
|
|
351
|
+
"shared_base_libs": true,
|
|
352
|
+
"is_monorepo": false,
|
|
353
|
+
"multi_platform": false,
|
|
354
|
+
"published_package": true,
|
|
355
|
+
"embedded_in_host": false,
|
|
356
|
+
"cross_repo_deps_material": true,
|
|
357
|
+
"security_arch_warranted": true,
|
|
358
|
+
"exposes_commands_or_artifacts": true
|
|
359
|
+
},
|
|
360
|
+
"resolved_by": "claude-cowork (code evidence; bootstrap questionnaire)",
|
|
361
|
+
"resolved_at": "2026-10-09T06:22:13Z"
|
|
362
|
+
},
|
|
363
|
+
"tooling": {
|
|
364
|
+
"sdlc_skills": {
|
|
365
|
+
"source_ref": "repo-annotation@2.3.1"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: agent-entry
|
|
3
|
+
generated_from: agents@0.3.0
|
|
4
|
+
generated_by: claude-cowork
|
|
5
|
+
approved_by: akulakum@cisco.com
|
|
6
|
+
updated_at: 2026-11-12T10:59:20Z
|
|
7
|
+
validation_status: pass-with-warnings
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
Package-scoped SDD entry for `@webex/internal-plugin-locus`, the plugin that wraps the Locus call
|
|
13
|
+
and meeting state service for the Webex JS SDK. This file orients agents. The monorepo root
|
|
14
|
+
`AGENTS.md` governs workspace-wide setup.
|
|
15
|
+
|
|
16
|
+
## Working Method
|
|
17
|
+
|
|
18
|
+
- Read the relevant package files before editing. Do not edit blind.
|
|
19
|
+
- Understand the task and affected surfaces before writing code.
|
|
20
|
+
- Prefer focused edits over rewriting whole files.
|
|
21
|
+
- Do not invent commands, paths, exports, request bodies, or sequence rules. Verify them from this
|
|
22
|
+
package's source and tests.
|
|
23
|
+
- Test or validate before declaring done.
|
|
24
|
+
- Keep output concise. If something is uncertain, say so instead of guessing.
|
|
25
|
+
|
|
26
|
+
## Canonical Repository Documentation
|
|
27
|
+
|
|
28
|
+
Before changing code or documentation, start with:
|
|
29
|
+
|
|
30
|
+
- [`docs/index.md`](docs/index.md) for package documentation navigation;
|
|
31
|
+
- [`docs/architecture.md`](docs/architecture.md) for package boundaries and interactions;
|
|
32
|
+
- [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
|
|
33
|
+
- the module specification at [`src/docs/README.md`](src/docs/README.md) (Locus plugin); and
|
|
34
|
+
- [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
|
|
35
|
+
|
|
36
|
+
Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
|
|
37
|
+
publishes an SDK surface, so its contract artifact is `package.json` plus the `src/index.js` barrel.
|
|
38
|
+
It calls the Locus and Janus HTTP APIs but serves none, so no OpenAPI applies.
|
|
39
|
+
|
|
40
|
+
## 1. Commands (Run First)
|
|
41
|
+
|
|
42
|
+
Use only documented commands. Do not invent alternatives when a command is missing. Run workspace
|
|
43
|
+
commands from the monorepo root.
|
|
44
|
+
|
|
45
|
+
| Task | Command |
|
|
46
|
+
| ---------------------- | ------- |
|
|
47
|
+
| Install dependencies | `yarn install` (workspace root) |
|
|
48
|
+
| Start dev environment | N/A — library package with no start script in `package.json` |
|
|
49
|
+
| Run tests | `yarn workspace @webex/internal-plugin-locus test:unit` (Jest); `test:browser` exists but runs nothing in this package (see below) |
|
|
50
|
+
| Run linters | `yarn workspace @webex/internal-plugin-locus test:style` |
|
|
51
|
+
| Build/release artifact | `yarn workspace @webex/internal-plugin-locus build` (runs `build:src`) |
|
|
52
|
+
| Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
|
|
53
|
+
|
|
54
|
+
The `package.json` script `test` chains `test:style`, `test:unit`, `test:integration`, and
|
|
55
|
+
`test:browser`. `test:integration` is not defined, so that aggregate script is not a verification
|
|
56
|
+
command. `test:browser` invokes the karma integration runner, but this package has no integration
|
|
57
|
+
specs, so it collects no files and starts no browser.
|
|
58
|
+
|
|
59
|
+
If a required command is unknown, stop and ask for the exact command.
|
|
60
|
+
|
|
61
|
+
## 2. Agent Persona and Scope
|
|
62
|
+
|
|
63
|
+
You are the Webex web SDK engineering assistant for `@webex/internal-plugin-locus`.
|
|
64
|
+
|
|
65
|
+
Primary outcomes:
|
|
66
|
+
|
|
67
|
+
- Deliver production-safe changes with unit tests and lint passing.
|
|
68
|
+
- Preserve existing behavior unless a change request explicitly requires a behavior change.
|
|
69
|
+
- Keep docs and configuration aligned with code changes.
|
|
70
|
+
|
|
71
|
+
Definition of done:
|
|
72
|
+
|
|
73
|
+
1. Requested change is implemented.
|
|
74
|
+
2. Relevant tests, lint, and build checks pass locally.
|
|
75
|
+
3. Updated docs cover new behavior, including the module spec.
|
|
76
|
+
4. PR summary includes risks and rollback notes.
|
|
77
|
+
|
|
78
|
+
## 3. Repository Knowledge
|
|
79
|
+
|
|
80
|
+
### Tech Stack
|
|
81
|
+
|
|
82
|
+
| Area | Tooling | Version |
|
|
83
|
+
| ---------------- | ------- | ------- |
|
|
84
|
+
| Language runtime | node | 22.14 for development (workspace root `AGENTS.md` and `.nvmrc`; the root `package.json` `engines.node` still declares `18.x`); `>=18` for consumers (`package.json` engines) |
|
|
85
|
+
| Build tool | `@webex/legacy-tools` over babel | `@babel/core` version in `package.json` `devDependencies` |
|
|
86
|
+
| Test framework | Jest via `webex-legacy-tools` (`test:unit`); karma via `test:browser`; chai and `@webex/test-helper-mock-webex` | workspace versions |
|
|
87
|
+
| Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint and prettier versions in `package.json` `devDependencies` |
|
|
88
|
+
|
|
89
|
+
### Project Map
|
|
90
|
+
|
|
91
|
+
- `src/index.js`: imports the Mercury plugin, registers internal plugin `locus`, and re-exports
|
|
92
|
+
`Locus`, `eventKeys`, and seven sequence constants.
|
|
93
|
+
- `src/locus.js`: the `Locus` plugin. Spec: `src/docs/README.md`.
|
|
94
|
+
- `src/event-keys.js`: a fixed list of 17 Locus event names (not exhaustive).
|
|
95
|
+
- `test/unit/spec/locus.js`: the only unit spec; it expands the JSON fixtures into test cases.
|
|
96
|
+
- `test/unit/lib/BasicSeqCmp.json` and `test/unit/lib/SeqCmp.json`: sequence fixtures.
|
|
97
|
+
- Build output from `build:src`: generated. Never edit by hand.
|
|
98
|
+
- `README.md`: retained product readme. It is not the behavioral authority.
|
|
99
|
+
|
|
100
|
+
### Critical Constraints
|
|
101
|
+
|
|
102
|
+
- The sequence comparison must keep every fixture result in `test/unit/lib`; callers decide whether
|
|
103
|
+
to apply, ignore, or fetch a Locus from it.
|
|
104
|
+
- `compare` and `merge` are pure. Do not add plugin state.
|
|
105
|
+
- Request bodies carry the device URL and the caller's sequence as the module spec invariant
|
|
106
|
+
`INV-007` lists; this package does not import the device plugin, and the Mercury import registers
|
|
107
|
+
it transitively.
|
|
108
|
+
- `localSdp` is sent as a JSON string, not an object.
|
|
109
|
+
- Known defects, such as `merge` throwing on a delta without `participants`, are recorded in the
|
|
110
|
+
module spec Pitfalls. Fix them only in a dedicated change with a test.
|
|
111
|
+
|
|
112
|
+
## 4. Testing Workflow
|
|
113
|
+
|
|
114
|
+
Run checks in this order:
|
|
115
|
+
|
|
116
|
+
1. `yarn workspace @webex/internal-plugin-locus build`. The unit spec imports this package by
|
|
117
|
+
name, which resolves to the build output (`package.json` `main`), so rebuild after any `src/`
|
|
118
|
+
change.
|
|
119
|
+
2. `yarn workspace @webex/internal-plugin-locus test:unit`
|
|
120
|
+
3. `yarn workspace @webex/internal-plugin-locus test:style`
|
|
121
|
+
|
|
122
|
+
The browser run is recorded in `.sdd/manifest.json` as `commands.browser-test` (role `other`), not
|
|
123
|
+
under `tests`, because the SDD manifest `tests` schema allows only `unit`, `integration`, `e2e`, and
|
|
124
|
+
`qa`. No `integration` tier is recorded because `package.json` defines no integration command and
|
|
125
|
+
no integration specs exist.
|
|
126
|
+
|
|
127
|
+
Testing rules:
|
|
128
|
+
|
|
129
|
+
- Add or update unit cases for every behavior change.
|
|
130
|
+
- Add sequencing cases as fixture entries in `test/unit/lib`, not as hand-written assertions.
|
|
131
|
+
- Cover failure paths and edge cases, not only happy paths.
|
|
132
|
+
- Do not remove tests to make CI pass.
|
|
133
|
+
|
|
134
|
+
No coverage gate applies to this package; do not infer one.
|
|
135
|
+
|
|
136
|
+
## 5. Code Style and Patterns
|
|
137
|
+
|
|
138
|
+
Coding expectations:
|
|
139
|
+
|
|
140
|
+
- Follow repository style rules and static analysis output. The local `.eslintrc.js` sets `root: true`.
|
|
141
|
+
- Prefer small functions over large procedural blocks.
|
|
142
|
+
- Keep REST wrappers thin: build the request, call `this.request`, resolve the body.
|
|
143
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
144
|
+
|
|
145
|
+
Pattern example:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
Preferred:
|
|
149
|
+
- Resolve res.body or the documented field from a REST wrapper.
|
|
150
|
+
- Recover a `WebexHttpError.Conflict` by returning the result of `get(locus)` only where decline and leave
|
|
151
|
+
already do.
|
|
152
|
+
|
|
153
|
+
Avoid:
|
|
154
|
+
- Returning the raw response, as sendDtmf does.
|
|
155
|
+
- Treating README.md as the method list.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## 6. Git Workflow
|
|
159
|
+
|
|
160
|
+
- Branch naming: no convention is defined in this package or in the workspace `CONTRIBUTING.md`.
|
|
161
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
|
|
162
|
+
the workspace `CONTRIBUTING.md` requires for pull requests.
|
|
163
|
+
- Keep commits focused and reversible.
|
|
164
|
+
|
|
165
|
+
PR checklist:
|
|
166
|
+
|
|
167
|
+
- What changed and why.
|
|
168
|
+
- Tests run and results.
|
|
169
|
+
- Risk and impact, including callers that apply Locus DTOs and internal-plugin-lyra.
|
|
170
|
+
- Rollback approach.
|
|
171
|
+
|
|
172
|
+
## 7. Boundaries and Escalation
|
|
173
|
+
|
|
174
|
+
### Always
|
|
175
|
+
|
|
176
|
+
- Prefer existing patterns over introducing new architecture.
|
|
177
|
+
- Keep changes minimal for the requested scope.
|
|
178
|
+
- Call out assumptions and unknowns explicitly.
|
|
179
|
+
- Update the module spec in the same change that alters observable behavior.
|
|
180
|
+
|
|
181
|
+
### Ask First
|
|
182
|
+
|
|
183
|
+
- Adding dependencies, including declaring the device plugin.
|
|
184
|
+
- Changing a sequence comparison branch, a constant value, or a request body.
|
|
185
|
+
- Changing an export, the plugin name, or `eventKeys`.
|
|
186
|
+
- Changing how a 409 Conflict is handled.
|
|
187
|
+
|
|
188
|
+
### Never
|
|
189
|
+
|
|
190
|
+
- Edit build output by hand.
|
|
191
|
+
- Commit secrets, tokens, or credentials, including in test fixtures.
|
|
192
|
+
- Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
|
|
193
|
+
templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
|
|
194
|
+
`.sdd/manifest.json` refers to them.
|
package/dist/locus.js
CHANGED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ADR
|
|
3
|
+
title: ADR-0001 - Retain the product README
|
|
4
|
+
description: Stage 0 keeps README.md as product documentation and does not route it as a spec source.
|
|
5
|
+
tags: [adr]
|
|
6
|
+
timestamp: 2026-10-09T00:00:00Z
|
|
7
|
+
status: accepted
|
|
8
|
+
---
|
|
9
|
+
<!-- sdd-generated-metadata
|
|
10
|
+
doc_kind: standing-doc
|
|
11
|
+
generated_from: adr@0.3.0
|
|
12
|
+
generated_by: claude-cowork
|
|
13
|
+
approved_by: akulakum@cisco.com
|
|
14
|
+
updated_at: 2026-11-12T10:59:20Z
|
|
15
|
+
validation_status: pass-with-warnings
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
# ADR-0001 - Retain the product README
|
|
19
|
+
|
|
20
|
+
| Field | Value |
|
|
21
|
+
| ------------- | ----- |
|
|
22
|
+
| Status | Accepted |
|
|
23
|
+
| Decision date | 2026-10-09 |
|
|
24
|
+
| Deciders | akulakum@cisco.com (bootstrap questionnaire, SPARK-853128) |
|
|
25
|
+
| Supersedes | N/A |
|
|
26
|
+
| Superseded by | N/A |
|
|
27
|
+
|
|
28
|
+
## Context
|
|
29
|
+
|
|
30
|
+
Stage 0 found one existing document, `README.md`. It is the npm usage page. It names the package as
|
|
31
|
+
the plugin for the Locus service, warns that internal plugins do not strictly follow semantic
|
|
32
|
+
versioning, shows the install command, and shows a usage block that imports the package and
|
|
33
|
+
`@webex/webex-core` and then reads `webex.internal.locus.WHATEVER`.
|
|
34
|
+
|
|
35
|
+
The implementation in `src/` has eighteen plugin methods (two marked private in JSDoc), seven
|
|
36
|
+
exported constants, the
|
|
37
|
+
`eventKeys` list, the sequence comparison algorithm, delta merge, and the Conflict recovery. The
|
|
38
|
+
README describes none of them, and its usage line is a placeholder rather than a real API. No other
|
|
39
|
+
intent, design, or AI-authored spec exists in this package.
|
|
40
|
+
|
|
41
|
+
## Decision
|
|
42
|
+
|
|
43
|
+
Keep `README.md` unchanged. Do not migrate it into the module specification. Record
|
|
44
|
+
`spec_source_policy.mode` as `keep-separate` with `migrated_source_disposition` `retain` and an
|
|
45
|
+
empty `spec_sources` list.
|
|
46
|
+
|
|
47
|
+
The canonical behavior is `src/` plus `test/`. Where the README is incomplete, code wins.
|
|
48
|
+
|
|
49
|
+
## Why
|
|
50
|
+
|
|
51
|
+
The README is the npm-facing page. Rewriting it is a product-doc change, not a requirement of making
|
|
52
|
+
the package SDD-ready. What it does state (the package name, internal status, install, and import)
|
|
53
|
+
agrees with `package.json` and `src/index.js`, and it states no behavior that could conflict with
|
|
54
|
+
the module specification.
|
|
55
|
+
|
|
56
|
+
## Alternatives considered
|
|
57
|
+
|
|
58
|
+
| Alternative | Why it was not selected |
|
|
59
|
+
| ----------- | ----------------------- |
|
|
60
|
+
| Migrate the README into `src/docs/README.md` and delete it | The page is retained product documentation, and deletion was not requested |
|
|
61
|
+
| Expand the README during Stage 0 | Stage 0 writes the SDD tree only and does not edit `README.md` |
|
|
62
|
+
|
|
63
|
+
## Consequences
|
|
64
|
+
|
|
65
|
+
**Positive:**
|
|
66
|
+
|
|
67
|
+
- The npm page stays stable for consumers.
|
|
68
|
+
- The module specification is the single behavioral reference.
|
|
69
|
+
|
|
70
|
+
**Negative / tradeoffs:**
|
|
71
|
+
|
|
72
|
+
- Agents must not treat `README.md` usage text as the method list.
|
|
73
|
+
- README improvements remain a separate product-doc change.
|
|
74
|
+
|
|
75
|
+
## Constraint on future changes
|
|
76
|
+
|
|
77
|
+
Do not delete `README.md` as part of spec maintenance. If its usage text changes, keep the module
|
|
78
|
+
specification aligned with code rather than with the README.
|
|
79
|
+
|
|
80
|
+
## Follow-up
|
|
81
|
+
|
|
82
|
+
- [ ] None required for Stage 0.
|
|
83
|
+
|
|
84
|
+
## Revisit when
|
|
85
|
+
|
|
86
|
+
- A maintainer chooses to document real methods on the npm page.
|
|
87
|
+
|
|
88
|
+
## References
|
|
89
|
+
|
|
90
|
+
- `README.md`
|
|
91
|
+
- `src/index.js`
|
|
92
|
+
- `src/locus.js`
|
|
93
|
+
- `.sdd/manifest.json` `spec_source_policy`
|