@webex/internal-plugin-calendar 3.13.0-next.1 → 3.13.0-next.11

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,92 @@
1
+ ---
2
+ type: ADR
3
+ title: ADR-0001 - Retain the product README
4
+ description: SDD onboarding keeps README.md as product documentation and routes it only as context.
5
+ tags: [adr]
6
+ timestamp: 2026-11-12T07:53:58Z
7
+ status: accepted
8
+ ---
9
+ <!-- sdd-generated-metadata
10
+ doc_kind: standing-doc
11
+ generated_from: adr@0.3.0
12
+ generated_by: claude-code
13
+ approved_by: rarajes2@cisco.com
14
+ updated_at: 2026-11-12T08:24:55Z
15
+ validation_status: pass-with-warnings
16
+ -->
17
+
18
+ # ADR-0001 - Retain the product README
19
+
20
+ | Field | Value |
21
+ | ------------- | ----- |
22
+ | Status | Accepted |
23
+ | Decision date | 2026-11-12 |
24
+ | Deciders | rarajes2@cisco.com (bootstrap questionnaire) |
25
+ | Supersedes | N/A |
26
+ | Superseded by | N/A |
27
+
28
+ ## Context
29
+
30
+ Onboarding found one existing document, `README.md`. It is the npm usage page: an install command, an
31
+ import of the package, and a usage block that reads `webex.internal.calendar.WHATEVER`, which is a
32
+ placeholder rather than an API. It lists no method, event, or error.
33
+
34
+ The implementation in `src/calendar.js` has lifecycle, sync, read, write, scheduler-data, and
35
+ free-busy methods and emits five `calendar:*` events named in `src/constants.js`. The README describes
36
+ none of them. No other intent, design, or AI-authored spec exists in this package.
37
+
38
+ ## Decision
39
+
40
+ Keep `README.md` unchanged. Do not migrate it into the module specification. Record
41
+ `spec_source_policy.mode` as `keep-separate` with `migrated_source_disposition` `retain`, and route
42
+ `README.md` in `spec_sources` as `reference-only` and `context-only`.
43
+
44
+ The canonical behavior is `src/` plus `test/`. Where the README is silent or generic, code wins.
45
+
46
+ ## Why
47
+
48
+ The README is the npm-facing page and carries no behavioral claim that the module specification would
49
+ need to preserve. Rewriting it is a product-doc change, not a requirement of making the package
50
+ SDD-ready. The sibling packages `@webex/internal-plugin-feature` and `@webex/internal-plugin-user`
51
+ made the same choice for the same README shape.
52
+
53
+ ## Alternatives considered
54
+
55
+ | Alternative | Why it was not selected |
56
+ | ----------- | ----------------------- |
57
+ | Migrate the README into `src/docs/README.md` and delete it | The page holds no behavioral content to migrate, and deletion was not requested |
58
+ | Reconcile the README with the module specification in place | Nothing in it needs reconciling, and the npm page would gain spec-only detail |
59
+ | Replace the README placeholder with real usage during onboarding | Onboarding writes the SDD tree only and does not edit `README.md` |
60
+
61
+ ## Consequences
62
+
63
+ **Positive:**
64
+
65
+ - The npm page stays stable for consumers.
66
+ - The module specification is the single behavioral reference.
67
+
68
+ **Negative / tradeoffs:**
69
+
70
+ - Agents must not treat `README.md` as the list of methods or events.
71
+ - The `WHATEVER` placeholder in the README stays until a maintainer makes a separate product-doc change.
72
+
73
+ ## Constraint on future changes
74
+
75
+ Do not delete `README.md` as part of spec maintenance. If its usage text changes, keep the module
76
+ specification aligned with code rather than with the README.
77
+
78
+ ## Follow-up
79
+
80
+ - [ ] None required for onboarding.
81
+
82
+ ## Revisit when
83
+
84
+ - A maintainer chooses to document the plugin methods and events on the npm page.
85
+
86
+ ## References
87
+
88
+ - `README.md`
89
+ - `src/index.js`
90
+ - `src/calendar.js`
91
+ - `src/constants.js`
92
+ - `.sdd/manifest.json` `spec_source_policy`
@@ -0,0 +1,25 @@
1
+ <!-- sdd-generated-metadata
2
+ doc_kind: standing-doc
3
+ generated_from: adr-index@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
+ # Architectural decision records
11
+
12
+ Numbered, append-only records of structural decisions affecting this package and its documentation.
13
+ Add a concrete ADR (for example, `0042-cache-policy.md`) when a decision is non-obvious, hard to
14
+ reverse, or worth explaining to a future contributor. Do not edit an accepted decision in place when
15
+ its outcome changes; supersede it with a new ADR and link both records.
16
+
17
+ ## Index
18
+
19
+ - [ADR-0001 - Retain the product README](0001-retain-product-readme.md) — accepted 2026-11-12
20
+
21
+ Add new entries as ADRs are accepted. Keep this list in numeric order.
22
+
23
+ Each ADR should state its context, decision, alternatives, consequences, and the condition that would
24
+ cause the team to revisit it. Record the deciders, any superseded decision, and the constraint future
25
+ changes must preserve.
@@ -0,0 +1,290 @@
1
+ ---
2
+ type: Architecture
3
+ title: '@webex/internal-plugin-calendar architecture'
4
+ description: Package-wide boundaries, resources, interactions, dependencies, and cross-cutting architecture.
5
+ tags: [architecture]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: architecture@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-11-12T08:24:55Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # @webex/internal-plugin-calendar architecture
17
+
18
+ Canonical architecture for this package. Flow behavior lives in the
19
+ [calendar plugin specification](../src/docs/README.md). This page owns package boundaries, the plugin
20
+ registration, the contract index, and how the package meets the rest of the SDK.
21
+
22
+ Related context: [specification registry](specs/README.md) ·
23
+ [package agent instructions](../AGENTS.md)
24
+
25
+ ## Applicability
26
+
27
+ | Condition ID | Status | Evidence or reason | Owned section |
28
+ | ------------------------------------ | ---------- | ------------------ | ------------- |
29
+ | `repo.owns_datastore` | N/A | No database, file store, or migration; meetings live in the calendar service (`src/calendar.js`) | Repository data and schema |
30
+ | `repo.holds_client_state` | Applicable | The meeting collection in `src/collection.js` and the registration flag, pending free-busy map, and cached key in `src/calendar.js` | Client state model |
31
+ | `repo.components_interact` | Applicable | `src/calendar.js` calls the device, mercury, and encryption plugins, and the payload transformer in `src/index.js` runs inside webex-core and calls the conversation transform | Dependency and interaction topology |
32
+ | `repo.domain_data_across_components` | Applicable | Meeting keys come from KMS through the encryption plugin, and meeting updates arrive through Mercury (`src/calendar.js`, `src/calendar.encrypt.helper.js`) | Object and data ownership |
33
+ | `repo.caches_data` | Applicable | `src/collection.js` keeps synced and pushed meetings in memory and serves `getAll` and `getByType` from them | Caching catalog |
34
+ | `repo.observability_convention` | Applicable | `src/calendar.js` logs with `calendar->` and `webex.internal.calendar -` prefixes | Observability patterns |
35
+ | `repo.deploys_to_infra` | N/A | Library published to npm (`package.json`). No service runtime | Runtime and infrastructure |
36
+ | `repo.shared_base_libs` | Applicable | Extends WebexPlugin from webex-core and uses the legacy build, lint, and test stack (`babel.config.js`, `jest.config.js`, `.eslintrc.js`) | Shared and base libraries |
37
+ | `repo.is_monorepo` | N/A | This SDD root is one package. The workspace around it is out of scope | Package map and inter-package dependencies |
38
+ | `repo.multi_platform` | N/A | One JavaScript source set; Node runs the unit specs and karma browsers run `test:browser` against the same code (`package.json`) | Platform matrix |
39
+ | `repo.published_package` | Applicable | `package.json` name is @webex/internal-plugin-calendar and deploy:npm publishes it | Release and versioning |
40
+ | `repo.embedded_in_host` | N/A | No host theme or embed API in `src/calendar.js` | Host integration and theming |
41
+ | `repo.exposes_commands_or_artifacts` | Applicable | build:src in `package.json` writes dist | Commands and generated artifacts |
42
+ | `repo.cross_repo_deps_material` | Applicable | Behavior depends on the calendar, KMS, and Mercury services and on four sibling plugins (`src/index.js`, `src/calendar.js`) | Cross-repository topology |
43
+ | `repo.security_arch_warranted` | Applicable | Meeting subjects, notes, attendee emails, join links, and KMS keys pass through `src/calendar.encrypt.helper.js`, `src/calendar.decrypt.helper.js`, and `src/index.js` | Security architecture |
44
+
45
+ ## Design overview
46
+
47
+ `@webex/internal-plugin-calendar` is a published internal library with one module. Importing it
48
+ registers `Calendar` as the internal plugin `calendar` and, as side effects, the internal `device`,
49
+ `encryption`, and `conversation` plugins. `webex`, `webex-node`, `@webex/webex-server`, and
50
+ `@webex/recipe-private-web-client` import it; first-party clients then call `webex.internal.calendar`.
51
+
52
+ The plugin is a request builder for the Webex calendar service plus a small in-memory meeting
53
+ collection. After `register()` it listens to Mercury calendar events and keeps the collection current;
54
+ `syncCalendar` fills it from the service. Meeting text is encrypted under KMS keys: reads are decrypted
55
+ by the SDK payload transformer or by explicit helpers, and writes are encrypted with one key the plugin
56
+ creates on first use. Free-busy lookups are sent over HTTPS and answered over Mercury.
57
+
58
+ The package makes outbound HTTP calls and receives Mercury events only. It serves no routes and
59
+ persists nothing.
60
+
61
+ ## Resource inventory and responsibilities
62
+
63
+ | Resource | Kind | Responsibility | Owner | Source | Detailed specification |
64
+ | -------- | ---- | -------------- | ----- | ------ | ---------------------- |
65
+ | Calendar plugin | package (one module) | Meeting sync and collection, notes and participants, scheduler data, encrypted event writes, free-busy | @webex/web-sdk | `src` | [`src/docs/README.md`](../src/docs/README.md) |
66
+
67
+ ## Interaction and execution flows
68
+
69
+ Representative end-to-end flow: a client shows upcoming meetings, keeps them current, and creates a
70
+ new one.
71
+
72
+ ```mermaid
73
+ flowchart LR
74
+ Client[First-party client] -->|register| Cal[Calendar plugin]
75
+ Cal -->|register, connect| DevMerc[device and mercury plugins]
76
+ Client -->|syncCalendar| Cal
77
+ Cal -->|GET calendarEvents| CS[Calendar service]
78
+ CS -->|encrypted meetings| PT[webex-core payload transformer]
79
+ PT -->|decryptTextProp| Conv[conversation plugin]
80
+ PT -->|plaintext meetings| Cal
81
+ Cal -->|store with endTime| Coll[meeting collection]
82
+ DevMerc -->|event:calendar.meeting.*| Cal
83
+ Cal -->|calendar:create, update, delete| Client
84
+ Client -->|createCalendarEvent| Cal
85
+ Cal -->|unbound key, encryptText| Enc[encryption plugin and KMS]
86
+ Cal -->|POST calendarEvents/sync| CS
87
+ ```
88
+
89
+ | From | To | Interaction or transport | Purpose | Failure or compatibility behavior |
90
+ | ---- | -- | ------------------------ | ------- | --------------------------------- |
91
+ | First-party client | Calendar plugin | In-process calls and plugin events | Meetings, scheduling, free-busy | Rejections propagate; `getByType` throws synchronously |
92
+ | Calendar plugin | Calendar service | HTTPS through `webex.request` | Meetings, notes, participants, scheduler data, writes, free-busy | No plugin-local retry |
93
+ | Calendar plugin | device and mercury plugins | In-process calls and Mercury events | Event subscription and free-busy answers | Connect failure rejects `register` |
94
+ | Calendar plugin | encryption plugin and KMS | In-process calls | Key creation, encryption, helper decryption | Rejection propagates |
95
+ | webex-core payload transformer | Calendar plugin transforms | Transform callbacks | Decrypt meeting reads | Field failures become a placeholder string |
96
+
97
+ ## Dependency topology
98
+
99
+ | Dependency | Type | Used by | Purpose | Version, failure, or fallback policy |
100
+ | ---------- | ---- | ------- | ------- | ------------------------------------ |
101
+ | `@webex/webex-core` | Internal | `src/index.js`, `src/calendar.js` | Plugin base, registration, request, transform | Workspace version (`workspace:*` in `package.json`) |
102
+ | `@webex/internal-plugin-device` | Internal | `src/index.js`, `src/calendar.js` | Device registration around Mercury | Workspace version |
103
+ | `@webex/internal-plugin-encryption` | Internal | `src/index.js`, the encrypt and decrypt helpers | KMS keys, encryption, decryption | Workspace version |
104
+ | `@webex/internal-plugin-conversation` | Internal | `src/index.js` | Import side effect; its `decryptTextProp` transform | Workspace version |
105
+ | `@webex/internal-plugin-mercury` | Internal, undeclared | `src/calendar.js` through `webex.internal.mercury` | Connect, disconnect, calendar events | Not in `package.json`; registered by the encryption plugin import |
106
+ | `@webex/common` | Internal, undeclared | `src/calendar.js` | `base64.encode` for event ids | Not in `package.json`; resolved through the workspace |
107
+ | `lodash` | External | `src/index.js`, `src/collection.js`, `src/calendar.encrypt.helper.js` | `has`, `find`, `isArray` | `^4.17.21` in `package.json` |
108
+ | `uuid` | External, unused by `src` | `test/integration/spec/calendar.js` | Test ids | `^3.3.2` in `package.json` dependencies |
109
+ | Calendar, KMS, and Mercury services | External services | `src/calendar.js` | Meetings, keys, events | URLs from the services catalog and from meeting objects |
110
+
111
+ No import cycle exists: this package imports its siblings, and none of them imports this package.
112
+
113
+ ## Public and consumer surfaces
114
+
115
+ | Surface | Type | Owner | Consumers | Compatibility policy | Source |
116
+ | ------- | ---- | ----- | --------- | -------------------- | ------ |
117
+ | `calendar-internal-sdk` — package @webex/internal-plugin-calendar, the `webex.internal.calendar` API and its `calendar:*` events, and `webex.config.calendar` | SDK, published to npm | Calendar plugin | `webex`, `webex-node`, `@webex/webex-server`, `@webex/recipe-private-web-client`, first-party clients | Internal plugin; the README says it does not strictly follow semver | `package.json`, `src/index.js`, `src/calendar.js`, `src/constants.js`, `src/config.js` |
118
+
119
+ The calendar service REST shapes and the Mercury calendar event shapes are protocols this package
120
+ consumes, described under *Protocol and wire format* in the
121
+ [module specification](../src/docs/README.md#protocol-and-wire-format), not published contracts of this
122
+ package. They are registered as internal requires-contracts in `.sdd/manifest.json`.
123
+
124
+ ## Client state model
125
+
126
+ | State or slice | Owner | Transition triggers | Persistence or reset boundary |
127
+ | -------------- | ----- | ------------------- | ----------------------------- |
128
+ | Meeting collection | `src/collection.js` module | `syncCalendar`; Mercury create, update, delete | In memory for the process, shared by every SDK instance |
129
+ | `registered` | Calendar instance | `register`, `unregister` | In memory |
130
+ | `rpcEventRequests` | Calendar prototype | `getFreeBusy`; matching free-busy event | In memory, shared by every SDK instance |
131
+ | `encryptionKeyUrl` | Calendar instance | First create, update, or free-busy call with emails | In memory; never rotated |
132
+
133
+ ## Cross-cutting architecture
134
+
135
+ ### Security
136
+
137
+ - Trust boundaries and identity flow: see [Security architecture](#security-architecture).
138
+ - Sensitive surfaces and data classes: meeting subjects, locations, notes, organizer and participant
139
+ names and emails, join URLs and URIs, schedule-on-behalf identities, free-busy emails, and KMS keys.
140
+ - Encryption and secret boundaries: see [Security architecture](#security-architecture).
141
+
142
+ ### Observability and operations
143
+
144
+ - Logging and correlation: see [Observability patterns](#observability-patterns); the free-busy
145
+ message logs the `requestId` as its only correlation value.
146
+ - Metrics, traces, and audit signals: none emitted here.
147
+ - Ownership and operational entry points: `.github/CODEOWNERS` at the workspace root has no entry for
148
+ this package, so the default rule routes it to `@webex/web-sdk`. No dashboards or runbooks are
149
+ recorded in this package.
150
+
151
+ ### Quality attributes
152
+
153
+ - Compatibility: other clients read the same encrypted meetings, so the encrypted field set and the
154
+ key URL in each payload are cross-client contracts.
155
+ - Footprint: eight source files; runtime imports are webex-core, common, four sibling plugins, and
156
+ lodash.
157
+ - Test confidence: 28 unit cases pass; the payload transformer, `getFreeBusy`, `getByType`,
158
+ `processMeetingEvent`, and attendee encryption have no test, and the integration spec is skipped. No
159
+ coverage threshold is enforced.
160
+
161
+ ## Dependency and interaction topology
162
+
163
+ ```mermaid
164
+ flowchart LR
165
+ Index[src/index.js] -->|import side effects| Sib[device, encryption, conversation plugins]
166
+ Index -->|registerInternalPlugin calendar| Core[webex-core]
167
+ Index --> CalJs[src/calendar.js]
168
+ Index --> Config[src/config.js]
169
+ CalJs --> Coll[src/collection.js]
170
+ Coll --> Util[src/util.js]
171
+ CalJs --> EncH[src/calendar.encrypt.helper.js]
172
+ CalJs --> DecH[src/calendar.decrypt.helper.js]
173
+ CalJs --> Const[src/constants.js]
174
+ CalJs -->|register, unregister| Dev[internal-plugin-device]
175
+ CalJs -->|connect, on, off| Merc[internal-plugin-mercury]
176
+ EncH -->|keys, encryptText| Enc[internal-plugin-encryption]
177
+ DecH -->|decryptText| Enc
178
+ CalJs -->|base64| Common[common]
179
+ Core -->|payload transforms| Index
180
+ Index -->|decryptTextProp| Conv[internal-plugin-conversation]
181
+ ```
182
+
183
+ | From | To | Kind | Purpose | Ordering or failure boundary |
184
+ | ---- | -- | ---- | ------- | ---------------------------- |
185
+ | `src/index.js` | sibling plugins, `src/calendar.js`, `src/config.js` | Import | Build and register the plugin | Registration at import time; first registration wins |
186
+ | `src/calendar.js` | device and mercury plugins | Call and events | Subscription lifecycle | Device registers before Mercury connects |
187
+ | `src/calendar.js` | encrypt and decrypt helpers | Call | Payload encryption and helper decryption | Rejections propagate |
188
+ | Helpers | encryption plugin | Call | Keys, encryption, decryption | Rejections propagate |
189
+ | webex-core | `src/index.js` transforms | Callback | Decrypt reads | Field failures become a placeholder |
190
+ | `src/index.js` transforms | conversation plugin | Named transform | Per-field decryption | Needs `includeDecryptionTransforms` |
191
+
192
+ ## Object and data ownership
193
+
194
+ | Object or state | System of record | May write | May read | Movement or lifecycle |
195
+ | --------------- | ---------------- | --------- | -------- | --------------------- |
196
+ | Calendar meeting | Calendar service | This plugin (create, update, delete); other writers are not recorded in this repository | Holders of the meeting key | Encrypted on write, decrypted on read |
197
+ | Meeting key | KMS | The encrypt helper (create) | Holders of the key | Created once per plugin instance |
198
+ | Free-busy answer | Calendar service | Calendar service | The requesting client | Delivered once over Mercury |
199
+ | Meeting collection | This plugin (memory) | `syncCalendar` and Mercury handlers | `getAll`, `getByType` | Kept until replaced or deleted |
200
+
201
+ ## Caching catalog
202
+
203
+ | Cache | Owner | Backend | Contents | TTL or bound | Invalidation trigger | Failure behavior |
204
+ | ------ | ---------- | --------- | -------- | ------------ | -------------------- | ---------------- |
205
+ | `CalendarCollection` | `src/collection.js` | Module-level JavaScript object | Meetings keyed by `id`, each with derived `endTime` | None; unbounded | Mercury delete removes one item; `syncCalendar` and create or update events replace items; `reset()` exists but has no caller | Stale or missed items until the next sync |
206
+
207
+ ## Observability patterns
208
+
209
+ | Signal | Convention or required fields | Propagation or naming rule | Primary evidence |
210
+ | ------- | ----------------------------- | -------------------------- | ---------------- |
211
+ | Logs | `error` and `info` on register and unregister, `log` on free-busy events | Prefix `calendar->` or `webex.internal.calendar -`; no meeting content or keys are logged | `src/calendar.js` |
212
+ | Metrics | None | N/A | `src/calendar.js` |
213
+ | Traces | None | N/A | `src/calendar.js` |
214
+ | Audit | None | N/A | `src/calendar.js` |
215
+
216
+ ## Shared and base libraries
217
+
218
+ | Library | Inherited responsibility | Consumers | Version floor | Compatibility rule |
219
+ | ------- | ------------------------ | --------- | ------------- | ------------------ |
220
+ | `@webex/webex-core` `WebexPlugin` | `webex`, `request`, namespaced `config`, `logger`, events | `Calendar` | `workspace:*` | Keep namespace `Calendar` |
221
+ | `@webex/babel-config-legacy`, `@webex/eslint-config-legacy`, `@webex/jest-config-legacy`, `@webex/legacy-tools` | Build, lint, and test stack through one-line config files | Package tooling | `workspace:*` | Do not fork the config locally |
222
+
223
+ ## Release and versioning
224
+
225
+ | Artifact | Publish target | Versioning rule | Deprecation window | Changelog or migration obligation |
226
+ | -------- | -------------- | --------------- | ------------------ | --------------------------------- |
227
+ | @webex/internal-plugin-calendar | npm through `deploy:npm` | None declared; the README says internal plugins do not strictly follow semver | None declared | None declared in the package; the workspace owns changelog generation |
228
+
229
+ ## Commands and generated artifacts
230
+
231
+ | Command or artifact | Owner | Inputs | Output or side effect | Compatibility boundary |
232
+ | ------------------- | ----- | ------ | --------------------- | ---------------------- |
233
+ | `yarn workspace @webex/internal-plugin-calendar build:src` | Package scripts | `src` | Writes `dist/` through `webex-legacy-tools` (JavaScript, TypeScript, source maps) | `dist/` is generated and never edited by hand; unit tests load it |
234
+ | `yarn workspace @webex/internal-plugin-calendar test:unit` | Package scripts | `test/unit/spec` | Jest run | Requires a current `dist/` |
235
+ | `yarn workspace @webex/internal-plugin-calendar test:style` | Package scripts | `src` | ESLint run | The shared config ignores `docs/**` and `*.md` |
236
+ | `yarn workspace @webex/internal-plugin-calendar test:browser` | Package scripts | `test/unit/spec`, `test/integration/spec` | Karma run against live services | Needs test-user credentials; not a routine verification command |
237
+
238
+ ## Cross-repository topology
239
+
240
+ | Repository or external system | Relationship | Exchanged contract or artifact | Owner | Sequencing constraint |
241
+ | ----------------------------- | ------------ | ------------------------------ | ----- | --------------------- |
242
+ | `@webex/webex-core` (workspace sibling; module specs consulted) | Consumes | `WebexPlugin`, `registerInternalPlugin`, payload transformer, request, `canAuthorize` | @webex/web-sdk | None beyond plugin registration |
243
+ | `@webex/internal-plugin-mercury` (workspace sibling; module spec consulted) | Consumes, undeclared | `connect`, `disconnect`, `on`, `off`, calendar events | @webex/web-sdk | Device registration first |
244
+ | `@webex/internal-plugin-device` (workspace sibling; module spec consulted) | Consumes | `register`, `unregister` | @webex/web-sdk | Before Mercury connect |
245
+ | `@webex/internal-plugin-encryption` (workspace sibling; no spec, code consulted) | Consumes | `encryptText`, `decryptText`, `kms.createUnboundKeys` | @webex/web-sdk | None |
246
+ | `@webex/internal-plugin-conversation` (workspace sibling; no spec, code consulted) | Consumes | `decryptTextProp` transform | @webex/web-sdk | Added on webex `ready` |
247
+ | `@webex/common` (workspace sibling; module spec consulted) | Consumes, undeclared | `base64.encode` | @webex/web-sdk | None |
248
+ | `webex`, `webex-node`, `@webex/webex-server`, `@webex/recipe-private-web-client` (workspace siblings) | Provides to | Import side effect registering `calendar` | @webex/web-sdk | None |
249
+ | Calendar, KMS, and Mercury services | Consumes | REST and event shapes under Protocol and wire format | Not recorded in this repository | `register` before free-busy |
250
+
251
+ ## Security architecture
252
+
253
+ ```mermaid
254
+ flowchart LR
255
+ Client[First-party client] -->|plain meeting fields| Cal[Calendar plugin]
256
+ Cal -->|unbound key, encryptText| Enc[encryption plugin]
257
+ Enc -->|keys| KMS[KMS]
258
+ Cal -->|ciphertext, user token| CS[Calendar service]
259
+ CS -->|encrypted meetings| Cal
260
+ CS -->|encrypted free-busy over Mercury| Cal
261
+ Cal -->|decryptText or decryptTextProp| Enc
262
+ Cal -->|plaintext| Client
263
+ ```
264
+
265
+ - Meeting text and free-busy emails are encrypted in the client with a KMS key whose URL travels with
266
+ the payload; the calendar service stores and returns ciphertext.
267
+ - One key is created per plugin instance and reused for every write until the instance goes away.
268
+ - Attendee `displayName` and `email` encryption is started but not awaited before the request is
269
+ built, so those fields may leave the client in plaintext; recorded in the module specification and
270
+ not changed by onboarding.
271
+ - The user token and transport security come from webex-core; KMS cryptography comes from the
272
+ encryption plugin.
273
+
274
+ ## Domain language
275
+
276
+ | Term | Repository-specific meaning | Authoritative source |
277
+ | ---- | --------------------------- | -------------------- |
278
+ | Meeting, calendar event | One scheduled meeting from the user's calendar, keyed by `id` with `seriesId`, `start`, `durationMinutes` | `src/calendar.js` |
279
+ | `calendarMeetingExternal` | The meeting object inside a Mercury calendar event | `src/calendar.js` |
280
+ | Scheduler data | Scheduling preferences and meeting data for a Webex site, including schedule-on-behalf entries | `src/calendar.js` |
281
+ | Free-busy | Availability of a set of users for a time range, answered over Mercury | `src/calendar.js` |
282
+ | Minimal event | The `.minimal` variant of a create or update Mercury event, handled like the full one | `src/calendar.js` |
283
+
284
+ ## References and maintenance
285
+
286
+ - Decisions: [adr/](adr/index.md)
287
+ - Instantiated specifications and routing: [specs/README.md](specs/README.md)
288
+ - Repository rules and patterns: [package agent instructions](../AGENTS.md)
289
+ - Update this document in the same change that alters package boundaries, resource ownership,
290
+ cross-resource interaction, or cross-cutting architecture.
@@ -0,0 +1,102 @@
1
+ ---
2
+ type: Getting Started
3
+ title: Getting started
4
+ description: Local setup, build, run, and test routing for @webex/internal-plugin-calendar.
5
+ tags: [onboarding]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: getting-started@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-11-12T08:24:55Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # Getting started
17
+
18
+ Onboarding for **@webex/internal-plugin-calendar**, a package inside the `webex-js-sdk` Yarn
19
+ workspace. Run every command from the workspace root.
20
+
21
+ ## Prerequisites
22
+
23
+ | Tool or access | Version or requirement |
24
+ | -------------- | ---------------------- |
25
+ | Node.js | Use 22.14: the workspace root `AGENTS.md` requires it and the workspace `.nvmrc` selects `lts/jod` (Node 22). This package's `engines` accepts `>=18`. The workspace root `package.json` `engines.node` still reads `18.x`, which conflicts with the other two; the unit tests pass on 22.14 |
26
+ | Yarn | `yarn@3.4.1` (`packageManager` in the workspace root `package.json`) |
27
+ | Registry or account access | N/A for building and unit tests; `test:browser` needs live Webex services and test-user credentials |
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ yarn
33
+ ```
34
+
35
+ The workspace `deploy.yml` workflow installs with the same command.
36
+
37
+ Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the workspace root; see [Prebuilding](../../../../CONTRIBUTING.md#prebuilding).
38
+
39
+ ## Build
40
+
41
+ ```bash
42
+ yarn workspace @webex/internal-plugin-calendar build
43
+ ```
44
+
45
+ `build` runs `build:src`, which writes `dist/` through `webex-legacy-tools`. `dist/` is ignored by Git.
46
+
47
+ ## Run
48
+
49
+ N/A — this is a library with no start script. Import `@webex/internal-plugin-calendar` and create a
50
+ webex instance; the plugin is then `webex.internal.calendar`. Call `register()` before relying on the
51
+ `calendar:*` events or on `getFreeBusy`.
52
+
53
+ ## Tests
54
+
55
+ ```bash
56
+ yarn workspace @webex/internal-plugin-calendar build:src
57
+ yarn workspace @webex/internal-plugin-calendar test:unit
58
+ yarn workspace @webex/internal-plugin-calendar test:style
59
+ ```
60
+
61
+ | Tier | Command | Test location | Framework | External dependencies |
62
+ | ---- | ------- | ------------- | --------- | --------------------- |
63
+ | Unit | `yarn workspace @webex/internal-plugin-calendar test:unit` | `test/unit/spec` | jest runner through `webex-legacy-tools`, with chai, sinon, and `@webex/test-helper-mock-webex` | A current `dist/` (`test/unit/spec/calendar.js` imports the package by name) |
64
+ | Integration | `yarn workspace @webex/internal-plugin-calendar test:browser` (karma through `webex-legacy-tools --integration`); not a routine verification command | `test/unit/spec`, `test/integration/spec` | karma | Live Webex services and test users from `@webex/test-helper-test-users`; `test/integration/spec/calendar.js` is skipped |
65
+
66
+ - Coverage or quality gate: none; the legacy Jest configuration sets no threshold, and the developer
67
+ confirmed that no outside gate applies
68
+ - Enforcement source: N/A
69
+ - Test environment or QA dependencies: none for unit tests
70
+
71
+ There is no `test:integration` script. `yarn workspace @webex/internal-plugin-calendar test` chains
72
+ `test:style`, `test:unit`, `test:integration`, and `test:browser`, so it stops with "Couldn't find a
73
+ script named test:integration".
74
+
75
+ ## Configuration and secrets
76
+
77
+ - Required configuration: none for unit tests. At runtime `webex.config.calendar` supplies the
78
+ default `fromDate` and `toDate` of `syncCalendar` (defaults in `src/config.js`, computed when the
79
+ module loads)
80
+ - Secret source: N/A for unit tests, which use fake values; live runs use the test-user credentials of
81
+ the workspace test helpers
82
+ - Package or artifact access: N/A
83
+ - Required neighboring packages: `@webex/webex-core`, `@webex/common`, and the device, encryption,
84
+ conversation, and mercury plugins resolve through the workspace
85
+ - Platform, simulator, device, or SDK setup: Node for unit tests; a karma browser for `test:browser`
86
+ - Never commit credentials or copy production secrets into a local config.
87
+
88
+ ## First-run verification
89
+
90
+ 1. Run `yarn workspace @webex/internal-plugin-calendar build:src`.
91
+ 2. Run `yarn workspace @webex/internal-plugin-calendar test:unit` and check that four suites and 28
92
+ tests pass.
93
+ 3. Run `yarn workspace @webex/internal-plugin-calendar test:style`.
94
+
95
+ Expected result: all three commands exit zero. `test:style` prints 15 `require-jsdoc` warnings and no
96
+ errors.
97
+
98
+ ## Next steps
99
+
100
+ - [Package architecture](architecture.md)
101
+ - [Specification registry](specs/README.md)
102
+ - [Documentation index](index.md)
package/docs/index.md ADDED
@@ -0,0 +1,43 @@
1
+ ---
2
+ okf_version: '0.1'
3
+ ---
4
+ <!-- sdd-generated-metadata
5
+ doc_kind: standing-doc
6
+ generated_from: docs-index@0.3.0
7
+ generated_by: claude-code
8
+ approved_by: rarajes2@cisco.com
9
+ updated_at: 2026-11-12T08:24:55Z
10
+ validation_status: pass-with-warnings
11
+ -->
12
+
13
+ # @webex/internal-plugin-calendar documentation
14
+
15
+ Doc map for developers and agents working on the internal calendar plugin.
16
+
17
+ ## Start here
18
+
19
+ - [Getting started](getting-started.md)
20
+ - [Package architecture](architecture.md)
21
+
22
+ ## Decisions
23
+
24
+ - [adr/](adr/index.md) — architectural decision records
25
+
26
+ ## Specifications and contracts
27
+
28
+ - [architecture.md](architecture.md) — canonical package architecture and contract index
29
+ - [specs/README.md](specs/README.md) — manifest-backed module and contract registry
30
+ - [`src/docs/README.md`](../src/docs/README.md) — the calendar plugin specification beside its code
31
+ - [adr/](adr/index.md) — concrete architectural decisions; blank ADR templates remain under the
32
+ monorepo root `.sdd/`
33
+
34
+ This package is a library, so there is no service specification and no OpenAPI document. Exact
35
+ contract details live in the native sources linked from the architecture index: `package.json` and
36
+ `src/index.js` for the package, and `src/calendar.js` and `src/constants.js` for the plugin API and
37
+ events.
38
+
39
+ ## Related repository resources
40
+
41
+ - [`README.md`](../README.md) — retained npm usage page; context only, see
42
+ [ADR-0001](adr/0001-retain-product-readme.md)
43
+ - [`AGENTS.md`](../AGENTS.md) — agent instructions for this package
@@ -0,0 +1,66 @@
1
+ ---
2
+ type: Reference
3
+ title: Specification registry
4
+ description: Canonical specification registry and change-routing guide.
5
+ tags: [specifications, registry]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: spec-index@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-11-12T08:24:55Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # Specification registry
17
+
18
+ Use this page to find the canonical package architecture and every instantiated module specification
19
+ plus native contract. Keep technical facts in one owning document and use this page only for
20
+ navigation, ownership, status, and change/test routing.
21
+
22
+ Start with the [package architecture](../architecture.md). No service specification exists because this
23
+ package is a library.
24
+
25
+ ## Document roles
26
+
27
+ | Document | Canonical ownership |
28
+ | -------- | ------------------- |
29
+ | [Package architecture](../architecture.md) | Package boundaries, resource inventory, interactions, dependency topology, and cross-cutting architecture |
30
+ | Module specifications | Stable behavior and design at each manifest-routed `<module-path>/docs/README.md` |
31
+ | [ADR](../adr/index.md) | A durable decision, its deciders, rationale, consequences, and supersession lineage |
32
+
33
+ ## Instantiated specification registry
34
+
35
+ | Resource | Role | Canonical path | Owner | Status | Last verified |
36
+ | -------- | ---- | -------------- | ----- | ------ | ------------- |
37
+ | Package | Architecture | `docs/architecture.md` | @webex/web-sdk | Draft | 2026-11-12 |
38
+ | Calendar plugin | Module | `src/docs/README.md` | @webex/web-sdk | Draft | 2026-11-12 |
39
+ | Retain the product README | ADR | `docs/adr/0001-retain-product-readme.md` | @webex/web-sdk | Accepted | 2026-11-12 |
40
+
41
+ ### Module registry
42
+
43
+ | Module | Responsibility | Manifest coverage state | Start here |
44
+ | --- | --- | --- | --- |
45
+ | `src/` | `webex.internal.calendar`: meeting sync and the Mercury-updated meeting collection, notes, participants, scheduler data, KMS-encrypted event writes, and free-busy lookups | Partial | `src/docs/README.md` |
46
+
47
+ Generator-side field measurement for the module is complete (93.3%, assessed 2026-11-12). Independent validation passed with warnings on 2026-11-12; the conformance report has zero Blocking findings. The module-map confirmation is recorded in the approved file-touch plan. A characterization baseline and promotion past Partial remain pending.
48
+
49
+ ## Change and verification routing
50
+
51
+ | Change affects | Load and update | Verification route |
52
+ | -------------- | --------------- | ------------------ |
53
+ | Package boundaries or cross-cutting architecture | `docs/architecture.md` and applicable ADRs | `yarn workspace @webex/internal-plugin-calendar test:unit` after `build:src`, and the module spec |
54
+ | A stable code, package, or component boundary | `src/docs/README.md` | Module tests plus affected contracts |
55
+ | A public API or package contract | The owning architecture section, `src/docs/README.md`, and the native definition in `src/calendar.js`, `src/constants.js`, `src/config.js`, `src/index.js`, or `package.json` | Unit tests; check the `webex`, `webex-node`, `@webex/webex-server`, and `@webex/recipe-private-web-client` imports |
56
+
57
+ ## Module and contract registration
58
+
59
+ The module specification is generated at the exact `modules[].canonical_spec` path recorded in
60
+ `.sdd/manifest.json`. Register every module and submodule in the Module registry above in manifest tree
61
+ order.
62
+
63
+ Contracts are registered in `.sdd/manifest.json` `contract_catalog` and indexed in
64
+ [`docs/architecture.md`](../architecture.md#public-and-consumer-surfaces) with a stable ID, publication
65
+ state, native source, and owning module. This page provides navigation and ownership rather than a copied
66
+ contract.
package/package.json CHANGED
@@ -25,20 +25,20 @@
25
25
  "@webex/eslint-config-legacy": "0.0.0",
26
26
  "@webex/jest-config-legacy": "0.0.0",
27
27
  "@webex/legacy-tools": "0.0.0",
28
- "@webex/test-helper-chai": "3.12.0-next.13",
29
- "@webex/test-helper-mocha": "3.12.0-next.13",
30
- "@webex/test-helper-mock-webex": "3.12.0-next.13",
31
- "@webex/test-helper-retry": "3.12.0-next.13",
32
- "@webex/test-helper-test-users": "3.12.0-next.13",
28
+ "@webex/test-helper-chai": "3.13.0-next.3",
29
+ "@webex/test-helper-mocha": "3.13.0-next.3",
30
+ "@webex/test-helper-mock-webex": "3.13.0-next.3",
31
+ "@webex/test-helper-retry": "3.13.0-next.3",
32
+ "@webex/test-helper-test-users": "3.13.0-next.3",
33
33
  "eslint": "^8.24.0",
34
34
  "prettier": "^2.7.1",
35
35
  "sinon": "^9.2.4"
36
36
  },
37
37
  "dependencies": {
38
- "@webex/internal-plugin-conversation": "3.13.0-next.1",
39
- "@webex/internal-plugin-device": "3.12.0-next.66",
40
- "@webex/internal-plugin-encryption": "3.13.0-next.1",
41
- "@webex/webex-core": "3.12.0-next.71",
38
+ "@webex/internal-plugin-conversation": "3.13.0-next.11",
39
+ "@webex/internal-plugin-device": "3.13.0-next.7",
40
+ "@webex/internal-plugin-encryption": "3.13.0-next.11",
41
+ "@webex/webex-core": "3.13.0-next.7",
42
42
  "lodash": "^4.17.21",
43
43
  "uuid": "^3.3.2"
44
44
  },
@@ -51,5 +51,5 @@
51
51
  "test:style": "eslint ./src/**/*.*",
52
52
  "test:unit": "webex-legacy-tools test --unit --runner jest"
53
53
  },
54
- "version": "3.13.0-next.1"
54
+ "version": "3.13.0-next.11"
55
55
  }