@webex/internal-plugin-dss 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.
@@ -0,0 +1,444 @@
1
+ {
2
+ "$schema": "./schemas/repo-context.schema.json",
3
+ "version": 1,
4
+ "repository": {
5
+ "name": "@webex/internal-plugin-dss",
6
+ "purpose": "Internal plugin registered as webex.internal.dss for the Directory Search Service (DSS). register() connects the shared mercury socket and listens for directory lookup and search events; lookupDetail, lookup, lookupByEmail, lookupByPhoneNumbers, search, and searchPlaces POST a query with a generated requestId to the directorySearch service, then collect the sequenced result pages that arrive over mercury until the finished page, rejecting with DssTimeoutError when no page arrives within requestTimeout. lookup is batched per resource through a webex-core Batcher by default. It stores nothing."
7
+ },
8
+ "commands": {
9
+ "install": "yarn",
10
+ "compile": "yarn workspace @webex/internal-plugin-dss build",
11
+ "build": "yarn workspace @webex/internal-plugin-dss build:src",
12
+ "unit-test": "yarn workspace @webex/internal-plugin-dss test:unit",
13
+ "lint": "yarn workspace @webex/internal-plugin-dss test:style",
14
+ "deploy": "yarn workspace @webex/internal-plugin-dss deploy:npm"
15
+ },
16
+ "public_interfaces": [
17
+ {
18
+ "name": "@webex/internal-plugin-dss package entry",
19
+ "kind": "package_export",
20
+ "source": "src/index.ts",
21
+ "entrypoints": [
22
+ "import '@webex/internal-plugin-dss'",
23
+ "import DSS from '@webex/internal-plugin-dss'"
24
+ ],
25
+ "audience": "first-party Webex clients",
26
+ "notes": "Importing the package registers DSS as internal plugin 'dss' with config {dss: {requestTimeout: 6000, batcherWait: 50, batcherMaxCalls: 50, batcherMaxWait: 150}}; the first registration of the name wins. The default export is the only export; constants, types, and DssTimeoutError are reachable only by deep src paths."
27
+ },
28
+ {
29
+ "name": "webex.internal.dss methods and events",
30
+ "kind": "plugin_api",
31
+ "source": "src/dss.ts",
32
+ "entrypoints": [
33
+ "webex.internal.dss.register()",
34
+ "webex.internal.dss.unregister()",
35
+ "webex.internal.dss.lookupDetail({id})",
36
+ "webex.internal.dss.lookup({id, entityProviderType, shouldBatch})",
37
+ "webex.internal.dss.lookupByEmail({email})",
38
+ "webex.internal.dss.lookupByPhoneNumbers(phoneNumbers)",
39
+ "webex.internal.dss.search(options)",
40
+ "webex.internal.dss.searchPlaces(options)"
41
+ ],
42
+ "audience": "first-party Webex clients",
43
+ "notes": "Results arrive over mercury only after register(). lookupDetail, lookup, and lookupByEmail resolve one entity or null; lookupByPhoneNumbers and searchPlaces resolve {resultArray, ...}; search resolves an array. Silence for requestTimeout rejects with DssTimeoutError. Events: dss:registered, dss:unregistered, dss:lookup.result."
44
+ },
45
+ {
46
+ "name": "package scripts",
47
+ "kind": "npm_scripts",
48
+ "source": "package.json",
49
+ "entrypoints": [
50
+ "build",
51
+ "build:src",
52
+ "test:style",
53
+ "test:unit",
54
+ "test:browser",
55
+ "test",
56
+ "deploy:npm"
57
+ ],
58
+ "audience": "contributors and CI",
59
+ "notes": "build runs build:src, which writes dist. test chains test:integration, which is not defined; test:browser runs test/integration/spec/dss.js through karma but currently bundles nothing and reports 0 tests, so use test:unit and test:style."
60
+ }
61
+ ],
62
+ "source_of_truth": [
63
+ {
64
+ "surface": "DSS plugin implementation",
65
+ "paths": [
66
+ "src/index.ts",
67
+ "src/dss.ts",
68
+ "src/dss-batcher.ts",
69
+ "src/dss-errors.ts",
70
+ "src/constants.ts",
71
+ "src/types.ts",
72
+ "src/config.ts"
73
+ ],
74
+ "generated_artifacts": [
75
+ "dist"
76
+ ],
77
+ "refresh_with": [
78
+ "yarn workspace @webex/internal-plugin-dss build:src"
79
+ ],
80
+ "validate_with": [
81
+ "yarn workspace @webex/internal-plugin-dss test:unit",
82
+ "yarn workspace @webex/internal-plugin-dss test:style"
83
+ ]
84
+ },
85
+ {
86
+ "surface": "module specification",
87
+ "paths": [
88
+ "src/docs/README.md"
89
+ ],
90
+ "generated_artifacts": [],
91
+ "refresh_with": [
92
+ "update alongside the behavior change in the same commit"
93
+ ],
94
+ "validate_with": [
95
+ "spec-validator on an independent runtime"
96
+ ]
97
+ }
98
+ ],
99
+ "generated_artifacts": [
100
+ {
101
+ "path": "dist",
102
+ "generated_from": "src",
103
+ "refresh_with": "yarn workspace @webex/internal-plugin-dss build:src"
104
+ },
105
+ {
106
+ "path": "../../../.sdd/templates/repo-standards/template-map.json",
107
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
108
+ "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."
109
+ }
110
+ ],
111
+ "validation_matrix": [
112
+ {
113
+ "paths": [
114
+ "src/**"
115
+ ],
116
+ "minimum": [
117
+ "yarn workspace @webex/internal-plugin-dss build:src",
118
+ "yarn workspace @webex/internal-plugin-dss test:unit"
119
+ ],
120
+ "recommended": [
121
+ "yarn workspace @webex/internal-plugin-dss test:style"
122
+ ]
123
+ },
124
+ {
125
+ "paths": [
126
+ "src/constants.ts",
127
+ "src/types.ts",
128
+ "src/index.ts",
129
+ "src/config.ts"
130
+ ],
131
+ "minimum": [
132
+ "yarn workspace @webex/internal-plugin-dss build:src",
133
+ "yarn workspace @webex/internal-plugin-dss test:unit"
134
+ ],
135
+ "recommended": [
136
+ "review first-party clients that call webex.internal.dss when a method, event name, result path, default, or the registered name changes; inside this repository only packages/webex/src/webex.js loads the plugin, and it calls no method"
137
+ ]
138
+ }
139
+ ],
140
+ "change_impact": [
141
+ {
142
+ "paths": [
143
+ "src/dss.ts"
144
+ ],
145
+ "affects": [
146
+ "registration and the mercury listeners",
147
+ "each query's resource path, body, and resolved value",
148
+ "page assembly and the inactivity timeout",
149
+ "lookup batching"
150
+ ],
151
+ "refresh_with": [
152
+ "yarn workspace @webex/internal-plugin-dss build:src"
153
+ ],
154
+ "validate_with": [
155
+ "yarn workspace @webex/internal-plugin-dss test:unit"
156
+ ],
157
+ "avoid_direct_edits": [
158
+ "dist"
159
+ ],
160
+ "notes": "Keep pages matched by requestId, ordered by sequence, and complete only with the finished page and every lower sequence."
161
+ },
162
+ {
163
+ "paths": [
164
+ "src/dss-batcher.ts",
165
+ "src/config.ts"
166
+ ],
167
+ "affects": [
168
+ "how lookup calls coalesce per resource",
169
+ "which callers resolve, resolve null, or reject per batch"
170
+ ],
171
+ "refresh_with": [
172
+ "yarn workspace @webex/internal-plugin-dss build:src"
173
+ ],
174
+ "validate_with": [
175
+ "yarn workspace @webex/internal-plugin-dss test:unit"
176
+ ],
177
+ "avoid_direct_edits": [
178
+ "dist"
179
+ ],
180
+ "notes": "The webex-core Batcher reads the three batcher limits from webex.config.dss once per batcher; cover changes in the batched lookup cases of test/unit/spec/dss.ts and in test/unit/spec/dss-batcher.ts."
181
+ },
182
+ {
183
+ "paths": [
184
+ "src/constants.ts",
185
+ "src/dss-errors.ts"
186
+ ],
187
+ "affects": [
188
+ "mercury and dss: event names, the service name, and result paths",
189
+ "the DssTimeoutError message that the unit tests match"
190
+ ],
191
+ "refresh_with": [
192
+ "yarn workspace @webex/internal-plugin-dss build:src"
193
+ ],
194
+ "validate_with": [
195
+ "yarn workspace @webex/internal-plugin-dss test:unit"
196
+ ],
197
+ "avoid_direct_edits": [
198
+ "dist"
199
+ ],
200
+ "notes": "A renamed result path or event name silently stops results from arriving; the query then times out."
201
+ }
202
+ ],
203
+ "evidence_rules": [
204
+ {
205
+ "claim_category": "command_name",
206
+ "sources": [
207
+ "package.json"
208
+ ],
209
+ "requirement": "The script must exist in package.json scripts.",
210
+ "notes": "test:integration does not exist, so the aggregate test script fails; test:browser currently verifies nothing."
211
+ },
212
+ {
213
+ "claim_category": "import_path",
214
+ "sources": [
215
+ "src/index.ts"
216
+ ],
217
+ "requirement": "A binding is public only if exported from src/index.ts.",
218
+ "notes": "The only export is the default DSS. Constants, types, DssBatcher, and DssTimeoutError are reachable only by deep src paths, which the unit specs use."
219
+ },
220
+ {
221
+ "claim_category": "behavior_claim",
222
+ "sources": [
223
+ "src",
224
+ "test/unit/spec"
225
+ ],
226
+ "requirement": "Ground every behavioral claim in source or test evidence.",
227
+ "notes": "Commit history is not an evidence source for this package. README.md is context only and partly stale (docs/adr/0001-retain-product-readme.md). The internal-plugin-mercury specification is stale on the session model and the internal-plugin-device specification is silent on orgId; use those packages' code."
228
+ }
229
+ ],
230
+ "negative_guidance": [
231
+ {
232
+ "rule": "Do not call lookup or lookupByEmail with arrays (ids or emails).",
233
+ "why": "Both take one value (src/types.ts); only the README shows arrays. Several ids coalesce through the batcher instead."
234
+ },
235
+ {
236
+ "rule": "Do not expect results without register().",
237
+ "why": "Results arrive over mercury, which register() connects and subscribes to; the HTTP response is never read."
238
+ },
239
+ {
240
+ "rule": "Do not read the webex.request response for results.",
241
+ "why": "The service delivers results as sequenced mercury pages matched by requestId."
242
+ },
243
+ {
244
+ "rule": "Do not log looked-up ids, emails, phone numbers, query strings, or entities.",
245
+ "why": "They are organization directory data; existing log lines carry only error messages and counts."
246
+ },
247
+ {
248
+ "rule": "Do not treat README.md as the signature or unregister reference.",
249
+ "why": "Several of its claims differ from code; see docs/adr/0001-retain-product-readme.md."
250
+ },
251
+ {
252
+ "rule": "Do not infer a coverage threshold for this package.",
253
+ "why": "The legacy Jest config sets no threshold and no coverage script exists."
254
+ }
255
+ ],
256
+ "confidence_policy": {
257
+ "high": {
258
+ "action": "update",
259
+ "expectation": "Source and unit test evidence both support the change, and the behavior has a case in test/unit/spec."
260
+ },
261
+ "medium": {
262
+ "action": "narrow-scope",
263
+ "expectation": "Only source evidence exists, for example registration through the entry, connect failure, webex.request failure, a batch timeout, or the searchPlaces result. Pin current behavior with a characterization test before modifying."
264
+ },
265
+ "low": {
266
+ "action": "noop",
267
+ "expectation": "Neither source nor tests settle the question. Stop and report the gap."
268
+ }
269
+ },
270
+ "repository_topology": {
271
+ "main_entrypoints": [
272
+ {
273
+ "name": "package entry",
274
+ "path": "src/index.ts",
275
+ "purpose": "Registers the dss plugin and default-exports the class",
276
+ "notes": "No subpath exports; package.json main is dist/index.js and devMain is src/index.ts."
277
+ }
278
+ ],
279
+ "workspace_packages": [
280
+ {
281
+ "name": "@webex/internal-plugin-dss",
282
+ "paths": [
283
+ "src",
284
+ "test"
285
+ ],
286
+ "notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
287
+ }
288
+ ],
289
+ "source_surfaces": [
290
+ {
291
+ "name": "DSS plugin",
292
+ "paths": [
293
+ "src"
294
+ ],
295
+ "notes": "index.ts, dss.ts, dss-batcher.ts, dss-errors.ts, constants.ts, types.ts, config.ts. Specified at src/docs/README.md."
296
+ },
297
+ {
298
+ "name": "tests",
299
+ "paths": [
300
+ "test/unit/spec",
301
+ "test/integration/spec"
302
+ ],
303
+ "notes": "Two unit specs run by Jest through webex-legacy-tools (61 cases, 1 skipped) and one MockWebex spec run only by test:browser."
304
+ }
305
+ ],
306
+ "generated_surfaces": [
307
+ {
308
+ "name": "build output",
309
+ "paths": [
310
+ "dist"
311
+ ],
312
+ "generated_from": "src",
313
+ "refresh_with": "yarn workspace @webex/internal-plugin-dss build:src",
314
+ "notes": "JavaScript and source maps from webex-legacy-tools; no type declarations. test/unit/spec/dss.ts imports it by package name. Do not edit by hand."
315
+ },
316
+ {
317
+ "name": "repo-standards template map",
318
+ "paths": [
319
+ "../../../.sdd/templates/repo-standards"
320
+ ],
321
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
322
+ "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.",
323
+ "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."
324
+ }
325
+ ],
326
+ "validation_entrypoints": [
327
+ {
328
+ "name": "unit tests",
329
+ "command": "yarn workspace @webex/internal-plugin-dss test:unit",
330
+ "scope": "test/unit/spec",
331
+ "notes": "jest via webex-legacy-tools --runner jest; run build:src first because the spec loads this package's dist."
332
+ },
333
+ {
334
+ "name": "compile",
335
+ "command": "yarn workspace @webex/internal-plugin-dss build",
336
+ "scope": "src",
337
+ "notes": "Runs build:src."
338
+ },
339
+ {
340
+ "name": "lint",
341
+ "command": "yarn workspace @webex/internal-plugin-dss test:style",
342
+ "scope": "src",
343
+ "notes": "eslint via the local .eslintrc.js with the shared TypeScript override; docs/** and *.md are ignored."
344
+ }
345
+ ],
346
+ "sync_paths": [
347
+ {
348
+ "source": "src/dss.ts",
349
+ "targets": [
350
+ "src/docs/README.md"
351
+ ],
352
+ "mechanism": "Manual; update the module specification in the same change that alters observable behavior.",
353
+ "notes": "Keep the resource, body, result-path, and timeout rows of the specification aligned with the code."
354
+ },
355
+ {
356
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
357
+ "targets": [
358
+ "../../../.sdd/templates/repo-standards"
359
+ ],
360
+ "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.",
361
+ "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."
362
+ }
363
+ ]
364
+ },
365
+ "folder_readme_contract": {
366
+ "required_sections": [
367
+ "purpose",
368
+ "boundaries",
369
+ "key-files",
370
+ "common-tasks"
371
+ ],
372
+ "rules": [
373
+ "Orient the reader before describing detail.",
374
+ "Link to the module specification rather than duplicating it."
375
+ ],
376
+ "example_policy": "Examples are allowed only when verified against src/ or test/.",
377
+ "fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
378
+ },
379
+ "regression_feedback_rules": [
380
+ {
381
+ "trigger": "A DSS resource path, request body field, or result path changes.",
382
+ "required_followups": [
383
+ "Add or update the matching case in test/unit/spec/dss.ts (the testMakeRequest assertions)",
384
+ "Update Protocol and wire format and the owning MOD row in src/docs/README.md"
385
+ ],
386
+ "notes": "The Directory Search Service parses these shapes, and a wrong result path makes queries time out."
387
+ },
388
+ {
389
+ "trigger": "Batching, the batcher defaults, or the found and not-found mapping changes.",
390
+ "required_followups": [
391
+ "Add or update a batched lookup case in test/unit/spec/dss.ts and the hook cases in test/unit/spec/dss-batcher.ts",
392
+ "Update MOD-009 in src/docs/README.md"
393
+ ],
394
+ "notes": "Each batched caller must still resolve its own entity or null."
395
+ }
396
+ ],
397
+ "surface_owners": [
398
+ {
399
+ "surface": "module implementation and specifications",
400
+ "owner": "@webex/web-sdk",
401
+ "edit_boundary": "Owner per the default rule of the monorepo .github/CODEOWNERS; the file has no line for packages/@webex/internal-plugin-dss."
402
+ }
403
+ ],
404
+ "do_not_edit": [
405
+ "dist",
406
+ "../../../.sdd/templates/repo-standards"
407
+ ],
408
+ "marker_scopes": {
409
+ "sdd": [
410
+ ".sdd/manifest.json",
411
+ "src/docs/README.md",
412
+ "docs"
413
+ ]
414
+ },
415
+ "fallback_rules": [
416
+ "When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
417
+ "When neither source nor tests settle a question, report it as a gap instead of inferring.",
418
+ "Commit history is not a valid rationale source for this package.",
419
+ "When a dependency's specification disagrees with that dependency's code, use the code and record the disagreement."
420
+ ],
421
+ "downstream_context_pack": {
422
+ "required_human_surfaces": [
423
+ "README.md",
424
+ "docs/index.md",
425
+ "docs/architecture.md",
426
+ "src/docs/README.md"
427
+ ],
428
+ "required_agent_operational_surfaces": [
429
+ "AGENTS.md",
430
+ "docs/specs/README.md"
431
+ ],
432
+ "required_machine_readable_surface": ".sdd/manifest.json",
433
+ "recommended_machine_readable_sections": [
434
+ "public_interfaces",
435
+ "change_impact",
436
+ "evidence_rules",
437
+ "negative_guidance",
438
+ "confidence_policy",
439
+ "repository_topology",
440
+ "folder_readme_contract",
441
+ "regression_feedback_rules"
442
+ ]
443
+ }
444
+ }