@webex/internal-plugin-calendar 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.
@@ -0,0 +1,423 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "repository": {
4
+ "name": "@webex/internal-plugin-calendar",
5
+ "purpose": "Internal calendar plugin registered as webex.internal.calendar. It registers the device and Mercury and keeps an in-memory meeting collection current from Mercury calendar create, update, and delete events; lists and syncs meetings for a date window (fetching participants a listing omits); reads notes, participants, and scheduler data; creates, updates, and deletes calendar events with payloads encrypted under a KMS key it creates on first use; and runs free-busy lookups that are sent over HTTPS and answered over Mercury. Its inbound payload transformer decrypts meeting reads through the conversation plugin's decryptTextProp transform.",
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-calendar build:src",
20
+ "source_file": "package.json",
21
+ "role": "compile"
22
+ },
23
+ "build": {
24
+ "command": "yarn workspace @webex/internal-plugin-calendar build",
25
+ "source_file": "package.json",
26
+ "role": "package"
27
+ },
28
+ "unit-test": {
29
+ "command": "yarn workspace @webex/internal-plugin-calendar test:unit",
30
+ "source_file": "package.json",
31
+ "role": "unit-test"
32
+ },
33
+ "integration-test": {
34
+ "command": "yarn workspace @webex/internal-plugin-calendar test:browser",
35
+ "source_file": "package.json",
36
+ "role": "integration-test"
37
+ },
38
+ "lint": {
39
+ "command": "yarn workspace @webex/internal-plugin-calendar test:style",
40
+ "source_file": "package.json",
41
+ "role": "lint"
42
+ },
43
+ "deploy": {
44
+ "command": "yarn workspace @webex/internal-plugin-calendar 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
+ "integration": {
112
+ "command_ref": "integration-test",
113
+ "dir": "test/integration/spec",
114
+ "framework": "karma (webex-legacy-tools --integration --runner karma; runs the unit and integration specs in browsers)",
115
+ "external_deps": [
116
+ "live Webex services (calendar, KMS, Mercury, device registration)",
117
+ "test-user credentials read by @webex/test-helper-test-users",
118
+ "a karma browser"
119
+ ]
120
+ }
121
+ },
122
+ "quality_gates": {
123
+ "code_coverage": {
124
+ "origin": "none",
125
+ "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)"
126
+ }
127
+ },
128
+ "coverage_status_definitions": {
129
+ "specced": ">=80% public surface specced, drift <5% - spec is authoritative",
130
+ "partial": "40-80% specced - spec is a hint, cross-check code",
131
+ "untracked": "<40% specced - code is the source of truth"
132
+ },
133
+ "spec_source_policy": {
134
+ "mode": "keep-separate",
135
+ "migrated_source_disposition": "retain",
136
+ "disposition_decided_by": "rarajes2@cisco.com",
137
+ "disposition_decided_at": "2026-11-12T07:53:58Z",
138
+ "decided_by": "rarajes2@cisco.com",
139
+ "decided_at": "2026-11-12T07:53:58Z",
140
+ "decision_record": "docs/adr/0001-retain-product-readme.md"
141
+ },
142
+ "spec_sources": [
143
+ {
144
+ "path": "README.md",
145
+ "scope": "repo",
146
+ "role": "reference-only",
147
+ "canonical": false,
148
+ "use_by_agents": "context-only",
149
+ "post_migration_action": "retain",
150
+ "deletion_status": "not-applicable",
151
+ "notes": "npm usage page, kept unchanged under keep-separate. Its usage block is the placeholder webex.internal.calendar.WHATEVER and it states no method, event, or error; see docs/adr/0001-retain-product-readme.md."
152
+ }
153
+ ],
154
+ "modules": [
155
+ {
156
+ "path": "src",
157
+ "canonical_spec": "src/docs/README.md",
158
+ "coverage_status": "Partial",
159
+ "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: 28 unit cases in four suites pass under Node 22.14 after build:src and cover register, unregister, the create, update, and delete events, list, syncCalendar, notes, participants, scheduler data, event writes, and the helpers, but the payload transformer predicates and transforms, getFreeBusy and the free-busy event, getByType, processMeetingEvent, the participants fetch in list, attendee encryption, and the register failure paths have no case; test/integration/spec/calendar.js is describe.skip; and no characterization baseline exists. Independent validation passed with warnings on 2026-11-12 (runtime 01a1cec9-0225-7283-9212-f70c182f1a3e); package conformance has zero blocking findings, and one non-blocking warning records that the confirmed src/ module map was included in the approved file-touch plan.",
160
+ "last_assessed": "2026-11-12",
161
+ "contracts": {
162
+ "provides": [
163
+ "calendar-internal-sdk"
164
+ ],
165
+ "requires": [
166
+ "calendar-service-http",
167
+ "mercury-calendar-events",
168
+ "webex-core-plugin-host",
169
+ "internal-plugin-mercury",
170
+ "internal-plugin-device",
171
+ "internal-plugin-encryption",
172
+ "internal-plugin-conversation",
173
+ "webex-common-utilities"
174
+ ]
175
+ },
176
+ "section_profile": {
177
+ "has_tiers": false,
178
+ "has_ui": false,
179
+ "crosses_service_boundaries": true,
180
+ "holds_client_state": true,
181
+ "enforces_domain_rules": true,
182
+ "is_concurrent_async": true,
183
+ "owns_persistence": false,
184
+ "stateful_transitions": false,
185
+ "exposes_wire_protocol": true,
186
+ "ui_multi_screen": false,
187
+ "large_data_model": false,
188
+ "returns_caller_errors": true,
189
+ "module_specific_conventions": true,
190
+ "published_package": true,
191
+ "embedded_in_host": false,
192
+ "has_design_tradeoff": true,
193
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
194
+ "resolved_at": "2026-11-12T07:53:58Z",
195
+ "has_submodules": false,
196
+ "has_submodules_computed_by": "scripts/module_tree.py",
197
+ "has_submodules_computed_at": "2026-11-12T07:53:58Z"
198
+ }
199
+ }
200
+ ],
201
+ "contract_catalog": {
202
+ "index_path": "docs/architecture.md",
203
+ "definitions": {
204
+ "calendar-internal-sdk": {
205
+ "kind": "sdk",
206
+ "publication": "published",
207
+ "source_kind": "repository-path",
208
+ "source": "package.json",
209
+ "summary": "Published npm package (internal plugin; README says semver is not strictly followed). main is dist/index.js and devMain is src/index.js. Importing it imports the device, encryption, and conversation plugins and registers Calendar as internal plugin 'calendar' with the config in src/config.js and the inbound transformMeetingNotes, transformMeetingParticipants, transformMeetingArray, and transformMeeting payload transformers. The only export is the default Calendar class. The plugin API is webex.internal.calendar (register, unregister, syncCalendar, getAll, getByType, list, getNotes, getNotesByUrl, getParticipants, processMeetingEvent, createCalendarEvent, updateCalendarEvent, deleteCalendarEvent, getSchedulerData, getFreeBusy) and the events calendar:registered, calendar:unregistered, calendar:create, calendar:update, calendar:delete from src/constants.js. Per-method behavior is in src/docs/README.md."
210
+ },
211
+ "calendar-service-http": {
212
+ "kind": "http",
213
+ "publication": "internal",
214
+ "source_kind": "external",
215
+ "source": "Webex calendar service (catalog service 'calendar', plus the participantsUrl and notesUrl carried by meeting objects; route definitions are not in this repository)",
216
+ "summary": "GET calendarEvents with fromDate and toDate, GET calendarEvents/<base64url id>/notes, GET participantsUrl and notesUrl, POST calendarEvents/sync, PATCH and DELETE calendarEvents/<base64url id>/sync, GET schedulerData with the QuerySchedulerDataOptions query, and POST freebusy. Bodies are listed under Protocol and wire format in src/docs/README.md."
217
+ },
218
+ "mercury-calendar-events": {
219
+ "kind": "event",
220
+ "publication": "internal",
221
+ "source_kind": "external",
222
+ "source": "Mercury events for calendar (Mercury service; envelope routing owned by @webex/internal-plugin-mercury, module spec consulted: packages/@webex/internal-plugin-mercury/src/docs/README.md)",
223
+ "summary": "Inbound calendar.meeting.create, calendar.meeting.create.minimal, calendar.meeting.update, calendar.meeting.update.minimal, and calendar.meeting.delete envelopes carry data.calendarMeetingExternal; calendar.free_busy carries data.calendarFreeBusyScheduleResponse {requestId, encryptionKeyUrl, calendarFreeBusyItems}."
224
+ },
225
+ "webex-core-plugin-host": {
226
+ "kind": "sdk",
227
+ "publication": "published",
228
+ "source_kind": "external",
229
+ "source": "@webex/webex-core (workspace package; module specs consulted: packages/@webex/webex-core/src/docs/README.md and packages/@webex/webex-core/src/interceptors/docs/README.md)",
230
+ "summary": "Calendar extends WebexPlugin in namespace Calendar (config is webex.config.calendar); registerInternalPlugin merges config and concatenates payloadTransformer predicates and transforms; PayloadTransformerInterceptor runs the inbound transforms on every response; webex.transform runs them on demand; canAuthorize gates register; webex.request carries every HTTP call."
231
+ },
232
+ "internal-plugin-mercury": {
233
+ "kind": "sdk",
234
+ "publication": "published",
235
+ "source_kind": "external",
236
+ "source": "@webex/internal-plugin-mercury (workspace package, not declared in package.json and registered through the encryption plugin import; module spec consulted: packages/@webex/internal-plugin-mercury/src/docs/README.md)",
237
+ "summary": "connect() and disconnect() own the socket; inbound envelopes are emitted as event:<eventType>; on and off subscribe to the calendar events."
238
+ },
239
+ "internal-plugin-device": {
240
+ "kind": "sdk",
241
+ "publication": "published",
242
+ "source_kind": "external",
243
+ "source": "@webex/internal-plugin-device (workspace package; module spec consulted: packages/@webex/internal-plugin-device/src/docs/README.md)",
244
+ "summary": "register() before Mercury connects (a registered device refreshes) and unregister() after Mercury disconnects."
245
+ },
246
+ "internal-plugin-encryption": {
247
+ "kind": "sdk",
248
+ "publication": "published",
249
+ "source_kind": "external",
250
+ "source": "@webex/internal-plugin-encryption (workspace package; no spec exists; code consulted: packages/@webex/internal-plugin-encryption/src/encryption.js, src/kms.js, src/index.js)",
251
+ "summary": "encryptText(key, plaintext) and decryptText(key, ciphertext) resolve JWE strings; kms.createUnboundKeys({count: 1}) resolves keys with uri. Importing it imports the mercury plugin."
252
+ },
253
+ "internal-plugin-conversation": {
254
+ "kind": "sdk",
255
+ "publication": "published",
256
+ "source_kind": "external",
257
+ "source": "@webex/internal-plugin-conversation (workspace package; no spec exists; code consulted: packages/@webex/internal-plugin-conversation/src/decryption-transforms.js, src/conversation.js, src/config.js)",
258
+ "summary": "Supplies the inbound decryptTextProp transform, appended on webex ready when conversation.includeDecryptionTransforms is true (default). A field that fails to decrypt is set to decryptionFailureMessage ('This message cannot be decrypted') and the transform resolves."
259
+ },
260
+ "webex-common-utilities": {
261
+ "kind": "sdk",
262
+ "publication": "published",
263
+ "source_kind": "external",
264
+ "source": "@webex/common (workspace package, not declared in package.json; module spec consulted: packages/@webex/common/src/docs/README.md)",
265
+ "summary": "base64.encode base64url-encodes calendar event ids in resource paths."
266
+ }
267
+ }
268
+ },
269
+ "spec_policy": {
270
+ "require_what_and_why": true,
271
+ "require_provenance": true,
272
+ "protected_specs": [
273
+ "src/docs/README.md"
274
+ ]
275
+ },
276
+ "validation": {
277
+ "generator_runtime": "claude-code",
278
+ "generator_model": "claude-opus-5-5",
279
+ "generator_runtime_source": "host-metadata",
280
+ "source_commit": "ecd5af12a1abf47fc6ed7dd72cb308b259d45fb8",
281
+ "minimum_independence": "different-runtime",
282
+ "blocking_severities": [
283
+ "Blocking"
284
+ ],
285
+ "validator_runtime": "01a1cec9-0225-7283-9212-f70c182f1a3e",
286
+ "validator_runtime_source": "invocation-input",
287
+ "runtime_fallback_tier": "different-runtime"
288
+ },
289
+ "layout": {
290
+ "sdd_root": ".sdd",
291
+ "docs_root": "docs",
292
+ "agent_entry_path": "AGENTS.md",
293
+ "standing_docs_root": "docs",
294
+ "spec_index_path": "docs/specs/README.md",
295
+ "module_docs_strategy": "source-local",
296
+ "module_docs_relative_path": "docs/README.md",
297
+ "module_docs_decision": {
298
+ "basis": "repo-standards-default",
299
+ "reason": "No module-local documentation existed. The source-local default gives src/docs/README.md, matching the onboarded sibling packages. 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.",
300
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
301
+ "decided_at": "2026-11-12T07:53:58Z"
302
+ },
303
+ "repo_context_decision": {
304
+ "path": ".repo-context.json",
305
+ "schema_path": "schemas/repo-context.schema.json",
306
+ "action": "create",
307
+ "schema_action": "create",
308
+ "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.",
309
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
310
+ "decided_at": "2026-11-12T07:53:58Z"
311
+ },
312
+ "artifact_decisions": [
313
+ {
314
+ "path": "docs/service.md",
315
+ "action": "omit",
316
+ "reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
317
+ "decided_by": "claude-code (code evidence)",
318
+ "decided_at": "2026-11-12T07:53:58Z"
319
+ },
320
+ {
321
+ "path": "mkdocs.yml",
322
+ "action": "omit",
323
+ "reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
324
+ "decided_by": "claude-code (code evidence)",
325
+ "decided_at": "2026-11-12T07:53:58Z"
326
+ },
327
+ {
328
+ "path": "api-specs/openapi.yaml",
329
+ "action": "omit",
330
+ "reason": "The package serves no HTTP routes. It is a client of the calendar service; its published surface is the npm export described by calendar-internal-sdk.",
331
+ "decided_by": "claude-code (code evidence)",
332
+ "decided_at": "2026-11-12T07:53:58Z"
333
+ },
334
+ {
335
+ "path": "SECURITY.md",
336
+ "action": "omit",
337
+ "reason": "No package-level security policy exists. The workspace owns security policy; security architecture is described in docs/architecture.md.",
338
+ "decided_by": "claude-code (code evidence)",
339
+ "decided_at": "2026-11-12T07:53:58Z"
340
+ },
341
+ {
342
+ "path": "CONTRIBUTING.md",
343
+ "action": "omit",
344
+ "reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
345
+ "decided_by": "claude-code (code evidence)",
346
+ "decided_at": "2026-11-12T07:53:58Z"
347
+ },
348
+ {
349
+ "path": "CHANGELOG.md",
350
+ "action": "omit",
351
+ "reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
352
+ "decided_by": "claude-code (code evidence)",
353
+ "decided_at": "2026-11-12T07:53:58Z"
354
+ },
355
+ {
356
+ "path": "CTO_CHECKLIST.yml",
357
+ "action": "omit",
358
+ "reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
359
+ "decided_by": "claude-code (code evidence)",
360
+ "decided_at": "2026-11-12T07:53:58Z"
361
+ },
362
+ {
363
+ "path": "schemas/cto-checklist.schema.json",
364
+ "action": "omit",
365
+ "reason": "Omitted together with CTO_CHECKLIST.yml.",
366
+ "decided_by": "claude-code (code evidence)",
367
+ "decided_at": "2026-11-12T07:53:58Z"
368
+ }
369
+ ],
370
+ "template_roots": {
371
+ "canonical": ".sdd/templates/repo-standards"
372
+ },
373
+ "contract_index_path": "docs/architecture.md",
374
+ "repo_skills_root": ".sdd/skills",
375
+ "monorepo_package": {
376
+ "package_path": "packages/@webex/internal-plugin-calendar",
377
+ "root_manifest_path": "../../../.sdd/manifest.json",
378
+ "templates_root_path": "../../../.sdd/templates/repo-standards"
379
+ }
380
+ },
381
+ "tooling": {
382
+ "sdlc_skills": {
383
+ "source_ref": "repo-annotation@2.3.1"
384
+ }
385
+ },
386
+ "coverage_ratchet": {
387
+ "enabled": true,
388
+ "waivers": []
389
+ },
390
+ "substrate": {
391
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
392
+ "consumed": [
393
+ "@webex/eslint-config-legacy via .eslintrc.js",
394
+ "@webex/babel-config-legacy via babel.config.js",
395
+ "@webex/jest-config-legacy via jest.config.js",
396
+ "@webex/legacy-tools build and test runner via package.json",
397
+ "package README.md (context only)",
398
+ "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)"
399
+ ],
400
+ "compliance_tier": "baseline"
401
+ },
402
+ "section_profiles": {
403
+ "repo": {
404
+ "owns_datastore": false,
405
+ "holds_client_state": true,
406
+ "components_interact": true,
407
+ "domain_data_across_components": true,
408
+ "caches_data": true,
409
+ "observability_convention": true,
410
+ "deploys_to_infra": false,
411
+ "shared_base_libs": true,
412
+ "is_monorepo": false,
413
+ "multi_platform": false,
414
+ "published_package": true,
415
+ "embedded_in_host": false,
416
+ "cross_repo_deps_material": true,
417
+ "security_arch_warranted": true,
418
+ "exposes_commands_or_artifacts": true
419
+ },
420
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
421
+ "resolved_at": "2026-11-12T07:53:58Z"
422
+ }
423
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,209 @@
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-12T08:24:55Z
7
+ validation_status: pass-with-warnings
8
+ -->
9
+
10
+ # AI Agent Instructions
11
+
12
+ Package-scoped SDD entry for `@webex/internal-plugin-calendar`, the internal calendar plugin of the
13
+ SDK (`webex.internal.calendar`: meeting sync and the Mercury-updated meeting collection, notes,
14
+ participants, scheduler data, encrypted calendar event writes, and free-busy lookups). This file
15
+ orients agents. 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, or config keys. Verify them from this package's source and
23
+ tests, and check sibling plugin specifications before relying on their behavior.
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) (calendar 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 workspace
44
+ commands from the monorepo root.
45
+ Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the workspace root; see [Prebuilding](../../../CONTRIBUTING.md#prebuilding).
46
+
47
+ | Task | Command |
48
+ | ---------------------- | ------- |
49
+ | Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command) |
50
+ | Start dev environment | N/A — library package with no start script in `package.json` |
51
+ | Run tests | `yarn workspace @webex/internal-plugin-calendar test:unit` (jest) after `build:src` |
52
+ | Run linters | `yarn workspace @webex/internal-plugin-calendar test:style` |
53
+ | Build/release artifact | `yarn workspace @webex/internal-plugin-calendar build` (runs `build:src`) |
54
+ | Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
55
+
56
+ `test:browser` runs the unit and integration specs through karma against live Webex services and
57
+ needs test-user credentials; it is not a routine verification command. There is no
58
+ `test:integration` script, so the aggregate `test` script fails at that step.
59
+
60
+ If a required command is unknown, stop and ask for the exact command.
61
+
62
+ ## 2. Agent Persona and Scope
63
+
64
+ You are the Webex JS SDK engineering assistant for `@webex/internal-plugin-calendar`.
65
+
66
+ Primary outcomes:
67
+
68
+ - Deliver production-safe changes with unit tests and lint passing.
69
+ - Preserve existing behavior unless a change request explicitly requires a behavior change.
70
+ - Keep docs and configuration aligned with code changes.
71
+
72
+ Definition of done:
73
+
74
+ 1. Requested change is implemented.
75
+ 2. Relevant tests, lint, and build checks pass locally.
76
+ 3. Updated docs cover new behavior, including the owning module spec.
77
+ 4. PR summary includes risks and rollback notes.
78
+
79
+ ## 3. Repository Knowledge
80
+
81
+ ### Tech Stack
82
+
83
+ | Area | Tooling | Version |
84
+ | ---------------- | ------- | ------- |
85
+ | 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` still reads `18.x` |
86
+ | Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
87
+ | Test framework | jest via `webex-legacy-tools` (`test:unit`); chai, sinon, and `@webex/test-helper-mock-webex` | sinon `^9.2.4` |
88
+ | Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
89
+
90
+ ### Project Map
91
+
92
+ - `src/index.js`: imports the device, encryption, and conversation plugins, registers internal plugin
93
+ `calendar` with its config and inbound payload transformer, and re-exports `Calendar` as default.
94
+ - `src/calendar.js`: the `Calendar` plugin (register, sync, reads, writes, scheduler data, free-busy).
95
+ - `src/collection.js`, `src/util.js`: the module-level meeting collection and the `endTime` helper.
96
+ - `src/calendar.encrypt.helper.js`, `src/calendar.decrypt.helper.js`: payload encryption with a
97
+ cached KMS key, and scheduler-data and free-busy decryption.
98
+ - `src/config.js`, `src/constants.js`: `webex.config.calendar` defaults and the `calendar:*` event
99
+ names.
100
+ - `src/docs/README.md`: the module specification.
101
+ - `test/unit/spec/`: four unit specs (28 cases); `calendar.js` imports the package by name, which
102
+ loads `dist/`.
103
+ - `test/integration/spec/calendar.js`: live-service spec run only by `test:browser`; it is skipped.
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; see
107
+ [ADR-0001](docs/adr/0001-retain-product-readme.md).
108
+
109
+ ### Critical Constraints
110
+
111
+ - Meeting subjects, notes, `webexOptions`, attendee fields, and free-busy emails must leave the client
112
+ encrypted with the plugin's `encryptionKeyUrl`. Attendee encryption is currently not awaited; do not
113
+ rely on it.
114
+ - A free-busy request carries `encryptionKeyUrl` only together with `emails`; the service answers 400
115
+ otherwise.
116
+ - The three meeting predicates must keep skipping `GET schedulerData`, which `getSchedulerData`
117
+ decrypts itself.
118
+ - The meeting collection and `rpcEventRequests` are shared by every SDK instance in the process.
119
+ - `unregister()` removes every listener on the six calendar Mercury events and disconnects Mercury and
120
+ the device for the whole SDK instance.
121
+ - `webex.internal.mercury` and `@webex/common` are used but not declared in `package.json`.
122
+
123
+ ## 4. Testing Workflow
124
+
125
+ Run checks in this order:
126
+
127
+ 1. `yarn workspace @webex/internal-plugin-calendar build:src`
128
+ 2. `yarn workspace @webex/internal-plugin-calendar test:unit`
129
+ 3. `yarn workspace @webex/internal-plugin-calendar test:style`
130
+
131
+ Step 1 matters: `test/unit/spec/calendar.js` imports `@webex/internal-plugin-calendar` by name, which
132
+ resolves `main` (`dist/index.js`), so a stale `dist/` makes results meaningless.
133
+
134
+ Testing rules:
135
+
136
+ - Add or update unit cases for every behavior change. The payload transformer, `getFreeBusy` and the
137
+ free-busy event, `getByType`, `processMeetingEvent`, the participants fetch in `list`, and attendee
138
+ encryption have no unit case today.
139
+ - Cover failure paths and edge cases, not only happy paths.
140
+ - Do not remove tests to make CI pass.
141
+ - Use `sinon.useFakeTimers()` when a case depends on time, including the `src/config.js` date window.
142
+
143
+ No coverage gate applies to this package; do not infer one.
144
+
145
+ ## 5. Code Style and Patterns
146
+
147
+ Coding expectations:
148
+
149
+ - Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
150
+ `root: true`; `test:style` currently reports only `require-jsdoc` warnings.
151
+ - Prefer small functions over large procedural blocks.
152
+ - Make error handling explicit; request failures reject.
153
+ - Keep public interfaces stable unless a breaking change is requested.
154
+
155
+ Pattern example:
156
+
157
+ ```text
158
+ Preferred:
159
+ - Read the date window from this.config (the calendar namespace).
160
+ - Reach device, mercury, and encryption through this.webex.internal at call time.
161
+ - Emit plugin events with the names in src/constants.js, after the collection changes.
162
+ - Add a case next to the matching describe block in test/unit/spec/calendar.js or a helper spec.
163
+
164
+ Avoid:
165
+ - Sending unencrypted meeting content or free-busy emails to the calendar service.
166
+ - Treating README.md as the method, event, or error reference.
167
+ - Trusting the event names in the src/calendar.js JSDoc over src/constants.js.
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 meeting sync, calendar events, encrypted writes, scheduler data, and free-busy.
183
+ - Rollback approach.
184
+
185
+ ## 7. Boundaries and Escalation
186
+
187
+ ### Always
188
+
189
+ - Prefer existing patterns over introducing new architecture.
190
+ - Keep changes minimal for the requested scope.
191
+ - Call out assumptions and unknowns explicitly.
192
+ - Update the owning module spec in the same change that alters observable behavior.
193
+
194
+ ### Ask First
195
+
196
+ - Adding dependencies.
197
+ - Changing the encrypted field set, the free-busy payload, or the event names.
198
+ - Changing the payload transformer predicates or transforms.
199
+ - Changing what `unregister()` tears down.
200
+ - Making the meeting collection or `rpcEventRequests` per instance.
201
+
202
+ ### Never
203
+
204
+ - Edit `dist/` by hand.
205
+ - Commit secrets, tokens, KMS keys, or credentials, including in test fixtures.
206
+ - Log decrypted meeting content, emails, or keys.
207
+ - Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
208
+ templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
209
+ `.sdd/manifest.json` refers to them through `layout.monorepo_package`.
package/dist/calendar.js CHANGED
@@ -453,7 +453,7 @@ var Calendar = _webexCore.WebexPlugin.extend({
453
453
  throw error;
454
454
  });
455
455
  },
456
- version: "3.13.0-next.1"
456
+ version: "3.13.0-next.10"
457
457
  });
458
458
  var _default = exports.default = Calendar;
459
459
  //# sourceMappingURL=calendar.js.map