@webex/internal-plugin-dss 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 +445 -0
- package/.sdd/manifest.json +434 -0
- package/AGENTS.md +216 -0
- package/dist/dss.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +103 -0
- package/docs/adr/index.md +25 -0
- package/docs/architecture.md +275 -0
- package/docs/getting-started.md +126 -0
- package/docs/index.md +44 -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 +542 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/internal-plugin-dss",
|
|
5
|
+
"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.",
|
|
6
|
+
"category": "cat2-legacy",
|
|
7
|
+
"primary_languages": [
|
|
8
|
+
"typescript"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"topology": "Orchestrator-plus-components",
|
|
12
|
+
"commands": {
|
|
13
|
+
"install": {
|
|
14
|
+
"command": "yarn",
|
|
15
|
+
"source_file": "../../../.github/workflows/deploy.yml",
|
|
16
|
+
"role": "install"
|
|
17
|
+
},
|
|
18
|
+
"prebuild": {
|
|
19
|
+
"command": "yarn prebuild:modules",
|
|
20
|
+
"source_file": "../../../CONTRIBUTING.md",
|
|
21
|
+
"role": "other"
|
|
22
|
+
},
|
|
23
|
+
"compile": {
|
|
24
|
+
"command": "yarn workspace @webex/internal-plugin-dss build",
|
|
25
|
+
"source_file": "package.json",
|
|
26
|
+
"role": "compile",
|
|
27
|
+
"verified_at": "2026-11-12T10:08:50Z"
|
|
28
|
+
},
|
|
29
|
+
"build": {
|
|
30
|
+
"command": "yarn workspace @webex/internal-plugin-dss build:src",
|
|
31
|
+
"source_file": "../../../AGENTS.md",
|
|
32
|
+
"role": "package",
|
|
33
|
+
"verified_at": "2026-11-12T10:05:20Z"
|
|
34
|
+
},
|
|
35
|
+
"unit-test": {
|
|
36
|
+
"command": "yarn workspace @webex/internal-plugin-dss test:unit",
|
|
37
|
+
"source_file": "../../../AGENTS.md",
|
|
38
|
+
"role": "unit-test",
|
|
39
|
+
"verified_at": "2026-11-12T10:05:30Z"
|
|
40
|
+
},
|
|
41
|
+
"lint": {
|
|
42
|
+
"command": "yarn workspace @webex/internal-plugin-dss test:style",
|
|
43
|
+
"source_file": "package.json",
|
|
44
|
+
"role": "lint",
|
|
45
|
+
"verified_at": "2026-11-12T10:05:36Z"
|
|
46
|
+
},
|
|
47
|
+
"deploy": {
|
|
48
|
+
"command": "yarn workspace @webex/internal-plugin-dss deploy:npm",
|
|
49
|
+
"source_file": "package.json",
|
|
50
|
+
"role": "deploy"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"toolchain": [
|
|
54
|
+
{
|
|
55
|
+
"name": "node",
|
|
56
|
+
"version": ">=16",
|
|
57
|
+
"origin": "repo-config",
|
|
58
|
+
"source_file": "package.json"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "node",
|
|
62
|
+
"version": "22.14",
|
|
63
|
+
"origin": "repo-config",
|
|
64
|
+
"source_file": "../../../AGENTS.md"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "node",
|
|
68
|
+
"version": "lts/jod",
|
|
69
|
+
"origin": "repo-config",
|
|
70
|
+
"source_file": "../../../.nvmrc"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "node",
|
|
74
|
+
"version": "18.x",
|
|
75
|
+
"origin": "repo-config",
|
|
76
|
+
"source_file": "../../../package.json"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "yarn",
|
|
80
|
+
"version": "3.4.1",
|
|
81
|
+
"origin": "repo-config",
|
|
82
|
+
"source_file": "../../../package.json"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "babel",
|
|
86
|
+
"version": "^7.17.10",
|
|
87
|
+
"origin": "repo-config",
|
|
88
|
+
"source_file": "package.json"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "eslint",
|
|
92
|
+
"version": "^8.24.0",
|
|
93
|
+
"origin": "repo-config",
|
|
94
|
+
"source_file": "package.json"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "prettier",
|
|
98
|
+
"version": "^2.7.1",
|
|
99
|
+
"origin": "repo-config",
|
|
100
|
+
"source_file": "package.json"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "sinon",
|
|
104
|
+
"version": "^9.2.4",
|
|
105
|
+
"origin": "repo-config",
|
|
106
|
+
"source_file": "package.json"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"tests": {
|
|
110
|
+
"unit": {
|
|
111
|
+
"command_ref": "unit-test",
|
|
112
|
+
"dir": "test/unit/spec",
|
|
113
|
+
"framework": "jest"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"quality_gates": {
|
|
117
|
+
"code_coverage": {
|
|
118
|
+
"origin": "none",
|
|
119
|
+
"declared_by": "rarajes2@cisco.com via the approved bootstrap file-touch plan (generator check: test:unit runs webex-legacy-tools with --runner jest; jest.config.js re-exports @webex/jest-config-legacy, which sets no coverageThreshold; package.json defines no coverage script)"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"coverage_status_definitions": {
|
|
123
|
+
"specced": ">=80% public surface specced, drift <5% - spec is authoritative",
|
|
124
|
+
"partial": "40-80% specced - spec is a hint, cross-check code",
|
|
125
|
+
"untracked": "<40% specced - code is the source of truth"
|
|
126
|
+
},
|
|
127
|
+
"spec_source_policy": {
|
|
128
|
+
"mode": "keep-separate",
|
|
129
|
+
"migrated_source_disposition": "retain",
|
|
130
|
+
"disposition_decided_by": "rarajes2@cisco.com",
|
|
131
|
+
"disposition_decided_at": "2026-11-12T10:05:00Z",
|
|
132
|
+
"decided_by": "rarajes2@cisco.com",
|
|
133
|
+
"decided_at": "2026-11-12T10:05:00Z",
|
|
134
|
+
"decision_record": "docs/adr/0001-retain-product-readme.md"
|
|
135
|
+
},
|
|
136
|
+
"spec_sources": [
|
|
137
|
+
{
|
|
138
|
+
"path": "README.md",
|
|
139
|
+
"scope": "repo",
|
|
140
|
+
"role": "reference-only",
|
|
141
|
+
"canonical": false,
|
|
142
|
+
"use_by_agents": "context-only",
|
|
143
|
+
"post_migration_action": "retain",
|
|
144
|
+
"deletion_status": "not-applicable",
|
|
145
|
+
"notes": "npm usage page, kept unchanged under keep-separate. Partly stale: it shows lookup({ids: [...]}) and lookupByEmail({emails: [...]}) while the code takes one id or email, says unregister disconnects mercury (it only removes listeners), and omits lookupByPhoneNumbers, searchPlaces, shouldBatch, and the dss:* events; see docs/adr/0001-retain-product-readme.md."
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"modules": [
|
|
149
|
+
{
|
|
150
|
+
"path": "src",
|
|
151
|
+
"canonical_spec": "src/docs/README.md",
|
|
152
|
+
"coverage_status": "Partial",
|
|
153
|
+
"coverage_evidence": "Field coverage 93.3% (14/15) assessed 2026-11-12 by the generator; critical field coverage 8/8. The one WEAK field is test strategy: 61 unit cases in test/unit/spec/dss.ts and test/unit/spec/dss-batcher.ts (60 passed, 1 skipped) pass under Node 22.14 after build:src and cover register, unregister, every query method's resource and body, out-of-order and partial pages, the 6000 ms timeout message, the phone-number limit, and batching across one and two resources, but registration through src/index.ts, the already-registered and connect-failure paths of register, a webex.request rejection, a batch timeout (its case is it.skip), a batched value missing from both found lists, and the searchPlaces resolved value have no case; test/integration/spec/dss.js expects a mercury.disconnect the code never makes and its test:browser run bundles nothing (0 tests, exit 0); no characterization baseline exists. Held at Partial; independent validation passed with warnings on 2026-11-12 under validator runtime 01a1cf44-b40f-7ee2-ab94-d19b99d9fd43 (0 Blocking, 1 Important finding). The Important finding is B11-CMD-001 (command-source parity): the workspace-qualified form (yarn workspace @webex/internal-plugin-dss followed by the script name) recorded for compile, build, unit-test, lint, and deploy appears verbatim in no committed source outside the generated docs; it is an accepted warning because the developer retained that command form (rarajes2@cisco.com, 2026-11-12).",
|
|
154
|
+
"last_assessed": "2026-11-12",
|
|
155
|
+
"contracts": {
|
|
156
|
+
"provides": [
|
|
157
|
+
"dss-internal-sdk"
|
|
158
|
+
],
|
|
159
|
+
"requires": [
|
|
160
|
+
"directory-search-http",
|
|
161
|
+
"directory-search-mercury-events",
|
|
162
|
+
"webex-core-plugin-host",
|
|
163
|
+
"webex-core-batcher",
|
|
164
|
+
"internal-plugin-mercury-events",
|
|
165
|
+
"internal-plugin-device-org",
|
|
166
|
+
"common-exception",
|
|
167
|
+
"common-timers-timer",
|
|
168
|
+
"uuid",
|
|
169
|
+
"lodash"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"section_profile": {
|
|
173
|
+
"has_tiers": false,
|
|
174
|
+
"has_ui": false,
|
|
175
|
+
"crosses_service_boundaries": true,
|
|
176
|
+
"holds_client_state": true,
|
|
177
|
+
"enforces_domain_rules": true,
|
|
178
|
+
"is_concurrent_async": true,
|
|
179
|
+
"owns_persistence": false,
|
|
180
|
+
"stateful_transitions": true,
|
|
181
|
+
"exposes_wire_protocol": true,
|
|
182
|
+
"ui_multi_screen": false,
|
|
183
|
+
"large_data_model": false,
|
|
184
|
+
"returns_caller_errors": true,
|
|
185
|
+
"module_specific_conventions": true,
|
|
186
|
+
"published_package": true,
|
|
187
|
+
"embedded_in_host": false,
|
|
188
|
+
"has_design_tradeoff": true,
|
|
189
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
190
|
+
"resolved_at": "2026-11-12T10:05:00Z",
|
|
191
|
+
"has_submodules": false,
|
|
192
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
193
|
+
"has_submodules_computed_at": "2026-11-12T10:05:00Z"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"contract_catalog": {
|
|
198
|
+
"index_path": "docs/architecture.md",
|
|
199
|
+
"definitions": {
|
|
200
|
+
"dss-internal-sdk": {
|
|
201
|
+
"kind": "sdk",
|
|
202
|
+
"publication": "published",
|
|
203
|
+
"source_kind": "repository-path",
|
|
204
|
+
"source": "package.json",
|
|
205
|
+
"summary": "Published npm package (internal plugin). main is dist/index.js and devMain is src/index.ts; no type declarations are published. Importing it 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 entry exports only the default DSS class. webex.internal.dss exposes register, unregister, lookupDetail, lookup, lookupByEmail, lookupByPhoneNumbers, search, and searchPlaces, rejects queries with DssTimeoutError, and emits dss:registered, dss:unregistered, and dss:lookup.result; specified in src/docs/README.md."
|
|
206
|
+
},
|
|
207
|
+
"directory-search-http": {
|
|
208
|
+
"kind": "http",
|
|
209
|
+
"publication": "internal",
|
|
210
|
+
"source_kind": "external",
|
|
211
|
+
"source": "Directory Search Service (catalog service name directorySearch in src/constants.ts; route definitions are not in this repository)",
|
|
212
|
+
"summary": "POST /lookup/orgid/<orgId>/identity/<id>/detail with body {requestId}; POST /lookup/orgid/<orgId>/identities, /entityprovidertype/<type>, /emails, or /phonenumbers with body {requestId, lookupValues}; POST /search/orgid/<orgId>/entities with {requestId, queryString, resultSize, requestedTypes, includeCommonAreaPhones?, includeOnlyPairableDevices?, includePersonalDevices?}; POST /search/orgid/<orgId>/places with {requestId, queryString, resultSize, isOnlySchedulableRooms}. All application/json; the HTTP response is not read."
|
|
213
|
+
},
|
|
214
|
+
"directory-search-mercury-events": {
|
|
215
|
+
"kind": "event",
|
|
216
|
+
"publication": "internal",
|
|
217
|
+
"source_kind": "external",
|
|
218
|
+
"source": "Directory Search Service result pages delivered over mercury (event names and result paths in src/constants.ts; service definitions are not in this repository)",
|
|
219
|
+
"summary": "event:directory.lookup envelopes carry data {requestId, sequence, finished?, lookupResult: {entities, entitiesFound, entitiesNotFound}}; event:directory.search envelopes carry data {requestId, sequence, finished?, directoryEntities}. A query is complete when the finished page and every lower sequence have arrived."
|
|
220
|
+
},
|
|
221
|
+
"webex-core-plugin-host": {
|
|
222
|
+
"kind": "sdk",
|
|
223
|
+
"publication": "published",
|
|
224
|
+
"source_kind": "external",
|
|
225
|
+
"source": "@webex/webex-core (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md)",
|
|
226
|
+
"summary": "registerInternalPlugin keys the plugin by its raw name (dss, first registration wins) and merges its config into the defaults; WebexPlugin supplies webex, logger, config (webex.config[namespace.toLowerCase()]), and the ampersand-events listenTo, stopListening, and trigger; webex.request resolves service directorySearch through the service catalog; webex.canAuthorize proxies the credentials."
|
|
227
|
+
},
|
|
228
|
+
"webex-core-batcher": {
|
|
229
|
+
"kind": "sdk",
|
|
230
|
+
"publication": "published",
|
|
231
|
+
"source_kind": "external",
|
|
232
|
+
"source": "@webex/webex-core Batcher (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md; code consulted: packages/@webex/webex-core/src/lib/batcher.js)",
|
|
233
|
+
"summary": "Batcher.request(value) shares one promise per identical pending value and flushes through cappedDebounce with batcherWait, batcherMaxCalls, and batcherMaxWait read once from the subclass namespace config (webex.config.dss); a flush calls prepareRequest, submitHttpRequest, and handleHttpSuccess; a non-HTTP rejection rejects every queued deferred; a response value with no pending request throws."
|
|
234
|
+
},
|
|
235
|
+
"internal-plugin-mercury-events": {
|
|
236
|
+
"kind": "sdk",
|
|
237
|
+
"publication": "published",
|
|
238
|
+
"source_kind": "external",
|
|
239
|
+
"source": "@webex/internal-plugin-mercury (workspace package; module spec consulted: packages/@webex/internal-plugin-mercury/src/docs/README.md, found stale on the session model; code consulted: packages/@webex/internal-plugin-mercury/src/mercury.js)",
|
|
240
|
+
"summary": "Imported for its registration side effect. connect() resolves at once when connected and shares one socket per webex instance; inbound envelopes are emitted as event, event:<namespace>, and event:<eventType>, so directory.lookup arrives as event:directory.lookup with the whole envelope. off(name) without a handler removes every listener for that name."
|
|
241
|
+
},
|
|
242
|
+
"internal-plugin-device-org": {
|
|
243
|
+
"kind": "sdk",
|
|
244
|
+
"publication": "published",
|
|
245
|
+
"source_kind": "external",
|
|
246
|
+
"source": "@webex/internal-plugin-device (workspace package; module spec consulted: packages/@webex/internal-plugin-device/src/docs/README.md, silent on orgId; code consulted: packages/@webex/internal-plugin-device/src/device.js)",
|
|
247
|
+
"summary": "webex.internal.device.orgId is not a declared property: it is set from the WDM registration body (extraProperties allow) and cleared on unregister, so it is undefined before device registration. Not declared in this package's package.json; the host bundle registers the device plugin."
|
|
248
|
+
},
|
|
249
|
+
"common-exception": {
|
|
250
|
+
"kind": "sdk",
|
|
251
|
+
"publication": "published",
|
|
252
|
+
"source_kind": "external",
|
|
253
|
+
"source": "@webex/common (workspace package; module spec consulted: packages/@webex/common/src/docs/README.md)",
|
|
254
|
+
"summary": "Exception builds its message from the subclass parse(details) and sets name to the class name; DssTimeoutError extends it."
|
|
255
|
+
},
|
|
256
|
+
"common-timers-timer": {
|
|
257
|
+
"kind": "sdk",
|
|
258
|
+
"publication": "published",
|
|
259
|
+
"source_kind": "external",
|
|
260
|
+
"source": "@webex/common-timers (workspace package; module spec consulted: packages/@webex/common-timers/src/docs/README.md)",
|
|
261
|
+
"summary": "Timer(callback, timeout) with start (only from init), reset and cancel (only while running). Used for the per-query inactivity timeout."
|
|
262
|
+
},
|
|
263
|
+
"uuid": {
|
|
264
|
+
"kind": "sdk",
|
|
265
|
+
"publication": "published",
|
|
266
|
+
"source_kind": "external",
|
|
267
|
+
"source": "uuid@^3.3.2 (npm)",
|
|
268
|
+
"summary": "uuid.v4 generates the requestId of every query."
|
|
269
|
+
},
|
|
270
|
+
"lodash": {
|
|
271
|
+
"kind": "sdk",
|
|
272
|
+
"publication": "published",
|
|
273
|
+
"source_kind": "external",
|
|
274
|
+
"source": "lodash@^4.17.21 (npm)",
|
|
275
|
+
"summary": "get reads result pages by path; range and isEqual decide when every sequence has arrived."
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"spec_policy": {
|
|
280
|
+
"require_what_and_why": true,
|
|
281
|
+
"require_provenance": true,
|
|
282
|
+
"protected_specs": [
|
|
283
|
+
"src/docs/README.md"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"validation": {
|
|
287
|
+
"generator_runtime": "claude-code",
|
|
288
|
+
"generator_model": "claude-opus-5-5",
|
|
289
|
+
"generator_runtime_source": "host-metadata",
|
|
290
|
+
"source_commit": "ecd5af12a1abf47fc6ed7dd72cb308b259d45fb8",
|
|
291
|
+
"minimum_independence": "different-runtime",
|
|
292
|
+
"blocking_severities": [
|
|
293
|
+
"Blocking"
|
|
294
|
+
],
|
|
295
|
+
"validator_runtime": "01a1cf44-b40f-7ee2-ab94-d19b99d9fd43",
|
|
296
|
+
"validator_run_id": "01a1cf44-b40f-7ee2-ab94-d19b99d9fd43",
|
|
297
|
+
"validator_runtime_source": "host-metadata",
|
|
298
|
+
"runtime_fallback_tier": "different-runtime"
|
|
299
|
+
},
|
|
300
|
+
"layout": {
|
|
301
|
+
"sdd_root": ".sdd",
|
|
302
|
+
"docs_root": "docs",
|
|
303
|
+
"agent_entry_path": "AGENTS.md",
|
|
304
|
+
"standing_docs_root": "docs",
|
|
305
|
+
"spec_index_path": "docs/specs/README.md",
|
|
306
|
+
"module_docs_strategy": "source-local",
|
|
307
|
+
"module_docs_relative_path": "docs/README.md",
|
|
308
|
+
"module_docs_decision": {
|
|
309
|
+
"basis": "repo-standards-default",
|
|
310
|
+
"reason": "No module-local documentation existed. The source-local default gives src/docs/README.md. test:style runs eslint ./src/**/*.*, and the shared @webex/eslint-config-legacy ignore patterns exclude docs/** and *.md; build:src processes -js -ts only, so Markdown under src/ does not enter dist/.",
|
|
311
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
312
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
313
|
+
},
|
|
314
|
+
"repo_context_decision": {
|
|
315
|
+
"path": ".repo-context.json",
|
|
316
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
317
|
+
"action": "create",
|
|
318
|
+
"schema_action": "create",
|
|
319
|
+
"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 the repository-root .sdd/templates/repo-standards/schemas/repo-context.schema.json.",
|
|
320
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
321
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
322
|
+
},
|
|
323
|
+
"artifact_decisions": [
|
|
324
|
+
{
|
|
325
|
+
"path": "docs/service.md",
|
|
326
|
+
"action": "omit",
|
|
327
|
+
"reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
|
|
328
|
+
"decided_by": "claude-code (code evidence)",
|
|
329
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"path": "mkdocs.yml",
|
|
333
|
+
"action": "omit",
|
|
334
|
+
"reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
|
|
335
|
+
"decided_by": "claude-code (code evidence)",
|
|
336
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"path": "api-specs/openapi.yaml",
|
|
340
|
+
"action": "omit",
|
|
341
|
+
"reason": "The package serves no HTTP routes. It is a client of the Directory Search Service; its published surface is the npm export described by dss-internal-sdk.",
|
|
342
|
+
"decided_by": "claude-code (code evidence)",
|
|
343
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"path": "SECURITY.md",
|
|
347
|
+
"action": "omit",
|
|
348
|
+
"reason": "No package-level security policy exists. The workspace owns security policy, and a per-package copy would duplicate it; security architecture is described in docs/architecture.md.",
|
|
349
|
+
"decided_by": "claude-code (code evidence)",
|
|
350
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"path": "CONTRIBUTING.md",
|
|
354
|
+
"action": "omit",
|
|
355
|
+
"reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
|
|
356
|
+
"decided_by": "claude-code (code evidence)",
|
|
357
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"path": "CHANGELOG.md",
|
|
361
|
+
"action": "omit",
|
|
362
|
+
"reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
|
|
363
|
+
"decided_by": "claude-code (code evidence)",
|
|
364
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"path": "CTO_CHECKLIST.yml",
|
|
368
|
+
"action": "omit",
|
|
369
|
+
"reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
|
|
370
|
+
"decided_by": "claude-code (code evidence)",
|
|
371
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
375
|
+
"action": "omit",
|
|
376
|
+
"reason": "Omitted together with CTO_CHECKLIST.yml.",
|
|
377
|
+
"decided_by": "claude-code (code evidence)",
|
|
378
|
+
"decided_at": "2026-11-12T10:05:00Z"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"template_roots": {
|
|
382
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
383
|
+
},
|
|
384
|
+
"contract_index_path": "docs/architecture.md",
|
|
385
|
+
"repo_skills_root": ".sdd/skills",
|
|
386
|
+
"monorepo_package": {
|
|
387
|
+
"package_path": "packages/@webex/internal-plugin-dss",
|
|
388
|
+
"root_manifest_path": "../../../.sdd/manifest.json",
|
|
389
|
+
"templates_root_path": "../../../.sdd/templates/repo-standards"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"tooling": {
|
|
393
|
+
"sdlc_skills": {
|
|
394
|
+
"source_ref": "repo-annotation@2.3.1"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"coverage_ratchet": {
|
|
398
|
+
"enabled": true,
|
|
399
|
+
"waivers": []
|
|
400
|
+
},
|
|
401
|
+
"substrate": {
|
|
402
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
403
|
+
"consumed": [
|
|
404
|
+
"@webex/eslint-config-legacy via .eslintrc.js",
|
|
405
|
+
"@webex/babel-config-legacy via babel.config.js",
|
|
406
|
+
"@webex/jest-config-legacy via jest.config.js",
|
|
407
|
+
"@webex/legacy-tools build and test runner via package.json",
|
|
408
|
+
"package README.md (context only)",
|
|
409
|
+
"Repo Standards templates at the monorepo root .sdd/templates/repo-standards, referred to through layout.monorepo_package.templates_root_path (this package holds no templates)"
|
|
410
|
+
],
|
|
411
|
+
"compliance_tier": "baseline"
|
|
412
|
+
},
|
|
413
|
+
"section_profiles": {
|
|
414
|
+
"repo": {
|
|
415
|
+
"owns_datastore": false,
|
|
416
|
+
"holds_client_state": true,
|
|
417
|
+
"components_interact": true,
|
|
418
|
+
"domain_data_across_components": true,
|
|
419
|
+
"caches_data": false,
|
|
420
|
+
"observability_convention": true,
|
|
421
|
+
"deploys_to_infra": false,
|
|
422
|
+
"shared_base_libs": true,
|
|
423
|
+
"is_monorepo": false,
|
|
424
|
+
"multi_platform": false,
|
|
425
|
+
"published_package": true,
|
|
426
|
+
"embedded_in_host": false,
|
|
427
|
+
"cross_repo_deps_material": true,
|
|
428
|
+
"security_arch_warranted": true,
|
|
429
|
+
"exposes_commands_or_artifacts": true
|
|
430
|
+
},
|
|
431
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
432
|
+
"resolved_at": "2026-11-12T10:05:00Z"
|
|
433
|
+
}
|
|
434
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: agent-entry
|
|
3
|
+
generated_from: agents@0.3.0
|
|
4
|
+
generated_by: claude-code
|
|
5
|
+
approved_by: rarajes2@cisco.com
|
|
6
|
+
updated_at: 2026-11-12T10:21:50Z
|
|
7
|
+
validation_status: pass-with-warnings
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
Package-scoped SDD entry for `@webex/internal-plugin-dss`, the internal `dss` plugin of the SDK (it
|
|
13
|
+
looks up and searches people, devices, rooms, and places in the Directory Search Service, sending
|
|
14
|
+
each query over HTTP and collecting the results that arrive over mercury). This file orients agents.
|
|
15
|
+
The monorepo root `AGENTS.md` governs workspace-wide setup.
|
|
16
|
+
|
|
17
|
+
## Working Method
|
|
18
|
+
|
|
19
|
+
- Read the relevant package files before editing. Do not edit blind.
|
|
20
|
+
- Understand the task and affected surfaces before writing code.
|
|
21
|
+
- Prefer focused edits over rewriting whole files.
|
|
22
|
+
- Do not invent commands, paths, exports, event names, or resource paths. Verify them from this
|
|
23
|
+
package's source and tests.
|
|
24
|
+
- Test or validate before declaring done.
|
|
25
|
+
- Keep output concise. If something is uncertain, say so instead of guessing.
|
|
26
|
+
|
|
27
|
+
## Canonical Repository Documentation
|
|
28
|
+
|
|
29
|
+
Before changing code or documentation, start with:
|
|
30
|
+
|
|
31
|
+
- [`docs/index.md`](docs/index.md) for package documentation navigation;
|
|
32
|
+
- [`docs/architecture.md`](docs/architecture.md) for package boundaries and interactions;
|
|
33
|
+
- [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
|
|
34
|
+
- the module specification at [`src/docs/README.md`](src/docs/README.md) (DSS plugin); and
|
|
35
|
+
- [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
|
|
36
|
+
|
|
37
|
+
Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
|
|
38
|
+
publishes an internal SDK surface, so its contract artifact is `package.json` plus the `src/index.ts`
|
|
39
|
+
entry. It serves no HTTP, so no OpenAPI applies.
|
|
40
|
+
|
|
41
|
+
## 1. Commands (Run First)
|
|
42
|
+
|
|
43
|
+
Use only documented commands. Do not invent alternatives when a command is missing. Run workspace
|
|
44
|
+
commands from the monorepo root.
|
|
45
|
+
|
|
46
|
+
| Task | Command |
|
|
47
|
+
| ---------------------- | ------- |
|
|
48
|
+
| Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command); on a fresh checkout run `yarn prebuild:modules` once, because `yarn` does not build `@webex/legacy-tools` or sibling `dist/` |
|
|
49
|
+
| Start dev environment | N/A — library package with no start script in `package.json` |
|
|
50
|
+
| Run tests | `yarn workspace @webex/internal-plugin-dss test:unit` (jest) |
|
|
51
|
+
| Run linters | `yarn workspace @webex/internal-plugin-dss test:style` |
|
|
52
|
+
| Build/release artifact | `yarn workspace @webex/internal-plugin-dss build:src` (JavaScript and source maps to `dist/`) |
|
|
53
|
+
| Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
|
|
54
|
+
|
|
55
|
+
`yarn workspace @webex/internal-plugin-dss build` runs `yarn build:src` and produces the same output;
|
|
56
|
+
the package has no `tsconfig.json` and emits no type declarations.
|
|
57
|
+
|
|
58
|
+
Do not use the aggregate `test` script: it calls `test:integration`, which this package does not
|
|
59
|
+
define. `test:browser` runs the mock-based spec in `test/integration/spec/dss.js` through karma; see
|
|
60
|
+
[Getting started](docs/getting-started.md#tests) for its state.
|
|
61
|
+
|
|
62
|
+
If a required command is unknown, stop and ask for the exact command.
|
|
63
|
+
|
|
64
|
+
## 2. Agent Persona and Scope
|
|
65
|
+
|
|
66
|
+
You are the Webex JS SDK engineering assistant for `@webex/internal-plugin-dss`.
|
|
67
|
+
|
|
68
|
+
Primary outcomes:
|
|
69
|
+
|
|
70
|
+
- Deliver production-safe changes with unit tests and lint passing.
|
|
71
|
+
- Preserve existing behavior unless a change request explicitly requires a behavior change.
|
|
72
|
+
- Keep docs and configuration aligned with code changes.
|
|
73
|
+
|
|
74
|
+
Definition of done:
|
|
75
|
+
|
|
76
|
+
1. Requested change is implemented.
|
|
77
|
+
2. Relevant tests, lint, and build checks pass locally.
|
|
78
|
+
3. Updated docs cover new behavior, including the owning module spec.
|
|
79
|
+
4. PR summary includes risks and rollback notes.
|
|
80
|
+
|
|
81
|
+
## 3. Repository Knowledge
|
|
82
|
+
|
|
83
|
+
### Tech Stack
|
|
84
|
+
|
|
85
|
+
| Area | Tooling | Version |
|
|
86
|
+
| ---------------- | ------- | ------- |
|
|
87
|
+
| Language runtime | node; TypeScript sources | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=16`; the workspace root `package.json` `engines.node` still reads `18.x`, which conflicts with the other pins |
|
|
88
|
+
| Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
|
|
89
|
+
| Test framework | jest via `webex-legacy-tools` (`test:unit`); chai, chai-as-promised, sinon, `@webex/test-helper-mock-webex` | sinon `^9.2.4` |
|
|
90
|
+
| Lint/format | eslint via `@webex/eslint-config-legacy` (TypeScript override), prettier | eslint `^8.24.0`, prettier `^2.7.1` |
|
|
91
|
+
|
|
92
|
+
### Project Map
|
|
93
|
+
|
|
94
|
+
- `src/index.ts`: registers internal plugin `dss` and default-exports `DSS`.
|
|
95
|
+
- `src/dss.ts`: `DSS`, where registration, every query method, and result assembly live. Spec:
|
|
96
|
+
`src/docs/README.md`.
|
|
97
|
+
- `src/dss-batcher.ts`: `DssBatcher`, the webex-core `Batcher` that combines `lookup` calls per
|
|
98
|
+
resource.
|
|
99
|
+
- `src/dss-errors.ts`: `DssTimeoutError`.
|
|
100
|
+
- `src/constants.ts`: event names, service name, result paths, and `SEARCH_TYPES`.
|
|
101
|
+
- `src/types.ts`: option and result interfaces and the `EntityProviderType` and `SearchType` enums.
|
|
102
|
+
- `src/config.ts`: defaults for `requestTimeout` (6000 ms) and the three batcher limits.
|
|
103
|
+
- `test/unit/spec/dss.ts`, `test/unit/spec/dss-batcher.ts`: the unit specs (61 cases, 1 skipped);
|
|
104
|
+
`dss.ts` imports the package by name, which loads `dist/`.
|
|
105
|
+
- `test/integration/spec/dss.js`: a MockWebex spec run only by `test:browser`.
|
|
106
|
+
- `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
|
|
107
|
+
- `dist/`: generated build output. Never edit by hand.
|
|
108
|
+
- `README.md`: retained npm page, context only and partly stale (it shows `lookup({ids})` and
|
|
109
|
+
`lookupByEmail({emails})`); see [ADR-0001](docs/adr/0001-retain-product-readme.md).
|
|
110
|
+
|
|
111
|
+
### Critical Constraints
|
|
112
|
+
|
|
113
|
+
- The plugin is `webex.internal.dss`, and its config is `webex.config.dss`; keep the namespace `DSS`
|
|
114
|
+
so the config lookup still works.
|
|
115
|
+
- Results arrive only after `register()`: the HTTP response is ignored, and every result page comes
|
|
116
|
+
over mercury as `event:directory.lookup` or `event:directory.search`.
|
|
117
|
+
- A query completes only when pages `0..n` have all arrived and page `n` carries `finished`; keep
|
|
118
|
+
the `requestId`, `sequence`, and `finished` handling in `_request` intact.
|
|
119
|
+
- `requestTimeout` is an inactivity timeout reset by each page; the rejection is `DssTimeoutError`.
|
|
120
|
+
- `lookup` is batched by default through one `DssBatcher` per resource; `lookupDetail`,
|
|
121
|
+
`lookupByEmail`, `lookupByPhoneNumbers`, `search`, and `searchPlaces` are never batched.
|
|
122
|
+
- `lookupByPhoneNumbers` rejects more than 5 numbers; keep the limit and its message.
|
|
123
|
+
- Every resource path embeds `webex.internal.device.orgId`.
|
|
124
|
+
|
|
125
|
+
## 4. Testing Workflow
|
|
126
|
+
|
|
127
|
+
Run checks in this order:
|
|
128
|
+
|
|
129
|
+
1. `yarn workspace @webex/internal-plugin-dss build:src`
|
|
130
|
+
2. `yarn workspace @webex/internal-plugin-dss test:unit`
|
|
131
|
+
3. `yarn workspace @webex/internal-plugin-dss test:style`
|
|
132
|
+
|
|
133
|
+
Step 1 is required before step 2: `test/unit/spec/dss.ts` imports `@webex/internal-plugin-dss`,
|
|
134
|
+
which resolves to `dist/index.js`, so a stale `dist/` tests old code. Run `yarn prebuild:modules`
|
|
135
|
+
once on a fresh checkout so the sibling packages' `dist/` exist.
|
|
136
|
+
|
|
137
|
+
Testing rules:
|
|
138
|
+
|
|
139
|
+
- Add or update unit cases for every behavior change, next to the matching `describe` block.
|
|
140
|
+
- Use the existing MockWebex setup with the stub mercury, `webex.request`, the `uuid.v4` stub, and the
|
|
141
|
+
`createData`, `testMakeRequest`, and `testMakeBatchedRequests` helpers in `test/unit/spec/dss.ts`.
|
|
142
|
+
- Use `assert.calledOnceWithExactly` for request arguments, and parametrize when more than three
|
|
143
|
+
cases are alike.
|
|
144
|
+
- Cover failure paths and edge cases, not only happy paths.
|
|
145
|
+
- Do not remove tests to make CI pass.
|
|
146
|
+
- Use `sinon.useFakeTimers()` for the batcher debounce and the request timeout.
|
|
147
|
+
|
|
148
|
+
No coverage gate applies to this package; do not infer one.
|
|
149
|
+
|
|
150
|
+
## 5. Code Style and Patterns
|
|
151
|
+
|
|
152
|
+
Coding expectations:
|
|
153
|
+
|
|
154
|
+
- Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
|
|
155
|
+
`root: true`; `.ts` files get the shared TypeScript and prettier override.
|
|
156
|
+
- Prefer small functions over large procedural blocks.
|
|
157
|
+
- Make error handling explicit; keep the existing error messages, which the unit tests match on.
|
|
158
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
159
|
+
|
|
160
|
+
Pattern example:
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
Preferred:
|
|
164
|
+
- Add a query method that builds /<verb>/orgid/<orgId>/<path> and calls _request with a dataPath
|
|
165
|
+
constant from src/constants.ts.
|
|
166
|
+
- Route single-value lookups that should coalesce through _batchedLookup.
|
|
167
|
+
- Log as "DSS-><method>#ERROR, <reason>" without the looked-up ids, emails, or numbers.
|
|
168
|
+
|
|
169
|
+
Avoid:
|
|
170
|
+
- Treating README.md as the signature reference for lookup or lookupByEmail.
|
|
171
|
+
- Reading the webex.request response; results come only from mercury.
|
|
172
|
+
- Reading this.config outside the DSS namespace.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## 6. Git Workflow
|
|
176
|
+
|
|
177
|
+
- Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
|
|
178
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
|
|
179
|
+
the workspace `CONTRIBUTING.md` requires for pull requests.
|
|
180
|
+
- Keep commits focused and reversible.
|
|
181
|
+
- Rebase on the target branch before opening a pull request.
|
|
182
|
+
|
|
183
|
+
PR checklist:
|
|
184
|
+
|
|
185
|
+
- What changed and why.
|
|
186
|
+
- Tests run and results.
|
|
187
|
+
- Risk and impact on first-party clients that call `webex.internal.dss`; inside this workspace the
|
|
188
|
+
only consumer is the `webex` bundle, which loads the plugin through `require` in
|
|
189
|
+
`packages/webex/src/webex.js` and calls none of its methods.
|
|
190
|
+
- Rollback approach.
|
|
191
|
+
|
|
192
|
+
## 7. Boundaries and Escalation
|
|
193
|
+
|
|
194
|
+
### Always
|
|
195
|
+
|
|
196
|
+
- Prefer existing patterns over introducing new architecture.
|
|
197
|
+
- Keep changes minimal for the requested scope.
|
|
198
|
+
- Call out assumptions and unknowns explicitly.
|
|
199
|
+
- Update the owning module spec in the same change that alters observable behavior.
|
|
200
|
+
|
|
201
|
+
### Ask First
|
|
202
|
+
|
|
203
|
+
- Adding dependencies.
|
|
204
|
+
- Renaming or removing a `dss:*` event, a method, or the registered plugin name.
|
|
205
|
+
- Changing a DSS resource path, request body field, or result path.
|
|
206
|
+
- Changing the result resolve shape of any method, the timeout semantics, or the batcher defaults.
|
|
207
|
+
- Changing the phone-number limit.
|
|
208
|
+
|
|
209
|
+
### Never
|
|
210
|
+
|
|
211
|
+
- Edit `dist/` by hand.
|
|
212
|
+
- Commit secrets, tokens, or credentials, including in test fixtures.
|
|
213
|
+
- Log looked-up ids, emails, phone numbers, query strings, or returned entities.
|
|
214
|
+
- Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
|
|
215
|
+
templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
|
|
216
|
+
`.sdd/manifest.json` refers to them through `layout.monorepo_package`.
|
package/dist/dss.js
CHANGED