@webex/plugin-people 3.13.0-next.4 → 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.
@@ -0,0 +1,400 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "repository": {
4
+ "name": "@webex/plugin-people",
5
+ "purpose": "Public plugin registered as webex.people that reads Webex person records from the Webex REST API (catalog service hydra). get(person) takes a uuid, a hydra person id, a person object, or the string me; me is fetched from people/me with concurrent calls sharing one request, and every other id goes through a batcher that turns concurrent lookups into one GET people/?id=...&showAllTypes=... of up to 10 ids per flush (100 ms quiet, 1500 ms at most). Ids are normalized locally: a uuid becomes the base64url hydra id ciscospark://us/PEOPLE/uuid without a request, so a uuid and its hydra id share one lookup. list(options) resolves an array of persons for an array of ids through the same batcher, or a Page of results for a query object such as email or displayName. Nothing is cached or persisted.",
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
+ "prebuild": {
19
+ "command": "yarn prebuild:modules",
20
+ "source_file": "../../../CONTRIBUTING.md",
21
+ "role": "other"
22
+ },
23
+ "compile": {
24
+ "command": "yarn build",
25
+ "source_file": "package.json",
26
+ "role": "compile",
27
+ "verified_at": "2026-11-12T16:05:42Z"
28
+ },
29
+ "build": {
30
+ "command": "yarn build:src",
31
+ "source_file": "package.json",
32
+ "role": "package",
33
+ "verified_at": "2026-11-12T16:05:58Z"
34
+ },
35
+ "unit-test": {
36
+ "command": "yarn test:unit",
37
+ "source_file": "package.json",
38
+ "role": "unit-test",
39
+ "verified_at": "2026-11-12T16:06:01Z"
40
+ },
41
+ "lint": {
42
+ "command": "yarn test:style",
43
+ "source_file": "package.json",
44
+ "role": "lint",
45
+ "verified_at": "2026-11-12T16:06:03Z"
46
+ },
47
+ "browser-test": {
48
+ "command": "yarn test:browser:broken",
49
+ "source_file": "package.json",
50
+ "role": "other"
51
+ },
52
+ "deploy": {
53
+ "command": "yarn deploy:npm",
54
+ "source_file": "package.json",
55
+ "role": "deploy"
56
+ }
57
+ },
58
+ "toolchain": [
59
+ {
60
+ "name": "node",
61
+ "version": ">=18",
62
+ "origin": "repo-config",
63
+ "source_file": "package.json"
64
+ },
65
+ {
66
+ "name": "node",
67
+ "version": "22.14",
68
+ "origin": "repo-config",
69
+ "source_file": "../../../AGENTS.md"
70
+ },
71
+ {
72
+ "name": "node",
73
+ "version": "lts/jod",
74
+ "origin": "repo-config",
75
+ "source_file": "../../../.nvmrc"
76
+ },
77
+ {
78
+ "name": "node",
79
+ "version": "18.x",
80
+ "origin": "repo-config",
81
+ "source_file": "../../../package.json"
82
+ },
83
+ {
84
+ "name": "yarn",
85
+ "version": "3.4.1",
86
+ "origin": "repo-config",
87
+ "source_file": "../../../package.json"
88
+ },
89
+ {
90
+ "name": "babel",
91
+ "version": "^7.17.10",
92
+ "origin": "repo-config",
93
+ "source_file": "package.json"
94
+ },
95
+ {
96
+ "name": "eslint",
97
+ "version": "^8.24.0",
98
+ "origin": "repo-config",
99
+ "source_file": "package.json"
100
+ },
101
+ {
102
+ "name": "prettier",
103
+ "version": "^2.7.1",
104
+ "origin": "repo-config",
105
+ "source_file": "package.json"
106
+ }
107
+ ],
108
+ "tests": {
109
+ "unit": {
110
+ "command_ref": "unit-test",
111
+ "dir": "test/unit/spec",
112
+ "framework": "jest"
113
+ }
114
+ },
115
+ "quality_gates": {
116
+ "code_coverage": {
117
+ "origin": "none",
118
+ "declared_by": "rarajes2@cisco.com via the bootstrap questionnaire (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)"
119
+ }
120
+ },
121
+ "coverage_status_definitions": {
122
+ "specced": ">=80% public surface specced, drift <5% - spec is authoritative",
123
+ "partial": "40-80% specced - spec is a hint, cross-check code",
124
+ "untracked": "<40% specced - code is the source of truth"
125
+ },
126
+ "spec_source_policy": {
127
+ "mode": "keep-separate",
128
+ "migrated_source_disposition": "retain",
129
+ "disposition_decided_by": "rarajes2@cisco.com",
130
+ "disposition_decided_at": "2026-11-12T16:08:00Z",
131
+ "decided_by": "rarajes2@cisco.com",
132
+ "decided_at": "2026-11-12T16:08:00Z",
133
+ "decision_record": "docs/adr/0001-retain-product-readme.md"
134
+ },
135
+ "spec_sources": [
136
+ {
137
+ "path": "README.md",
138
+ "scope": "repo",
139
+ "role": "reference-only",
140
+ "canonical": false,
141
+ "use_by_agents": "context-only",
142
+ "post_migration_action": "retain",
143
+ "deletion_status": "not-applicable",
144
+ "notes": "npm page, kept unchanged under keep-separate. It repeats its Install and Usage sections, and its one example, webex.people.get(id), matches the code; it documents nothing about get('me'), list, batching, id normalization, or the config. See docs/adr/0001-retain-product-readme.md."
145
+ }
146
+ ],
147
+ "modules": [
148
+ {
149
+ "path": "src",
150
+ "canonical_spec": "src/docs/README.md",
151
+ "coverage_status": "Partial",
152
+ "coverage_evidence": "Field coverage 100% (13/13) assessed 2026-11-12 by the generator; critical field coverage 7/7. test:unit runs test/unit/spec/people.js and test/unit/spec/people-batcher.js, 5 passing under Node 22.14 after build:src on 2026-11-12; they cover the get guard (MOD-004, INV-004), the request fingerprint (MOD-008, tautologically), the submitHttpRequest options for one id (MOD-009), and handleHttpSuccess dispatch with stubbed item handlers (MOD-010). MOD-001, MOD-002, MOD-005, MOD-006, MOD-007, MOD-011, INV-001, INV-002 (beyond the tautological case), and INV-003 have no unit case. The integration spec test/integration/spec/people.js holds 13 live-service cases (1 skipped) for get, list, batching, and inferPersonIdFromUuid, but no package script runs it: test:browser:broken bundles nothing (isbot parse error, 0 tests, exit 0) and test:integration does not exist. build:src, build, and test:style exit 0 (3 warnings, 0 errors before this spec existed). No characterization baseline exists; the module remains Partial pending independent validation, unit cases for the untested paths, a characterization baseline, and promotion review.",
153
+ "last_assessed": "2026-11-12",
154
+ "contracts": {
155
+ "provides": [
156
+ "people-public-sdk"
157
+ ],
158
+ "requires": [
159
+ "hydra-people-http",
160
+ "webex-core-plugin-host",
161
+ "webex-core-batcher",
162
+ "webex-core-page",
163
+ "common-base64",
164
+ "common-one-flight"
165
+ ]
166
+ },
167
+ "section_profile": {
168
+ "has_tiers": false,
169
+ "has_ui": false,
170
+ "crosses_service_boundaries": true,
171
+ "holds_client_state": false,
172
+ "enforces_domain_rules": true,
173
+ "is_concurrent_async": true,
174
+ "owns_persistence": false,
175
+ "stateful_transitions": false,
176
+ "exposes_wire_protocol": true,
177
+ "ui_multi_screen": false,
178
+ "large_data_model": false,
179
+ "returns_caller_errors": true,
180
+ "module_specific_conventions": true,
181
+ "published_package": true,
182
+ "embedded_in_host": false,
183
+ "has_design_tradeoff": true,
184
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
185
+ "resolved_at": "2026-11-12T16:12:00Z",
186
+ "has_submodules": false,
187
+ "has_submodules_computed_by": "scripts/module_tree.py",
188
+ "has_submodules_computed_at": "2026-11-12T16:12:00Z"
189
+ }
190
+ }
191
+ ],
192
+ "contract_catalog": {
193
+ "index_path": "docs/architecture.md",
194
+ "definitions": {
195
+ "people-public-sdk": {
196
+ "kind": "sdk",
197
+ "publication": "published",
198
+ "source_kind": "repository-path",
199
+ "source": "package.json",
200
+ "summary": "Published npm package (public plugin). main is dist/index.js and devMain is src/index.js; no type declarations are published. Importing it registers People as public plugin 'people' with the people config from src/config.js; the first registration of the name wins. The entry exports only the default People class. webex.people exposes get(person), list(options), inferPersonIdFromUuid(id) (marked @private in its JSDoc), the batcher child, and the underscore-prefixed _getMe; specified in src/docs/README.md."
201
+ },
202
+ "hydra-people-http": {
203
+ "kind": "http",
204
+ "publication": "internal",
205
+ "source_kind": "external",
206
+ "source": "Webex REST API people resource (catalog service name hydra, reached through service: 'hydra' in src/people.js and src/people-batcher.js; route definitions are not in this repository)",
207
+ "summary": "GET /people/?id=<comma-joined ids>&showAllTypes=<boolean> answering {items: [person], notFoundIds?: [id]}; GET /people with the caller's query object answering a paged {items} with Link headers; GET /people/me answering the current person. Person ids are base64url of ciscospark://us/PEOPLE/<uuid>."
208
+ },
209
+ "webex-core-plugin-host": {
210
+ "kind": "sdk",
211
+ "publication": "published",
212
+ "source_kind": "external",
213
+ "source": "@webex/webex-core (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-008, MOD-013, MOD-044)",
214
+ "summary": "registerPlugin keys a public plugin by its raw name (people, first registration wins) and merges its config into the defaults; WebexPlugin supplies webex, children, namespaced config (config.people for namespace People), logger, and request."
215
+ },
216
+ "webex-core-batcher": {
217
+ "kind": "sdk",
218
+ "publication": "published",
219
+ "source_kind": "external",
220
+ "source": "@webex/webex-core Batcher (module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-050 to MOD-053; code consulted: packages/@webex/webex-core/src/lib/batcher.js)",
221
+ "summary": "Batcher.request de-duplicates by request fingerprint, queues the item as passed, flushes through a capped debounce read from the subclass namespace config (batcherWait, batcherMaxWait, batcherMaxCalls), maps responses back through getDeferredForResponse, and on an HTTP error without a request body rejects every queued deferred with the error."
222
+ },
223
+ "webex-core-page": {
224
+ "kind": "sdk",
225
+ "publication": "published",
226
+ "source_kind": "external",
227
+ "source": "@webex/webex-core Page (module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-054)",
228
+ "summary": "new Page(res, webex) stores the body items and parsed Link headers; next and previous request the linked URL and resolve a new Page; iteration yields items in order."
229
+ },
230
+ "common-base64": {
231
+ "kind": "sdk",
232
+ "publication": "published",
233
+ "source_kind": "external",
234
+ "source": "@webex/common (workspace package; module spec consulted: packages/@webex/common/src/docs/README.md MOD-006; code consulted: packages/@webex/common/src/base64.js)",
235
+ "summary": "base64.encode and base64.decode are base64url over urlsafe-base64; hydra ids for PEOPLE always use cluster us (common MOD-006, which constructHydraId implements and this package re-implements inline)."
236
+ },
237
+ "common-one-flight": {
238
+ "kind": "sdk",
239
+ "publication": "published",
240
+ "source_kind": "external",
241
+ "source": "@webex/common (workspace package; module spec consulted: packages/@webex/common/src/docs/README.md MOD-002)",
242
+ "summary": "Bare @oneFlight keys a flight per instance by method name, returns the in-flight promise to concurrent callers, and drops the flight when it settles, so nothing is cached."
243
+ }
244
+ }
245
+ },
246
+ "spec_policy": {
247
+ "require_what_and_why": true,
248
+ "require_provenance": true,
249
+ "protected_specs": [
250
+ "src/docs/README.md"
251
+ ]
252
+ },
253
+ "validation": {
254
+ "generator_runtime": "claude-code",
255
+ "generator_model": "claude-opus-5-5",
256
+ "generator_runtime_source": "host-metadata",
257
+ "source_commit": "a83f8c3185ca0eff5ad15acd5986dc63dc383328",
258
+ "minimum_independence": "different-runtime",
259
+ "blocking_severities": [
260
+ "Blocking"
261
+ ],
262
+ "validator_runtime": "01a1d08c-f7aa-7ed2-8862-52a4982c5f3f",
263
+ "validator_runtime_source": "invocation-input",
264
+ "runtime_fallback_tier": "different-runtime"
265
+ },
266
+ "layout": {
267
+ "sdd_root": ".sdd",
268
+ "docs_root": "docs",
269
+ "agent_entry_path": "AGENTS.md",
270
+ "standing_docs_root": "docs",
271
+ "spec_index_path": "docs/specs/README.md",
272
+ "module_docs_strategy": "source-local",
273
+ "module_docs_relative_path": "docs/README.md",
274
+ "module_docs_decision": {
275
+ "basis": "repo-standards-default",
276
+ "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/.",
277
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
278
+ "decided_at": "2026-11-12T16:12:00Z"
279
+ },
280
+ "repo_context_decision": {
281
+ "path": ".repo-context.json",
282
+ "schema_path": "schemas/repo-context.schema.json",
283
+ "action": "create",
284
+ "schema_action": "create",
285
+ "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.",
286
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
287
+ "decided_at": "2026-11-12T16:12:00Z"
288
+ },
289
+ "artifact_decisions": [
290
+ {
291
+ "path": "docs/service.md",
292
+ "action": "omit",
293
+ "reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
294
+ "decided_by": "claude-code (code evidence)",
295
+ "decided_at": "2026-11-12T16:12:00Z"
296
+ },
297
+ {
298
+ "path": "mkdocs.yml",
299
+ "action": "omit",
300
+ "reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
301
+ "decided_by": "claude-code (code evidence)",
302
+ "decided_at": "2026-11-12T16:12:00Z"
303
+ },
304
+ {
305
+ "path": "api-specs/openapi.yaml",
306
+ "action": "omit",
307
+ "reason": "The package serves no HTTP routes. It is a client of the Webex REST API people resource; its published surface is the npm export described by people-public-sdk.",
308
+ "decided_by": "claude-code (code evidence)",
309
+ "decided_at": "2026-11-12T16:12:00Z"
310
+ },
311
+ {
312
+ "path": "SECURITY.md",
313
+ "action": "omit",
314
+ "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.",
315
+ "decided_by": "claude-code (code evidence)",
316
+ "decided_at": "2026-11-12T16:12:00Z"
317
+ },
318
+ {
319
+ "path": "CONTRIBUTING.md",
320
+ "action": "omit",
321
+ "reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
322
+ "decided_by": "claude-code (code evidence)",
323
+ "decided_at": "2026-11-12T16:12:00Z"
324
+ },
325
+ {
326
+ "path": "CHANGELOG.md",
327
+ "action": "omit",
328
+ "reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
329
+ "decided_by": "claude-code (code evidence)",
330
+ "decided_at": "2026-11-12T16:12:00Z"
331
+ },
332
+ {
333
+ "path": "CTO_CHECKLIST.yml",
334
+ "action": "omit",
335
+ "reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
336
+ "decided_by": "claude-code (code evidence)",
337
+ "decided_at": "2026-11-12T16:12:00Z"
338
+ },
339
+ {
340
+ "path": "schemas/cto-checklist.schema.json",
341
+ "action": "omit",
342
+ "reason": "Omitted together with CTO_CHECKLIST.yml.",
343
+ "decided_by": "claude-code (code evidence)",
344
+ "decided_at": "2026-11-12T16:12:00Z"
345
+ }
346
+ ],
347
+ "template_roots": {
348
+ "canonical": ".sdd/templates/repo-standards"
349
+ },
350
+ "contract_index_path": "docs/architecture.md",
351
+ "repo_skills_root": ".sdd/skills",
352
+ "monorepo_package": {
353
+ "package_path": "packages/@webex/plugin-people",
354
+ "root_manifest_path": "../../../.sdd/manifest.json",
355
+ "templates_root_path": "../../../.sdd/templates/repo-standards"
356
+ }
357
+ },
358
+ "tooling": {
359
+ "sdlc_skills": {
360
+ "source_ref": "repo-annotation@2.3.1"
361
+ }
362
+ },
363
+ "coverage_ratchet": {
364
+ "enabled": true,
365
+ "waivers": []
366
+ },
367
+ "substrate": {
368
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
369
+ "consumed": [
370
+ "@webex/eslint-config-legacy via .eslintrc.js",
371
+ "@webex/babel-config-legacy via babel.config.js",
372
+ "@webex/jest-config-legacy via jest.config.js",
373
+ "@webex/legacy-tools build and test runner via package.json",
374
+ "package README.md (context only)",
375
+ "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)"
376
+ ],
377
+ "compliance_tier": "baseline"
378
+ },
379
+ "section_profiles": {
380
+ "repo": {
381
+ "owns_datastore": false,
382
+ "holds_client_state": false,
383
+ "components_interact": true,
384
+ "domain_data_across_components": true,
385
+ "caches_data": false,
386
+ "observability_convention": false,
387
+ "deploys_to_infra": false,
388
+ "shared_base_libs": true,
389
+ "is_monorepo": false,
390
+ "multi_platform": false,
391
+ "published_package": true,
392
+ "embedded_in_host": false,
393
+ "cross_repo_deps_material": true,
394
+ "security_arch_warranted": true,
395
+ "exposes_commands_or_artifacts": true
396
+ },
397
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
398
+ "resolved_at": "2026-11-12T16:12:00Z"
399
+ }
400
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,210 @@
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-12T16:20:06Z
7
+ validation_status: pass-with-warnings
8
+ -->
9
+
10
+ # AI Agent Instructions
11
+
12
+ Package-scoped SDD entry for `@webex/plugin-people`, the public `people` plugin of the SDK (it reads
13
+ Webex person records by id, for the current user, or by filter, batching lookups by id into one
14
+ request). This file orients agents. The monorepo root `AGENTS.md` governs workspace-wide setup.
15
+
16
+ ## Working Method
17
+
18
+ - Read the relevant package files before editing. Do not edit blind.
19
+ - Understand the task and affected surfaces before writing code.
20
+ - Prefer focused edits over rewriting whole files.
21
+ - Do not invent commands, paths, exports, method names, or request paths. Verify them from this
22
+ package's source.
23
+ - Test or validate before declaring done.
24
+ - Keep output concise. If something is uncertain, say so instead of guessing.
25
+
26
+ ## Canonical Repository Documentation
27
+
28
+ Before changing code or documentation, start with:
29
+
30
+ - [`docs/index.md`](docs/index.md) for package documentation navigation;
31
+ - [`docs/architecture.md`](docs/architecture.md) for package boundaries and interactions;
32
+ - [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
33
+ - the module specification at [`src/docs/README.md`](src/docs/README.md) (People plugin); and
34
+ - [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
35
+
36
+ Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
37
+ publishes a public SDK surface, so its contract artifact is `package.json` plus the `src/index.js`
38
+ entry. It serves no HTTP, so no OpenAPI applies.
39
+
40
+ ## 1. Commands (Run First)
41
+
42
+ Use only documented commands. Do not invent alternatives when a command is missing. Run `yarn` and
43
+ `yarn prebuild:modules` at the workspace root, and the package scripts below from this package
44
+ directory, `packages/@webex/plugin-people`, where `package.json` defines them. From the workspace root, `yarn workspace @webex/plugin-people <script>` runs the same script.
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 test:unit` (after `build:src`; the specs import the package by name, so they test `dist/`) |
51
+ | Run linters | `yarn test:style` |
52
+ | Build/release artifact | `yarn 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 build` runs `yarn build:src` and produces the same output; the package emits no type
56
+ declarations.
57
+
58
+ Do not use the aggregate `test` script: after lint and unit tests it calls `test:integration`, which
59
+ this package does not define, and exits 1. `yarn test:browser:broken` runs `test/integration/spec`
60
+ through karma but verifies nothing today; see [Getting started](docs/getting-started.md#tests) for its
61
+ state.
62
+
63
+ If a required command is unknown, stop and ask for the exact command.
64
+
65
+ ## 2. Agent Persona and Scope
66
+
67
+ You are the Webex JS SDK engineering assistant for `@webex/plugin-people`.
68
+
69
+ Primary outcomes:
70
+
71
+ - Deliver production-safe changes with build, unit tests, and lint passing.
72
+ - Preserve existing behavior unless a change request explicitly requires a behavior change.
73
+ - Keep docs and configuration aligned with code changes.
74
+
75
+ Definition of done:
76
+
77
+ 1. Requested change is implemented.
78
+ 2. Build, unit tests, and lint pass locally.
79
+ 3. Updated docs cover new behavior, including the owning module spec.
80
+ 4. PR summary includes risks and rollback notes.
81
+
82
+ ## 3. Repository Knowledge
83
+
84
+ ### Tech Stack
85
+
86
+ | Area | Tooling | Version |
87
+ | ---------------- | ------- | ------- |
88
+ | 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` |
89
+ | Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
90
+ | Test framework | jest through `webex-legacy-tools` and `@webex/jest-config-legacy`, with sinon, `@webex/test-helper-chai`, and `@webex/test-helper-mock-webex` | — |
91
+ | Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
92
+
93
+ ### Project Map
94
+
95
+ - `src/index.js`: registers public plugin `people` with its config, and exports `People` (default
96
+ only).
97
+ - `src/people.js`: `People` — `get`, `list`, `inferPersonIdFromUuid`, the `oneFlight` `_getMe`, and
98
+ the `batcher` child.
99
+ - `src/people-batcher.js`: `PersonUUIDRequestBatcher` — groups lookups by id into one
100
+ `GET people/?id=` and maps the response back to each caller.
101
+ - `src/config.js`: the `people` config (batcher timings and `showAllTypes`).
102
+ - `test/unit/spec/`: unit cases (`people.js`, `people-batcher.js`) run by `test:unit`.
103
+ - `test/integration/spec/people.js`: live-service cases that no script runs today.
104
+ - `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
105
+ - `dist/`: generated build output. Never edit by hand.
106
+ - `README.md`: retained npm page, context only; it shows only `get(id)`; see
107
+ [ADR-0001](docs/adr/0001-retain-product-readme.md).
108
+ - Spec for every file under `src/`: `src/docs/README.md`.
109
+
110
+ ### Critical Constraints
111
+
112
+ - The plugin is `webex.people`; `webex`, `webex-node`, and `@webex/recipe-private-web-client` register
113
+ it by import, and `@webex/common`, `@webex/plugin-meetings`, and `@webex/calling` call it.
114
+ - Every lookup by id goes through the batcher, so a burst of `get` calls sends one request per flush
115
+ (`INV-001` in the module spec).
116
+ - A uuid and its hydra id must stay one lookup key; the batcher matches responses by hydra id
117
+ (`INV-002`).
118
+ - `list` with an array resolves a plain array; `list` with a query object resolves a `Page` whose
119
+ `items` consumers read.
120
+ - The batcher calls `webex.people.inferPersonIdFromUuid`, so the plugin must stay mounted as `people`.
121
+
122
+ ## 4. Testing Workflow
123
+
124
+ Run checks in this order, from the package directory:
125
+
126
+ 1. `yarn build:src`
127
+ 2. `yarn test:unit`
128
+ 3. `yarn test:style`
129
+
130
+ Run `yarn prebuild:modules` once on a fresh checkout so `webex-legacy-tools` and the sibling packages'
131
+ `dist/` exist.
132
+
133
+ Testing rules:
134
+
135
+ - Add or update cases in `test/unit/spec/people.js` or `test/unit/spec/people-batcher.js` for every
136
+ behavior you change; the integration spec does not run, so it does not count as coverage.
137
+ - Use `@webex/test-helper-mock-webex` with sinon stubs for `webex.request`, and assert with
138
+ `@webex/test-helper-chai`; use `sinon.useFakeTimers()` to drive batcher flushes.
139
+ - Use `assert.calledOnceWithExactly` for call arguments, and parametrize when more than three cases are
140
+ alike.
141
+ - Cover failure paths and edge cases, not only happy paths.
142
+ - Do not remove tests to make CI pass.
143
+
144
+ No coverage gate applies to this package; do not infer one.
145
+
146
+ ## 5. Code Style and Patterns
147
+
148
+ Coding expectations:
149
+
150
+ - Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
151
+ `root: true` and extends the legacy config.
152
+ - Prefer small functions over large procedural blocks.
153
+ - Make error handling explicit; reject guard failures before touching the batcher or the network.
154
+ - Keep public interfaces stable unless a breaking change is requested.
155
+
156
+ Pattern example:
157
+
158
+ ```text
159
+ Preferred:
160
+ - Look up ids through this.batcher.request so duplicates collapse and bursts batch.
161
+ - Normalize ids with inferPersonIdFromUuid so request and response fingerprints match.
162
+ - Guard arguments with Promise.reject(new Error('...')) before any request.
163
+
164
+ Avoid:
165
+ - Calling webex.request for people/?id= directly.
166
+ - Changing the ciscospark://us/PEOPLE/ prefix or the fingerprint functions independently.
167
+ - Treating README.md as the full usage reference.
168
+ ```
169
+
170
+ ## 6. Git Workflow
171
+
172
+ - Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
173
+ - Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
174
+ the workspace `CONTRIBUTING.md` requires for pull requests.
175
+ - Keep commits focused and reversible.
176
+ - Rebase on the target branch before opening a pull request.
177
+
178
+ PR checklist:
179
+
180
+ - What changed and why.
181
+ - Tests run and results.
182
+ - Risk and impact on applications that call `webex.people` and on `@webex/common`,
183
+ `@webex/plugin-meetings`, and `@webex/calling`.
184
+ - Rollback approach.
185
+
186
+ ## 7. Boundaries and Escalation
187
+
188
+ ### Always
189
+
190
+ - Prefer existing patterns over introducing new architecture.
191
+ - Keep changes minimal for the requested scope.
192
+ - Call out assumptions and unknowns explicitly.
193
+ - Update the owning module spec in the same change that alters observable behavior.
194
+
195
+ ### Ask First
196
+
197
+ - Adding dependencies, or removing a declared one (including the unused `@webex/internal-plugin-mercury`).
198
+ - Renaming or removing a method, the `batcher` child, or the registered plugin name.
199
+ - Changing a request path or query, the id format, the fingerprints, the batcher timings, or
200
+ `showAllTypes`.
201
+ - Changing what `get` or `list` resolves or how a not-found id is reported.
202
+
203
+ ### Never
204
+
205
+ - Edit `dist/` by hand.
206
+ - Commit secrets, tokens, or credentials, including in test fixtures.
207
+ - Log person ids, emails, or display names.
208
+ - Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
209
+ templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
210
+ `.sdd/manifest.json` refers to them through `layout.monorepo_package`.
package/dist/people.js CHANGED
@@ -194,7 +194,7 @@ var People = _webexCore.WebexPlugin.extend((_obj = {
194
194
  return res.body;
195
195
  });
196
196
  },
197
- version: "3.13.0-next.4"
197
+ version: "3.13.0-next.5"
198
198
  }, (0, _applyDecoratedDescriptor2.default)(_obj, "_getMe", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, "_getMe"), _obj), _obj));
199
199
  var _default = exports.default = People;
200
200
  //# sourceMappingURL=people.js.map