@webex/internal-plugin-ediscovery 3.13.0-next.1 → 3.13.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.repo-context.json +477 -0
- package/.sdd/manifest.json +402 -0
- package/AGENTS.md +213 -0
- package/dist/ediscovery.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +95 -0
- package/docs/adr/index.md +25 -0
- package/docs/architecture.md +296 -0
- package/docs/getting-started.md +104 -0
- package/docs/index.md +42 -0
- package/docs/specs/README.md +69 -0
- package/package.json +10 -10
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +589 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/internal-plugin-ediscovery",
|
|
5
|
+
"purpose": "Internal Webex JS SDK plugin registered as webex.internal.ediscovery for first-party compliance clients. It creates, lists, reads, restarts, and deletes compliance reports on the eDiscovery service, reads the client config, posts the summary-download audit event, and pages report content and content containers by report UUID or remote report URL with an in-memory container cache. Payload transforms registered with webex-core encrypt report requests under a new KMS key before they are sent and decrypt report requests, activities, and containers on the way in, on behalf of each container's onBehalfOfUser, recording failures as error or warning properties instead of rejecting.",
|
|
6
|
+
"category": "cat2-legacy",
|
|
7
|
+
"primary_languages": [
|
|
8
|
+
"javascript"
|
|
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
|
+
"compile": {
|
|
19
|
+
"command": "yarn workspace @webex/internal-plugin-ediscovery build:src",
|
|
20
|
+
"source_file": "package.json",
|
|
21
|
+
"role": "compile"
|
|
22
|
+
},
|
|
23
|
+
"build": {
|
|
24
|
+
"command": "yarn workspace @webex/internal-plugin-ediscovery build",
|
|
25
|
+
"source_file": "package.json",
|
|
26
|
+
"role": "package"
|
|
27
|
+
},
|
|
28
|
+
"unit-test": {
|
|
29
|
+
"command": "yarn workspace @webex/internal-plugin-ediscovery test:unit",
|
|
30
|
+
"source_file": "package.json",
|
|
31
|
+
"role": "unit-test"
|
|
32
|
+
},
|
|
33
|
+
"browser-test-broken": {
|
|
34
|
+
"command": "yarn workspace @webex/internal-plugin-ediscovery test:browser:broken",
|
|
35
|
+
"source_file": "package.json",
|
|
36
|
+
"role": "other"
|
|
37
|
+
},
|
|
38
|
+
"lint": {
|
|
39
|
+
"command": "yarn workspace @webex/internal-plugin-ediscovery test:style",
|
|
40
|
+
"source_file": "package.json",
|
|
41
|
+
"role": "lint"
|
|
42
|
+
},
|
|
43
|
+
"deploy": {
|
|
44
|
+
"command": "yarn workspace @webex/internal-plugin-ediscovery deploy:npm",
|
|
45
|
+
"source_file": "package.json",
|
|
46
|
+
"role": "deploy"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"toolchain": [
|
|
50
|
+
{
|
|
51
|
+
"name": "node",
|
|
52
|
+
"version": ">=18",
|
|
53
|
+
"origin": "repo-config",
|
|
54
|
+
"source_file": "package.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "node",
|
|
58
|
+
"version": "22.14",
|
|
59
|
+
"origin": "repo-config",
|
|
60
|
+
"source_file": "../../../AGENTS.md"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "node",
|
|
64
|
+
"version": "lts/jod",
|
|
65
|
+
"origin": "repo-config",
|
|
66
|
+
"source_file": "../../../.nvmrc"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "node",
|
|
70
|
+
"version": "18.x",
|
|
71
|
+
"origin": "repo-config",
|
|
72
|
+
"source_file": "../../../package.json"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "yarn",
|
|
76
|
+
"version": "3.4.1",
|
|
77
|
+
"origin": "repo-config",
|
|
78
|
+
"source_file": "../../../package.json"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "babel",
|
|
82
|
+
"version": "^7.17.10",
|
|
83
|
+
"origin": "repo-config",
|
|
84
|
+
"source_file": "package.json"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "eslint",
|
|
88
|
+
"version": "^8.24.0",
|
|
89
|
+
"origin": "repo-config",
|
|
90
|
+
"source_file": "package.json"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "prettier",
|
|
94
|
+
"version": "^2.7.1",
|
|
95
|
+
"origin": "repo-config",
|
|
96
|
+
"source_file": "package.json"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "sinon",
|
|
100
|
+
"version": "^9.2.4",
|
|
101
|
+
"origin": "repo-config",
|
|
102
|
+
"source_file": "package.json"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"tests": {
|
|
106
|
+
"unit": {
|
|
107
|
+
"command_ref": "unit-test",
|
|
108
|
+
"dir": "test/unit/spec",
|
|
109
|
+
"framework": "jest"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"quality_gates": {
|
|
113
|
+
"code_coverage": {
|
|
114
|
+
"origin": "none",
|
|
115
|
+
"declared_by": "rarajes2@cisco.com via bootstrap questionnaire (generator check: test:unit runs webex-legacy-tools with --runner jest; jest.config.js re-exports @webex/jest-config-legacy, which sets collectCoverage false and no coverageThreshold; package.json defines no coverage script)"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"coverage_status_definitions": {
|
|
119
|
+
"specced": ">=80% public surface specced, drift <5% - spec is authoritative",
|
|
120
|
+
"partial": "40-80% specced - spec is a hint, cross-check code",
|
|
121
|
+
"untracked": "<40% specced - code is the source of truth"
|
|
122
|
+
},
|
|
123
|
+
"spec_source_policy": {
|
|
124
|
+
"mode": "keep-separate",
|
|
125
|
+
"migrated_source_disposition": "retain",
|
|
126
|
+
"disposition_decided_by": "rarajes2@cisco.com",
|
|
127
|
+
"disposition_decided_at": "2026-11-12T05:59:56Z",
|
|
128
|
+
"decided_by": "rarajes2@cisco.com",
|
|
129
|
+
"decided_at": "2026-11-12T05:59:56Z",
|
|
130
|
+
"decision_record": "docs/adr/0001-retain-product-readme.md"
|
|
131
|
+
},
|
|
132
|
+
"spec_sources": [],
|
|
133
|
+
"modules": [
|
|
134
|
+
{
|
|
135
|
+
"path": "src",
|
|
136
|
+
"canonical_spec": "src/docs/README.md",
|
|
137
|
+
"coverage_status": "Partial",
|
|
138
|
+
"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: 122 unit cases in test/unit/spec/report.js, content.js, and transforms.js pass under Node 22.14 after build:src, but registration and the seven payload predicates, the array transforms, decryptReportContentContainer, requestWithRetries, and the missing-container and lookup-failure branches of decryptReportContent have no case; the postAuditLog cases do not await their assertions; and test/integration/spec/ediscovery.js has no package script. Promoted Untracked to Partial on approval by rarajes2@cisco.com. Independent validation passed on 2026-11-12 with 0 Blocking findings and 0 warnings (validator runtime 01a1ce6b-d345-7220-b6b0-c125b776f5cc) after one Blocking contract-index finding in docs/architecture.md was corrected. Held at Partial because the test-strategy gap remains and no drift record or characterization baseline exists.",
|
|
139
|
+
"last_assessed": "2026-11-12",
|
|
140
|
+
"contracts": {
|
|
141
|
+
"provides": [
|
|
142
|
+
"ediscovery-sdk"
|
|
143
|
+
],
|
|
144
|
+
"requires": [
|
|
145
|
+
"ediscovery-service-api",
|
|
146
|
+
"kms-keys",
|
|
147
|
+
"webex-core-plugin-host",
|
|
148
|
+
"webex-core-storage",
|
|
149
|
+
"webex-common-utilities",
|
|
150
|
+
"internal-plugin-encryption",
|
|
151
|
+
"internal-plugin-conversation-registration",
|
|
152
|
+
"lodash"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"section_profile": {
|
|
156
|
+
"has_tiers": false,
|
|
157
|
+
"has_ui": false,
|
|
158
|
+
"crosses_service_boundaries": true,
|
|
159
|
+
"holds_client_state": true,
|
|
160
|
+
"enforces_domain_rules": true,
|
|
161
|
+
"is_concurrent_async": true,
|
|
162
|
+
"owns_persistence": false,
|
|
163
|
+
"stateful_transitions": false,
|
|
164
|
+
"exposes_wire_protocol": true,
|
|
165
|
+
"ui_multi_screen": false,
|
|
166
|
+
"large_data_model": false,
|
|
167
|
+
"returns_caller_errors": true,
|
|
168
|
+
"module_specific_conventions": true,
|
|
169
|
+
"published_package": true,
|
|
170
|
+
"embedded_in_host": false,
|
|
171
|
+
"has_design_tradeoff": true,
|
|
172
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
173
|
+
"resolved_at": "2026-11-12T05:59:56Z",
|
|
174
|
+
"has_submodules": false,
|
|
175
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
176
|
+
"has_submodules_computed_at": "2026-11-12T05:59:56Z"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"contract_catalog": {
|
|
181
|
+
"index_path": "docs/architecture.md",
|
|
182
|
+
"definitions": {
|
|
183
|
+
"ediscovery-sdk": {
|
|
184
|
+
"kind": "sdk",
|
|
185
|
+
"publication": "published",
|
|
186
|
+
"source_kind": "repository-path",
|
|
187
|
+
"source": "package.json",
|
|
188
|
+
"summary": "Published npm package (internal plugin). main is dist/index.js and devMain is src/index.js. Importing it imports @webex/internal-plugin-encryption and @webex/internal-plugin-conversation and registers EDiscovery as internal plugin 'ediscovery' with src/config.js and seven payload predicates and transforms that join the module-level webex config. Exports are the default EDiscovery class and the named ReportRequest, EdiscoveryError, InvalidEmailAddressError, and config (which resolves to undefined). The plugin API on webex.internal.ediscovery is createReport, getReport, getReports, deleteReport, restartReport, getContent, getContentContainer, getContentContainerByContainerId, getClientConfig, postAuditLog, clearCache, and the contentContainerCache session property. Per-method behavior is in src/docs/README.md."
|
|
189
|
+
},
|
|
190
|
+
"ediscovery-service-api": {
|
|
191
|
+
"kind": "http",
|
|
192
|
+
"publication": "internal",
|
|
193
|
+
"source_kind": "external",
|
|
194
|
+
"source": "eDiscovery service (reached as service name 'ediscovery' through the services catalog, or by a caller-supplied report URL; route definitions are not in this repository)",
|
|
195
|
+
"summary": "POST reports with the encrypted report request; GET reports (qs offset, size); GET, PUT, DELETE reports/<id>; GET reports/clientconfig; POST reports/<id>/audit/summary-download; GET <report>/contents and <report>/contents/container (qs offset, size); GET <report>/contents/container/<id>. Error code 14400001 carries a JSON array of unknown emails in body.message."
|
|
196
|
+
},
|
|
197
|
+
"kms-keys": {
|
|
198
|
+
"kind": "sdk",
|
|
199
|
+
"publication": "internal",
|
|
200
|
+
"source_kind": "external",
|
|
201
|
+
"source": "KMS reached through @webex/internal-plugin-encryption (no module spec; code consulted: packages/@webex/internal-plugin-encryption/src/encryption.js and src/kms.js)",
|
|
202
|
+
"summary": "kms.createUnboundKeys({count: 1}) and kms.createResource({userIds, keys}) for report requests; encryptText(key, text); decryptText(keyUri, ciphertext, {onBehalfOf}) and decryptScr(keyUri, scr, {onBehalfOf}) for reports, activities, and containers. Failures with statusCode 429, 502, 503, or 504 are retried by src/retry.js."
|
|
203
|
+
},
|
|
204
|
+
"webex-core-plugin-host": {
|
|
205
|
+
"kind": "sdk",
|
|
206
|
+
"publication": "published",
|
|
207
|
+
"source_kind": "external",
|
|
208
|
+
"source": "@webex/webex-core (workspace package; module specs consulted: packages/@webex/webex-core/src/docs/README.md and src/interceptors/docs/README.md)",
|
|
209
|
+
"summary": "EDiscovery extends WebexPlugin in namespace EDiscovery, so this.config is webex.config.ediscovery; registerInternalPlugin merges the config and concatenates the payloadTransformer predicates and transforms into the module-level default config; webex.transform runs every matched predicate's transform with only the extracted object, and the payload-transformer interceptor applies outbound transforms to request options and inbound transforms to responses and error reasons."
|
|
210
|
+
},
|
|
211
|
+
"webex-core-storage": {
|
|
212
|
+
"kind": "sdk",
|
|
213
|
+
"publication": "published",
|
|
214
|
+
"source_kind": "external",
|
|
215
|
+
"source": "@webex/webex-core storage (module spec consulted: packages/@webex/webex-core/src/lib/storage/docs/README.md)",
|
|
216
|
+
"summary": "@waitForValue('@') makes each decorated request method return a promise that runs after the plugin store loads."
|
|
217
|
+
},
|
|
218
|
+
"webex-common-utilities": {
|
|
219
|
+
"kind": "sdk",
|
|
220
|
+
"publication": "published",
|
|
221
|
+
"source_kind": "external",
|
|
222
|
+
"source": "@webex/common (workspace package; module spec consulted: packages/@webex/common/src/docs/README.md)",
|
|
223
|
+
"summary": "oneFlight with keyFactory on getContent, getContentContainer, and getContentContainerByContainerId; Exception as the base of EdiscoveryError, whose message comes from the first constructor argument."
|
|
224
|
+
},
|
|
225
|
+
"internal-plugin-encryption": {
|
|
226
|
+
"kind": "sdk",
|
|
227
|
+
"publication": "published",
|
|
228
|
+
"source_kind": "external",
|
|
229
|
+
"source": "@webex/internal-plugin-encryption (workspace package; no module spec; code consulted: packages/@webex/internal-plugin-encryption/src/index.js)",
|
|
230
|
+
"summary": "Imported by src/index.js to register internal plugin 'encryption', which every transform reaches as ctx.webex.internal.encryption."
|
|
231
|
+
},
|
|
232
|
+
"internal-plugin-conversation-registration": {
|
|
233
|
+
"kind": "sdk",
|
|
234
|
+
"publication": "published",
|
|
235
|
+
"source_kind": "external",
|
|
236
|
+
"source": "@webex/internal-plugin-conversation (workspace package; no module spec; code consulted: packages/@webex/internal-plugin-conversation/src/index.js)",
|
|
237
|
+
"summary": "Imported by src/index.js only for its side effect of registering internal plugin 'conversation'; nothing in src calls it."
|
|
238
|
+
},
|
|
239
|
+
"lodash": {
|
|
240
|
+
"kind": "sdk",
|
|
241
|
+
"publication": "published",
|
|
242
|
+
"source_kind": "external",
|
|
243
|
+
"source": "lodash@^4.17.21 (npm)",
|
|
244
|
+
"summary": "has(object, path) tests the payload predicates."
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"spec_policy": {
|
|
249
|
+
"require_what_and_why": true,
|
|
250
|
+
"require_provenance": true,
|
|
251
|
+
"protected_specs": [
|
|
252
|
+
"src/docs/README.md"
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"validation": {
|
|
256
|
+
"generator_runtime": "claude-code",
|
|
257
|
+
"generator_model": "claude-opus-5-5",
|
|
258
|
+
"generator_runtime_source": "host-metadata",
|
|
259
|
+
"validator_runtime": "01a1ce6b-d345-7220-b6b0-c125b776f5cc",
|
|
260
|
+
"validator_runtime_source": "invocation-input",
|
|
261
|
+
"runtime_fallback_tier": "different-runtime",
|
|
262
|
+
"source_commit": "ecd5af12a1abf47fc6ed7dd72cb308b259d45fb8",
|
|
263
|
+
"minimum_independence": "different-runtime",
|
|
264
|
+
"blocking_severities": [
|
|
265
|
+
"Blocking"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"layout": {
|
|
269
|
+
"sdd_root": ".sdd",
|
|
270
|
+
"docs_root": "docs",
|
|
271
|
+
"agent_entry_path": "AGENTS.md",
|
|
272
|
+
"standing_docs_root": "docs",
|
|
273
|
+
"spec_index_path": "docs/specs/README.md",
|
|
274
|
+
"module_docs_strategy": "source-local",
|
|
275
|
+
"module_docs_relative_path": "docs/README.md",
|
|
276
|
+
"module_docs_decision": {
|
|
277
|
+
"basis": "repo-standards-default",
|
|
278
|
+
"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 the build output.",
|
|
279
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
280
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
281
|
+
},
|
|
282
|
+
"repo_context_decision": {
|
|
283
|
+
"path": ".repo-context.json",
|
|
284
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
285
|
+
"action": "create",
|
|
286
|
+
"schema_action": "create",
|
|
287
|
+
"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.",
|
|
288
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
289
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
290
|
+
},
|
|
291
|
+
"artifact_decisions": [
|
|
292
|
+
{
|
|
293
|
+
"path": "docs/service.md",
|
|
294
|
+
"action": "omit",
|
|
295
|
+
"reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
|
|
296
|
+
"decided_by": "claude-code (code evidence)",
|
|
297
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"path": "mkdocs.yml",
|
|
301
|
+
"action": "omit",
|
|
302
|
+
"reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
|
|
303
|
+
"decided_by": "claude-code (code evidence)",
|
|
304
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"path": "api-specs/openapi.yaml",
|
|
308
|
+
"action": "omit",
|
|
309
|
+
"reason": "The package serves no HTTP routes. It is an HTTP client library; its published surface is the npm export described by ediscovery-sdk.",
|
|
310
|
+
"decided_by": "claude-code (code evidence)",
|
|
311
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"path": "SECURITY.md",
|
|
315
|
+
"action": "omit",
|
|
316
|
+
"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.",
|
|
317
|
+
"decided_by": "claude-code (code evidence)",
|
|
318
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"path": "CONTRIBUTING.md",
|
|
322
|
+
"action": "omit",
|
|
323
|
+
"reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
|
|
324
|
+
"decided_by": "claude-code (code evidence)",
|
|
325
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"path": "CHANGELOG.md",
|
|
329
|
+
"action": "omit",
|
|
330
|
+
"reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
|
|
331
|
+
"decided_by": "claude-code (code evidence)",
|
|
332
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"path": "CTO_CHECKLIST.yml",
|
|
336
|
+
"action": "omit",
|
|
337
|
+
"reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
|
|
338
|
+
"decided_by": "claude-code (code evidence)",
|
|
339
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
343
|
+
"action": "omit",
|
|
344
|
+
"reason": "Omitted together with CTO_CHECKLIST.yml.",
|
|
345
|
+
"decided_by": "claude-code (code evidence)",
|
|
346
|
+
"decided_at": "2026-11-12T05:59:56Z"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"template_roots": {
|
|
350
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
351
|
+
},
|
|
352
|
+
"contract_index_path": "docs/architecture.md",
|
|
353
|
+
"repo_skills_root": ".sdd/skills",
|
|
354
|
+
"monorepo_package": {
|
|
355
|
+
"package_path": "packages/@webex/internal-plugin-ediscovery",
|
|
356
|
+
"root_manifest_path": "../../../.sdd/manifest.json",
|
|
357
|
+
"templates_root_path": "../../../.sdd/templates/repo-standards"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"tooling": {
|
|
361
|
+
"sdlc_skills": {
|
|
362
|
+
"source_ref": "repo-annotation@2.3.1"
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"coverage_ratchet": {
|
|
366
|
+
"enabled": true,
|
|
367
|
+
"waivers": []
|
|
368
|
+
},
|
|
369
|
+
"substrate": {
|
|
370
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
371
|
+
"consumed": [
|
|
372
|
+
"@webex/eslint-config-legacy via .eslintrc.js",
|
|
373
|
+
"@webex/babel-config-legacy via babel.config.js",
|
|
374
|
+
"@webex/jest-config-legacy via jest.config.js",
|
|
375
|
+
"@webex/legacy-tools build and test runner via package.json",
|
|
376
|
+
"package README.md (context only)",
|
|
377
|
+
"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)"
|
|
378
|
+
],
|
|
379
|
+
"compliance_tier": "baseline"
|
|
380
|
+
},
|
|
381
|
+
"section_profiles": {
|
|
382
|
+
"repo": {
|
|
383
|
+
"owns_datastore": false,
|
|
384
|
+
"holds_client_state": true,
|
|
385
|
+
"components_interact": true,
|
|
386
|
+
"domain_data_across_components": true,
|
|
387
|
+
"caches_data": true,
|
|
388
|
+
"observability_convention": true,
|
|
389
|
+
"deploys_to_infra": false,
|
|
390
|
+
"shared_base_libs": true,
|
|
391
|
+
"is_monorepo": false,
|
|
392
|
+
"multi_platform": false,
|
|
393
|
+
"published_package": true,
|
|
394
|
+
"embedded_in_host": false,
|
|
395
|
+
"cross_repo_deps_material": true,
|
|
396
|
+
"security_arch_warranted": true,
|
|
397
|
+
"exposes_commands_or_artifacts": true
|
|
398
|
+
},
|
|
399
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
400
|
+
"resolved_at": "2026-11-12T05:59:56Z"
|
|
401
|
+
}
|
|
402
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
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-12T06:44:53Z
|
|
7
|
+
validation_status: pass
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
Package-scoped SDD entry for `@webex/internal-plugin-ediscovery`, the internal `ediscovery` plugin of
|
|
13
|
+
the SDK (compliance report calls, report content and container reads, and the payload transforms that
|
|
14
|
+
encrypt report requests and decrypt reports, activities, and containers). This file orients agents. The
|
|
15
|
+
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, or config keys. Verify them from this package's source and
|
|
23
|
+
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) (eDiscovery 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 SDK surface, so its contract artifact is `package.json` plus the `src/index.js` entry. It
|
|
39
|
+
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 every command from the
|
|
44
|
+
workspace root: `yarn` to install, and `yarn workspace @webex/internal-plugin-ediscovery <script>` for the package scripts below, which `package.json` defines.
|
|
45
|
+
Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the workspace root; see
|
|
46
|
+
[Prebuilding](../../../CONTRIBUTING.md#prebuilding).
|
|
47
|
+
|
|
48
|
+
| Task | Command |
|
|
49
|
+
| ---------------------- | ------- |
|
|
50
|
+
| Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command) |
|
|
51
|
+
| Start dev environment | N/A — library package with no start script in `package.json` |
|
|
52
|
+
| Run tests | `yarn workspace @webex/internal-plugin-ediscovery test:unit` (jest) after `build:src` |
|
|
53
|
+
| Run linters | `yarn workspace @webex/internal-plugin-ediscovery test:style` |
|
|
54
|
+
| Build/release artifact | `yarn workspace @webex/internal-plugin-ediscovery build` (runs `build:src`) |
|
|
55
|
+
| Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
|
|
56
|
+
|
|
57
|
+
No package script runs `test/integration/spec/ediscovery.js`; it needs a compliance test user and the
|
|
58
|
+
live eDiscovery service. `test:browser:broken` runs karma over the same live-service spec and is named
|
|
59
|
+
broken; it is not a routine verification command. The aggregate `test` chains `test:integration` and
|
|
60
|
+
`test:browser`, which this package does not define, so it fails after the unit run.
|
|
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-ediscovery`.
|
|
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; JavaScript sources | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=18`; the workspace root `package.json` `engines.node` reads `18.x` |
|
|
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, sinon, and `@webex/test-helper-mock-webex` | sinon `^9.2.4` |
|
|
90
|
+
| Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
|
|
91
|
+
|
|
92
|
+
### Project Map
|
|
93
|
+
|
|
94
|
+
- `src/index.js`: imports the encryption and conversation plugins, registers internal plugin
|
|
95
|
+
`ediscovery` with its config and seven payload predicates and transforms, and re-exports the public
|
|
96
|
+
bindings.
|
|
97
|
+
- `src/ediscovery.js`: the `EDiscovery` plugin and its container cache. Spec: `src/docs/README.md`.
|
|
98
|
+
- `src/transforms.js`: report-request encryption and report, activity, and container decryption.
|
|
99
|
+
- `src/retry.js`: the retry helper used by every decryption call.
|
|
100
|
+
- `src/report-request.js`, `src/ediscovery-error.js`, `src/config.js`: `ReportRequest`, the error
|
|
101
|
+
classes, and the default options.
|
|
102
|
+
- `test/unit/spec/report.js`, `test/unit/spec/content.js`, `test/unit/spec/transforms.js`: unit specs
|
|
103
|
+
run by `test:unit` (122 cases); they import the package by name, which loads `dist/`.
|
|
104
|
+
- `test/integration/spec/ediscovery.js`: live-service cases with no package script.
|
|
105
|
+
- `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
|
|
106
|
+
- `dist/`: generated build output. Never edit by hand.
|
|
107
|
+
- `README.md`: retained npm page, context only. It is not the behavioral authority; see
|
|
108
|
+
[ADR-0001](docs/adr/0001-retain-product-readme.md).
|
|
109
|
+
|
|
110
|
+
### Critical Constraints
|
|
111
|
+
|
|
112
|
+
- The payload predicates in `src/index.js` match by field name on every request and response of the
|
|
113
|
+
webex instance. A new predicate on a generic field transforms other plugins' payloads too.
|
|
114
|
+
- Decryption failures must stay on the payload as `error` or `warning`; the consuming downloader relies
|
|
115
|
+
on them, and the response must still resolve.
|
|
116
|
+
- Activity decryption looks containers up through `getContentContainerByContainerId`, which reads the
|
|
117
|
+
container cache first; keep that path.
|
|
118
|
+
- Content is decrypted on behalf of the container's `onBehalfOfUser`; `encryptedTextKeyValues` is not.
|
|
119
|
+
- `createReport` must keep mapping service error code 14400001 to `InvalidEmailAddressError`.
|
|
120
|
+
- Every paging option must stay in the `oneFlight` keys of the content methods.
|
|
121
|
+
- `reportId` may be a UUID or a report URL on the three content methods; keep both forms.
|
|
122
|
+
|
|
123
|
+
## 4. Testing Workflow
|
|
124
|
+
|
|
125
|
+
Run checks in this order:
|
|
126
|
+
|
|
127
|
+
1. `yarn workspace @webex/internal-plugin-ediscovery build:src`
|
|
128
|
+
2. `yarn workspace @webex/internal-plugin-ediscovery test:unit`
|
|
129
|
+
3. `yarn workspace @webex/internal-plugin-ediscovery test:style`
|
|
130
|
+
|
|
131
|
+
Step 1 matters: the unit specs import `@webex/internal-plugin-ediscovery` by name, which resolves `main`
|
|
132
|
+
(`dist/index.js`), so a stale `dist/` makes results meaningless.
|
|
133
|
+
|
|
134
|
+
Step 3 does not lint `src/ediscovery.js`: the shared `@webex/eslint-config-legacy` ignore list names
|
|
135
|
+
every `ediscovery.js` (its "Files with decorator" entries), and `src/index.js` disables every rule at its
|
|
136
|
+
top. Review both files by hand.
|
|
137
|
+
|
|
138
|
+
Testing rules:
|
|
139
|
+
|
|
140
|
+
- Add or update unit cases for every behavior change. Registration, the array transforms, container
|
|
141
|
+
decryption, and `requestWithRetries` have no unit case today.
|
|
142
|
+
- Return or await every promise in a case; the `postAuditLog` cases do not, so their assertions never
|
|
143
|
+
run.
|
|
144
|
+
- Cover failure paths and edge cases, not only happy paths.
|
|
145
|
+
- Do not remove tests to make CI pass.
|
|
146
|
+
- Use `sinon.useFakeTimers()` when a case depends on time, such as retry delays.
|
|
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 `root: true`.
|
|
155
|
+
- Prefer small functions over large procedural blocks.
|
|
156
|
+
- Make error handling explicit: request methods reject; transforms annotate the payload and resolve.
|
|
157
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
158
|
+
|
|
159
|
+
Pattern example:
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
Preferred:
|
|
163
|
+
- Wrap a new decryption in requestWithRetries with {onBehalfOf: container.onBehalfOfUser}.
|
|
164
|
+
- On a decryption failure, log with ctx.webex.logger and set activity.error (or warning for data loss).
|
|
165
|
+
- Add a case next to the matching describe block in test/unit/spec/transforms.js or content.js.
|
|
166
|
+
|
|
167
|
+
Avoid:
|
|
168
|
+
- Rejecting an inbound transform because one field failed.
|
|
169
|
+
- Adding a predicate on a field name other plugins also use.
|
|
170
|
+
- Treating README.md as the method list or as the way to run tests.
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## 6. Git Workflow
|
|
174
|
+
|
|
175
|
+
- Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
|
|
176
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
|
|
177
|
+
the workspace `CONTRIBUTING.md` requires for pull requests.
|
|
178
|
+
- Keep commits focused and reversible.
|
|
179
|
+
- Rebase on the target branch before opening a pull request.
|
|
180
|
+
|
|
181
|
+
PR checklist:
|
|
182
|
+
|
|
183
|
+
- What changed and why.
|
|
184
|
+
- Tests run and results.
|
|
185
|
+
- Risk and impact on report creation, content download, decryption annotations, and the container cache.
|
|
186
|
+
- Rollback approach.
|
|
187
|
+
|
|
188
|
+
## 7. Boundaries and Escalation
|
|
189
|
+
|
|
190
|
+
### Always
|
|
191
|
+
|
|
192
|
+
- Prefer existing patterns over introducing new architecture.
|
|
193
|
+
- Keep changes minimal for the requested scope.
|
|
194
|
+
- Call out assumptions and unknowns explicitly.
|
|
195
|
+
- Update the owning module spec in the same change that alters observable behavior.
|
|
196
|
+
|
|
197
|
+
### Ask First
|
|
198
|
+
|
|
199
|
+
- Adding dependencies.
|
|
200
|
+
- Adding, removing, or renaming a payload predicate or transform.
|
|
201
|
+
- Changing which report-request fields are encrypted, or sending another field in plaintext.
|
|
202
|
+
- Changing the retry statuses, counts, or delays.
|
|
203
|
+
- Bounding or changing the lifetime of the container cache.
|
|
204
|
+
- Changing the registered plugin name or the decorator order.
|
|
205
|
+
|
|
206
|
+
### Never
|
|
207
|
+
|
|
208
|
+
- Edit `dist/` by hand.
|
|
209
|
+
- Commit secrets, tokens, KMS keys, or decrypted compliance content, including in test fixtures.
|
|
210
|
+
- Log decrypted content, report search terms, or tokens.
|
|
211
|
+
- Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
|
|
212
|
+
templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
|
|
213
|
+
`.sdd/manifest.json` refers to them through `layout.monorepo_package`.
|
package/dist/ediscovery.js
CHANGED
|
@@ -593,7 +593,7 @@ var EDiscovery = _webexCore.WebexPlugin.extend((_dec = (0, _webexCore.waitForVal
|
|
|
593
593
|
}, _callee0);
|
|
594
594
|
}))();
|
|
595
595
|
},
|
|
596
|
-
version: "3.13.0-next.
|
|
596
|
+
version: "3.13.0-next.10"
|
|
597
597
|
}, (0, _applyDecoratedDescriptor2.default)(_obj, "createReport", [_dec], (0, _getOwnPropertyDescriptor.default)(_obj, "createReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getReport", [_dec2], (0, _getOwnPropertyDescriptor.default)(_obj, "getReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getReports", [_dec3], (0, _getOwnPropertyDescriptor.default)(_obj, "getReports"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "deleteReport", [_dec4], (0, _getOwnPropertyDescriptor.default)(_obj, "deleteReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "restartReport", [_dec5], (0, _getOwnPropertyDescriptor.default)(_obj, "restartReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getContent", [_dec6, _dec7], (0, _getOwnPropertyDescriptor.default)(_obj, "getContent"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getContentContainer", [_dec8, _dec9], (0, _getOwnPropertyDescriptor.default)(_obj, "getContentContainer"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getContentContainerByContainerId", [_dec0, _dec1], (0, _getOwnPropertyDescriptor.default)(_obj, "getContentContainerByContainerId"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getClientConfig", [_dec10], (0, _getOwnPropertyDescriptor.default)(_obj, "getClientConfig"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "postAuditLog", [_dec11], (0, _getOwnPropertyDescriptor.default)(_obj, "postAuditLog"), _obj), _obj));
|
|
598
598
|
var _default2 = exports.default = EDiscovery;
|
|
599
599
|
//# sourceMappingURL=ediscovery.js.map
|