@webex/plugin-memberships 3.13.0-next.8 → 3.13.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.repo-context.json +427 -0
- package/.sdd/manifest.json +405 -0
- package/AGENTS.md +213 -0
- package/dist/memberships.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +98 -0
- package/docs/adr/index.md +25 -0
- package/docs/architecture.md +254 -0
- package/docs/getting-started.md +129 -0
- package/docs/index.md +42 -0
- package/docs/specs/README.md +66 -0
- package/package.json +8 -8
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +407 -0
|
@@ -0,0 +1,98 @@
|
|
|
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-12T17:22:00Z
|
|
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-12T17:43:13Z
|
|
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 page: a one-line description
|
|
31
|
+
("Membership plugin for the Cisco Webex JS SDK."), install commands, a note on OAuth scopes, a pointer
|
|
32
|
+
to the developer portal, and a Usage block. No other intent, design, or AI-authored spec exists in this
|
|
33
|
+
package.
|
|
34
|
+
|
|
35
|
+
The README is accurate where it speaks, but it covers little and repeats itself:
|
|
36
|
+
|
|
37
|
+
| README content | Code |
|
|
38
|
+
| -------------- | ---- |
|
|
39
|
+
| The Install and Usage sections each appear twice | — |
|
|
40
|
+
| Usage shows `webex.memberships.get(id)` resolving a membership | Matches `get` in `src/memberships.js` |
|
|
41
|
+
| Most calls work with `spark:memberships_read` and `spark:memberships_write`; `listen()` needs `spark:all` and `spark:kms` | Matches the `listen` JSDoc in `src/memberships.js` |
|
|
42
|
+
| Nothing about `create`, `list`, `update`, `remove`, `listWithReadStatus`, `updateLastSeen`, or the events | All eight methods and the `created`, `updated`, `deleted`, and `seen` events are in `src/memberships.js` |
|
|
43
|
+
|
|
44
|
+
## Decision
|
|
45
|
+
|
|
46
|
+
Keep `README.md` unchanged. Do not migrate it into the module specification. Record
|
|
47
|
+
`spec_source_policy.mode` as `keep-separate` with `migrated_source_disposition` `retain`, and route
|
|
48
|
+
`README.md` in `spec_sources` as `reference-only` and `context-only`.
|
|
49
|
+
|
|
50
|
+
The canonical behavior is `src/` plus `test/`. The module specification follows code.
|
|
51
|
+
|
|
52
|
+
## Why
|
|
53
|
+
|
|
54
|
+
The README is the npm-facing page. Filling it in is a product-doc change, not a requirement of making
|
|
55
|
+
the package SDD-ready, and the other onboarded packages in this workspace kept their READMEs the same
|
|
56
|
+
way. Its two behavioral claims, the `get(id)` example and the scopes the plugin needs, are already in
|
|
57
|
+
the module specification and the package architecture, so nothing is lost by not migrating it.
|
|
58
|
+
|
|
59
|
+
## Alternatives considered
|
|
60
|
+
|
|
61
|
+
| Alternative | Why it was not selected |
|
|
62
|
+
| ----------- | ----------------------- |
|
|
63
|
+
| Migrate the README into `src/docs/README.md` and delete it | Its behavior is already specified; deletion was not requested |
|
|
64
|
+
| Reconcile the README with the module specification in place | Reconciling would only carry one example and one scope note; `keep-separate` was chosen |
|
|
65
|
+
| Rewrite the README during onboarding | Onboarding writes the SDD tree only and does not edit `README.md` |
|
|
66
|
+
|
|
67
|
+
## Consequences
|
|
68
|
+
|
|
69
|
+
**Positive:**
|
|
70
|
+
|
|
71
|
+
- The npm page stays stable for consumers.
|
|
72
|
+
- The module specification is the single behavioral reference.
|
|
73
|
+
|
|
74
|
+
**Negative / tradeoffs:**
|
|
75
|
+
|
|
76
|
+
- Agents must not treat `README.md` as complete; it shows only `get(id)`.
|
|
77
|
+
- The repeated Install and Usage sections remain until a maintainer makes a separate product-doc change.
|
|
78
|
+
|
|
79
|
+
## Constraint on future changes
|
|
80
|
+
|
|
81
|
+
Do not delete `README.md` as part of spec maintenance. If its usage text changes, keep the module
|
|
82
|
+
specification aligned with code rather than with the README.
|
|
83
|
+
|
|
84
|
+
## Follow-up
|
|
85
|
+
|
|
86
|
+
- [ ] A maintainer may remove the repeated sections and add examples for the other methods and the
|
|
87
|
+
events in a separate product-doc change.
|
|
88
|
+
|
|
89
|
+
## Revisit when
|
|
90
|
+
|
|
91
|
+
- A maintainer rewrites the README to document read status, read receipts, `listen()`, or the events.
|
|
92
|
+
|
|
93
|
+
## References
|
|
94
|
+
|
|
95
|
+
- `README.md`
|
|
96
|
+
- `src/index.js`
|
|
97
|
+
- `src/memberships.js`
|
|
98
|
+
- `.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-12T17:43:13Z
|
|
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,254 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Architecture
|
|
3
|
+
title: '@webex/plugin-memberships 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-12T17:43:13Z
|
|
13
|
+
validation_status: pass-with-warnings
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# @webex/plugin-memberships architecture
|
|
17
|
+
|
|
18
|
+
Canonical architecture for this package. Flow behavior lives in the
|
|
19
|
+
[Memberships plugin specification](../src/docs/README.md). This page owns package boundaries, the
|
|
20
|
+
plugin 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 in `src/memberships.js` | Repository data and schema |
|
|
30
|
+
| `repo.holds_client_state` | N/A | `src/memberships.js` caches no membership record; the stored event envelope is described in the module specification | Client state model |
|
|
31
|
+
| `repo.components_interact` | Applicable | `src/index.js` registers the conversation and Mercury plugins that `src/memberships.js` calls | Dependency and interaction topology |
|
|
32
|
+
| `repo.domain_data_across_components` | Applicable | Membership records, read status, read receipts, and membership events pass from Hydra, the conversation service, and Mercury through `src/memberships.js` to callers | Object and data ownership |
|
|
33
|
+
| `repo.caches_data` | N/A | Nothing is kept after a call settles in `src/memberships.js` | Caching catalog |
|
|
34
|
+
| `repo.observability_convention` | N/A | One error log line and debug trace lines in `src/memberships.js`; no metric or trace convention | 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 and uses the legacy build and lint stack (`babel.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 | `src/memberships.js` has no platform branch; `process` declares {browser: true} and is not imported | Platform matrix |
|
|
39
|
+
| `repo.published_package` | Applicable | `package.json` name is @webex/plugin-memberships and deploy:npm publishes it | Release and versioning |
|
|
40
|
+
| `repo.embedded_in_host` | N/A | No host theme or embed API in `src/memberships.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 Webex REST API memberships resource, the conversation service, and the Mercury socket (`src/memberships.js`) | Cross-repository topology |
|
|
43
|
+
| `repo.security_arch_warranted` | Applicable | `listen()` needs the spark:all and spark:kms scopes, and person emails, display names, and ids pass through `src/memberships.js` | Security architecture |
|
|
44
|
+
|
|
45
|
+
## Design overview
|
|
46
|
+
|
|
47
|
+
`@webex/plugin-memberships` is a published JavaScript library with one module. Importing it registers
|
|
48
|
+
the internal `conversation` and `mercury` plugins and then `Memberships` as the public plugin
|
|
49
|
+
`memberships`, reached as `webex.memberships`. The `webex` and `webex-node` bundles import it to
|
|
50
|
+
register it; no other workspace package calls it from its source.
|
|
51
|
+
|
|
52
|
+
A membership is a person's relationship to a room (a space): whether they are in it, whether they
|
|
53
|
+
moderate it, whether they hid a one-to-one space, and which message they last saw. The Webex REST API
|
|
54
|
+
serves memberships to applications through its `memberships` resource, which the SDK reaches as
|
|
55
|
+
catalog service `hydra`. The plugin answers four questions: "who is in this room" (create, read, list,
|
|
56
|
+
update, delete through Hydra), "how far has each member read" (from the internal conversation
|
|
57
|
+
service, converted into Hydra-style membership objects), "I have read up to here" (a read receipt sent
|
|
58
|
+
through the conversation service), and "what changed" (Mercury socket activities turned into
|
|
59
|
+
webhook-shaped `created`, `updated`, `deleted`, and `seen` events after `listen()`).
|
|
60
|
+
|
|
61
|
+
The package serves no routes, caches nothing, and persists nothing.
|
|
62
|
+
|
|
63
|
+
## Resource inventory and responsibilities
|
|
64
|
+
|
|
65
|
+
| Resource | Kind | Responsibility | Owner | Source | Detailed specification |
|
|
66
|
+
| -------- | ---- | -------------- | ----- | ------ | ---------------------- |
|
|
67
|
+
| Memberships plugin | package (one module) | Registration; membership records; read status; read receipts; membership events | @webex/web-sdk | src | [`src/docs/README.md`](../src/docs/README.md) |
|
|
68
|
+
|
|
69
|
+
## Interaction and execution flows
|
|
70
|
+
|
|
71
|
+
Representative end-to-end flow: a client lists a room's members with their read status, sends a read
|
|
72
|
+
receipt for the newest message, and listens for membership changes.
|
|
73
|
+
|
|
74
|
+
```mermaid
|
|
75
|
+
flowchart LR
|
|
76
|
+
App[application] -->|create, get, list, update, remove| Plugin[webex.memberships]
|
|
77
|
+
App -->|listWithReadStatus, updateLastSeen| Plugin
|
|
78
|
+
App -->|listen, on created, updated, deleted, seen| Plugin
|
|
79
|
+
Plugin -->|memberships requests| Hydra[Webex REST API memberships]
|
|
80
|
+
Plugin -->|waitForCatalog postauth| Services[webex-core services]
|
|
81
|
+
Plugin -->|get conversation, acknowledge| Convo[conversation plugin]
|
|
82
|
+
Convo --> ConvoSvc[conversation service]
|
|
83
|
+
Plugin -->|ensureMyIdIsAvailable, createEventEnvelope| Common[common]
|
|
84
|
+
Common -->|people get me| People[webex.people]
|
|
85
|
+
Plugin -->|connect, event:conversation.activity| Mercury[mercury plugin]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
| From | To | Interaction or transport | Purpose | Failure or compatibility behavior |
|
|
89
|
+
| ---- | -- | ------------------------ | ------- | --------------------------------- |
|
|
90
|
+
| Application | `webex.memberships` | In-process calls; `on` for events | Membership records, read status, read receipts, events | Rejections propagate; a missing argument throws synchronously |
|
|
91
|
+
| `Memberships` | Webex REST API | HTTPS through `webex.request`, service `hydra` | Membership records | No retry here |
|
|
92
|
+
| `Memberships` | `webex.internal.conversation` | In-process calls after the `postauth` catalog | Read status and read receipts | Rejections propagate |
|
|
93
|
+
| `Memberships` | `webex.internal.mercury` | `connect()` and `listenTo` | Membership events | A connect failure rejects `listen()` |
|
|
94
|
+
| `Memberships` | `@webex/common` | Import | Ids, room type, current user, envelope, event vocabulary | A failed identity lookup rejects `listWithReadStatus` and leaves the envelope `undefined` |
|
|
95
|
+
|
|
96
|
+
## Dependency topology
|
|
97
|
+
|
|
98
|
+
| Dependency | Type | Used by | Purpose | Version, failure, or fallback policy |
|
|
99
|
+
| ---------- | ---- | ------- | ------- | ------------------------------------ |
|
|
100
|
+
| `@webex/webex-core` | Internal | `src/index.js`, `src/memberships.js` | Registration, plugin base, `Page`, `webex.request`, services | `workspace:*` in `package.json` |
|
|
101
|
+
| `@webex/common` | Internal | `src/memberships.js` | Hydra ids, room type, current user, event envelope, `SDK_EVENT` | `workspace:*` |
|
|
102
|
+
| `@webex/internal-plugin-conversation` | Internal | `src/index.js` (import), `src/memberships.js` (calls) | Read status and read receipts | `workspace:*` |
|
|
103
|
+
| `@webex/internal-plugin-mercury` | Internal | `src/index.js` (import), `src/memberships.js` (calls) | Membership events | `workspace:*` |
|
|
104
|
+
| `@webex/plugin-people`, `@webex/plugin-logger` | Internal peer | Reached at run time through `webex.people` and `webex.logger` | Current user for read status and the envelope; error logging | Peer dependencies; not imported by `src/` |
|
|
105
|
+
| `@webex/plugin-messages`, `@webex/plugin-rooms` | Internal peer | Not reached by `src/`; the integration spec imports them | Test setup creates rooms and messages | Peer dependencies |
|
|
106
|
+
| `lodash`, `debug` | External library | `src/memberships.js` | `cloneDeep`; trace lines | `^4.17.21`, `^4.3.4` |
|
|
107
|
+
| Webex REST API memberships resource, conversation service | External service | `src/memberships.js` | Membership records and conversations | Resolved through the service catalog |
|
|
108
|
+
|
|
109
|
+
No import cycle exists: none of the internal dependencies imports this package. `@webex/common` reads
|
|
110
|
+
`webex.people` at run time without importing it.
|
|
111
|
+
|
|
112
|
+
## Public and consumer surfaces
|
|
113
|
+
|
|
114
|
+
| Surface | Type | Owner | Consumers | Compatibility policy | Source |
|
|
115
|
+
| ------- | ---- | ----- | --------- | -------------------- | ------ |
|
|
116
|
+
| `memberships-public-sdk` — package @webex/plugin-memberships, `webex.memberships` with its eight methods and the `created`, `updated`, `deleted`, and `seen` events | SDK, published to npm, public | Memberships plugin | `webex`, `webex-node` (registration); applications and the workspace samples (calls) | No versioning or deprecation rule is declared in the package | `package.json`, `src/index.js`, `src/memberships.js` |
|
|
117
|
+
|
|
118
|
+
The memberships requests and the event shape are a protocol this package speaks, described under
|
|
119
|
+
*Protocol and wire format* in the
|
|
120
|
+
[module specification](../src/docs/README.md#protocol-and-wire-format). The other contracts this
|
|
121
|
+
package requires are registered in `.sdd/manifest.json` `contract_catalog`.
|
|
122
|
+
|
|
123
|
+
## Cross-cutting architecture
|
|
124
|
+
|
|
125
|
+
### Security
|
|
126
|
+
|
|
127
|
+
- Trust boundaries, scopes, and identity flow: see [Security architecture](#security-architecture).
|
|
128
|
+
- Sensitive surfaces and data classes: person emails, display names, and person, organization, room,
|
|
129
|
+
membership, and message ids, plus the last-seen message and date of each member.
|
|
130
|
+
|
|
131
|
+
### Observability and operations
|
|
132
|
+
|
|
133
|
+
- Logging and correlation: `getMembershipEvent` logs one `webex.logger.error` line when an activity
|
|
134
|
+
cannot be converted; `debug('memberships')` trace lines print event payloads when `DEBUG` enables
|
|
135
|
+
`memberships`. Request tracking comes from the webex-core interceptors.
|
|
136
|
+
- Metrics, traces, and audit signals: none.
|
|
137
|
+
- Ownership and operational entry points: the default `*` rule of `.github/CODEOWNERS` at the
|
|
138
|
+
workspace root assigns this package to `@webex/web-sdk`; no line names it. No dashboards or runbooks
|
|
139
|
+
are recorded in this package.
|
|
140
|
+
|
|
141
|
+
### Quality attributes
|
|
142
|
+
|
|
143
|
+
- Compatibility: callers rely on the registered name `memberships`, the Hydra membership object,
|
|
144
|
+
`list().items` through `Page`, the read-status fields `lastSeenId` and `lastSeenDate`, and the event
|
|
145
|
+
names `created`, `updated`, `deleted`, and `seen`.
|
|
146
|
+
- Latency: `listWithReadStatus` waits for the current user and the `postauth` catalog before its one
|
|
147
|
+
conversation request; it returns every participant in one unpaged object.
|
|
148
|
+
- Test confidence: the package has no unit tests, and the integration spec is not run by any script.
|
|
149
|
+
No coverage threshold is enforced.
|
|
150
|
+
|
|
151
|
+
## Dependency and interaction topology
|
|
152
|
+
|
|
153
|
+
```mermaid
|
|
154
|
+
flowchart LR
|
|
155
|
+
Index[src/index.js] -->|import| Convo[internal-plugin-conversation]
|
|
156
|
+
Index -->|import| Mercury[internal-plugin-mercury]
|
|
157
|
+
Index -->|registerPlugin memberships| Core[webex-core]
|
|
158
|
+
Index --> Memberships[src/memberships.js]
|
|
159
|
+
Memberships -->|WebexPlugin, Page, request| Core
|
|
160
|
+
Memberships -->|ids, current user, envelope, SDK_EVENT| Common[common]
|
|
161
|
+
Memberships -->|webex.internal.conversation| Convo
|
|
162
|
+
Memberships -->|webex.internal.mercury| Mercury
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
| From | To | Kind | Purpose | Ordering or failure boundary |
|
|
166
|
+
| ---- | -- | ---- | ------- | ---------------------------- |
|
|
167
|
+
| `src/index.js` | conversation and Mercury plugins | Import at load | Register `webex.internal.conversation` and `webex.internal.mercury` | Before `memberships` is registered |
|
|
168
|
+
| `src/index.js` | webex-core | Call at import | Register `memberships` | First registration wins |
|
|
169
|
+
| `src/memberships.js` | common | Import | Ids, current user, envelope, vocabulary | Conversion errors are caught in `getMembershipEvent` |
|
|
170
|
+
|
|
171
|
+
## Object and data ownership
|
|
172
|
+
|
|
173
|
+
| Object or state | System of record | May write | May read | Movement or lifecycle |
|
|
174
|
+
| --------------- | ---------------- | --------- | -------- | --------------------- |
|
|
175
|
+
| Membership record (`id`, `roomId`, `personId`, `personEmail`, `isModerator`, `isRoomHidden`, `created`, and more) | Webex REST API | Callers, through `create`, `update`, `remove` | Callers, through `get` and `list` | Fetched per call; never kept here |
|
|
176
|
+
| Member read status (`lastSeenId`, `lastSeenDate`) | Conversation service | Callers, through `updateLastSeen` (their own membership only) | Callers, through `listWithReadStatus` and `seen` events | Built per call from the conversation's participants or the acknowledge activity |
|
|
177
|
+
| Current user (`webex.internal.me`) | The webex instance, written by `@webex/common` | `ensureMyIdIsAvailable` and `createEventEnvelope` | `listWithReadStatus` | Fetched once per instance, then reused |
|
|
178
|
+
| Event envelope | This plugin instance, built by `@webex/common` | `listen()` | `getMembershipEvent` | Replaced by each `listen()` |
|
|
179
|
+
|
|
180
|
+
## Shared and base libraries
|
|
181
|
+
|
|
182
|
+
| Library | Inherited responsibility | Consumers | Version floor | Compatibility rule |
|
|
183
|
+
| ------- | ------------------------ | --------- | ------------- | ------------------ |
|
|
184
|
+
| `@webex/webex-core` `WebexPlugin` | `webex`, `request`, `logger`, and the event methods | `Memberships` | `workspace:*` | Keep the registered name `memberships` |
|
|
185
|
+
| `@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 |
|
|
186
|
+
|
|
187
|
+
## Release and versioning
|
|
188
|
+
|
|
189
|
+
| Artifact | Publish target | Versioning rule | Deprecation window | Changelog or migration obligation |
|
|
190
|
+
| -------- | -------------- | --------------- | ------------------ | --------------------------------- |
|
|
191
|
+
| @webex/plugin-memberships | npm through `deploy:npm` | None declared in the package | None declared | None declared in the package; the workspace owns changelog generation |
|
|
192
|
+
|
|
193
|
+
## Commands and generated artifacts
|
|
194
|
+
|
|
195
|
+
| Command or artifact | Owner | Inputs | Output or side effect | Compatibility boundary |
|
|
196
|
+
| ------------------- | ----- | ------ | --------------------- | ---------------------- |
|
|
197
|
+
| `yarn build:src` | Package scripts | `src` | Writes `dist/` (JavaScript and source maps) through `webex-legacy-tools` | `dist/` is generated and never edited by hand |
|
|
198
|
+
| `yarn build` | Package scripts | `src` | Runs `build:src` | Same output |
|
|
199
|
+
| `yarn test:style` | Package scripts | `src` | ESLint run | The shared config ignores `docs/**` and `*.md` |
|
|
200
|
+
|
|
201
|
+
## Cross-repository topology
|
|
202
|
+
|
|
203
|
+
| Repository or external system | Relationship | Exchanged contract or artifact | Owner | Sequencing constraint |
|
|
204
|
+
| ----------------------------- | ------------- | ------------------------------ | ----- | --------------------- |
|
|
205
|
+
| `@webex/webex-core` (workspace sibling; module spec consulted) | Consumes | `registerPlugin`, `WebexPlugin`, `Page`, `request`, services | @webex/web-sdk | Registered before the first instance |
|
|
206
|
+
| `@webex/common` (workspace sibling; module spec consulted) | Consumes | Hydra ids, `ensureMyIdIsAvailable`, `createEventEnvelope`, `SDK_EVENT` | @webex/web-sdk | None |
|
|
207
|
+
| `@webex/internal-plugin-conversation` (workspace sibling; no spec, code consulted) | Consumes | `get` and `acknowledge` of conversations | Not recorded in this package | `postauth` catalog ready |
|
|
208
|
+
| `@webex/internal-plugin-mercury` (workspace sibling; module spec consulted) | Consumes | `connect`, `event:conversation.activity` | Not recorded in this package | Connected before events flow |
|
|
209
|
+
| `webex`, `webex-node` (workspace siblings) | Consumed by | The plugin registration | @webex/web-sdk | None |
|
|
210
|
+
| `@webex/plugin-teams` (workspace sibling) | Consumed by | Declared peer dependency; its integration spec calls `webex.memberships` | Not recorded in this package | None |
|
|
211
|
+
| Webex REST API memberships resource; conversation service | Consumes | Membership records; conversations and acknowledge activities | Not recorded in this repository | None |
|
|
212
|
+
|
|
213
|
+
## Security architecture
|
|
214
|
+
|
|
215
|
+
```mermaid
|
|
216
|
+
flowchart LR
|
|
217
|
+
Caller[caller] -->|membership bodies, ids, options, messages| Plugin[webex.memberships]
|
|
218
|
+
Plugin -->|SDK token| Hydra[Webex REST API]
|
|
219
|
+
Plugin -->|SDK token| Convo[conversation service]
|
|
220
|
+
Mercury[Mercury socket, spark:all and spark:kms] -->|activities| Plugin
|
|
221
|
+
Plugin -->|membership records, read status, events| Caller
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
- This package holds no credential and no key. Every request carries the SDK authorization added by
|
|
225
|
+
webex-core; the README and the `listen()` JSDoc state that most calls work with the
|
|
226
|
+
`spark:memberships_read` and `spark:memberships_write` scopes, and that `listen()` needs `spark:all`
|
|
227
|
+
and `spark:kms`.
|
|
228
|
+
- Membership ids go into request paths and options into query strings. The package logs none of them
|
|
229
|
+
through `webex.logger`; its logging is described under
|
|
230
|
+
[Observability and operations](#observability-and-operations).
|
|
231
|
+
- What a caller may see or change is decided by the services for the authorized user; the package
|
|
232
|
+
passes records through and keeps no copy. `updateLastSeen` acknowledges as the authorized user.
|
|
233
|
+
|
|
234
|
+
## Domain language
|
|
235
|
+
|
|
236
|
+
| Term | Repository-specific meaning | Authoritative source |
|
|
237
|
+
| ---- | --------------------------- | -------------------- |
|
|
238
|
+
| Membership | A person's relationship to a room: presence, moderator flag, hidden flag, last-seen message | `src/memberships.js` |
|
|
239
|
+
| Room, space | A Webex conversation as the public API names it | `src/memberships.js` |
|
|
240
|
+
| Hydra | The Webex REST API, reached as catalog service `hydra` | `src/memberships.js` |
|
|
241
|
+
| Hydra membership id | base64url of `ciscospark://<cluster>/MEMBERSHIP/<personUUID>:<roomUUID>` | `src/memberships.js` |
|
|
242
|
+
| Read status | Each member's `lastSeenId` (the last message they saw) and `lastSeenDate` | `src/memberships.js` |
|
|
243
|
+
| Read receipt | An `acknowledge` activity that moves the caller's `lastSeenId` to a message | `src/memberships.js` |
|
|
244
|
+
| Hidden space | A one-to-one space the user hid; `isRoomHidden` on that user's membership | `src/memberships.js` |
|
|
245
|
+
| Activity verb | The conversation activity verb that picks the event, for example `add`, `leave`, `acknowledge` | `src/memberships.js` |
|
|
246
|
+
| Event envelope | Webhook-shaped wrapper built once by `listen()` and cloned per event | `src/memberships.js` |
|
|
247
|
+
|
|
248
|
+
## References and maintenance
|
|
249
|
+
|
|
250
|
+
- Decisions: [adr/](adr/index.md)
|
|
251
|
+
- Instantiated specifications and routing: [specs/README.md](specs/README.md)
|
|
252
|
+
- Repository rules and patterns: [package agent instructions](../AGENTS.md)
|
|
253
|
+
- Update this document in the same change that alters package boundaries, resource ownership,
|
|
254
|
+
cross-resource interaction, or cross-cutting architecture.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Getting Started
|
|
3
|
+
title: Getting started
|
|
4
|
+
description: Local setup, build, run, and test routing for @webex/plugin-memberships.
|
|
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-12T17:43:13Z
|
|
13
|
+
validation_status: pass-with-warnings
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Getting started
|
|
17
|
+
|
|
18
|
+
Onboarding for **@webex/plugin-memberships**, a package inside the `webex-js-sdk` Yarn workspace.
|
|
19
|
+
Run `yarn` and `yarn prebuild:modules` at the workspace root, and the package scripts from this
|
|
20
|
+
package directory, `packages/@webex/plugin-memberships`, where `package.json` defines them.
|
|
21
|
+
From the workspace root, `yarn workspace @webex/plugin-memberships <script>` runs the same script.
|
|
22
|
+
|
|
23
|
+
## Prerequisites
|
|
24
|
+
|
|
25
|
+
| Tool or access | Version or requirement |
|
|
26
|
+
| -------------- | ---------------------- |
|
|
27
|
+
| 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` reads `18.x`, which conflicts with the other pins; the build and lint pass on 22.14 |
|
|
28
|
+
| Yarn | `yarn@3.4.1` (`packageManager` in the workspace root `package.json`) |
|
|
29
|
+
| Registry or account access | N/A for building and linting |
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
yarn
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The workspace `deploy.yml` workflow installs with the same command.
|
|
38
|
+
|
|
39
|
+
On a fresh checkout, prebuild the workspace before the first package build. `yarn` does not build
|
|
40
|
+
`@webex/legacy-tools`, whose `webex-legacy-tools` binary runs this package's build, or the sibling
|
|
41
|
+
packages' `dist/`:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
yarn prebuild:modules
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
It runs `yarn`, then builds the tools, the legacy tools, `@webex/webex-core`, and every package, in
|
|
48
|
+
that order (root `package.json`; see the workspace `CONTRIBUTING.md` "Prebuilding").
|
|
49
|
+
|
|
50
|
+
## Build
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
yarn build:src
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`build:src` writes JavaScript and source maps for the two source files to `dist/` through
|
|
57
|
+
`webex-legacy-tools`. `dist/` is ignored by Git. The `build` script runs `yarn build:src`; the package
|
|
58
|
+
emits no type declarations.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
yarn build
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Run
|
|
65
|
+
|
|
66
|
+
N/A — this is a library with no start script. Importing `@webex/plugin-memberships` registers
|
|
67
|
+
`webex.memberships`.
|
|
68
|
+
|
|
69
|
+
## Tests
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
yarn test:style
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
| Tier | Command | Test location | Framework | External dependencies |
|
|
76
|
+
| ---- | ------- | ------------- | --------- | --------------------- |
|
|
77
|
+
| Unit | N/A — `package.json` defines no `test:unit` script | none | N/A | N/A |
|
|
78
|
+
|
|
79
|
+
`test:style` lints `src/` with eslint through `@webex/eslint-config-legacy`.
|
|
80
|
+
|
|
81
|
+
- Coverage or quality gate: none; the package defines no unit test, no coverage script, and the legacy
|
|
82
|
+
Jest configuration it re-exports sets no threshold
|
|
83
|
+
- Enforcement source: N/A
|
|
84
|
+
- Test environment or QA dependencies: none for lint
|
|
85
|
+
|
|
86
|
+
This package has no unit tests: `package.json` defines no `test:unit` script and there is no
|
|
87
|
+
`test/unit` directory. Add both together when you add the first unit case; sibling legacy packages
|
|
88
|
+
define `test:unit` as `webex-legacy-tools test --unit --runner jest`.
|
|
89
|
+
|
|
90
|
+
`yarn test:browser:broken` (manifest command `browser-test`) runs `webex-legacy-tools test
|
|
91
|
+
--integration --runner karma` over `test/integration/spec/memberships.js`, whose 16 cases (none
|
|
92
|
+
skipped) create test users and call the live services. On 2026-11-12 under Node 22.14 the karma bundle
|
|
93
|
+
failed to parse `isbot` (an ES module in the workspace `node_modules`), so the run reported a bundle
|
|
94
|
+
error in Chrome and Firefox headless, ran no case ("0 tests completed"), and still exited zero. It is
|
|
95
|
+
not listed in the table above because it verifies nothing today, and its exit code is not a test
|
|
96
|
+
result.
|
|
97
|
+
|
|
98
|
+
Do not run the aggregate `test` script in `package.json`. It runs `test:style`, then exits 1 with
|
|
99
|
+
`Couldn't find a script named "test:browser"` (checked 2026-11-12). It is deliberately not a manifest
|
|
100
|
+
command; run the commands above instead.
|
|
101
|
+
|
|
102
|
+
## Configuration and secrets
|
|
103
|
+
|
|
104
|
+
- Required configuration: none. The plugin registers no config of its own
|
|
105
|
+
- Environment overrides: none read by this package; `DEBUG=memberships` turns on its `debug` trace
|
|
106
|
+
lines
|
|
107
|
+
- Secret source: N/A; the package holds no secret
|
|
108
|
+
- Package or artifact access: N/A
|
|
109
|
+
- Required neighboring packages: `@webex/webex-core`, `@webex/common`,
|
|
110
|
+
`@webex/internal-plugin-conversation`, and `@webex/internal-plugin-mercury` resolve through the
|
|
111
|
+
workspace; the host must also register `@webex/plugin-people` and `@webex/plugin-logger`, the peer
|
|
112
|
+
dependencies that `listWithReadStatus`, `listen()`, and the event error log reach at run time
|
|
113
|
+
- Platform, simulator, device, or SDK setup: none
|
|
114
|
+
- Never commit credentials or copy production secrets into a local config.
|
|
115
|
+
|
|
116
|
+
## First-run verification
|
|
117
|
+
|
|
118
|
+
1. Run `yarn build:src` and check that it reports `Built plugin-memberships: 2 files`.
|
|
119
|
+
2. Run `yarn test:style`.
|
|
120
|
+
|
|
121
|
+
Expected result: both commands exit zero. `test:style` prints warnings but no errors: 1 in
|
|
122
|
+
`src/memberships.js` (the `require` statement for `debug`) and "File ignored" for
|
|
123
|
+
`src/docs/README.md`.
|
|
124
|
+
|
|
125
|
+
## Next steps
|
|
126
|
+
|
|
127
|
+
- [Package architecture](architecture.md)
|
|
128
|
+
- [Specification registry](specs/README.md)
|
|
129
|
+
- [Documentation index](index.md)
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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-12T17:43:13Z
|
|
10
|
+
validation_status: pass-with-warnings
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
# @webex/plugin-memberships documentation
|
|
14
|
+
|
|
15
|
+
Doc map for developers and agents working on the Memberships 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 Memberships 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 its registration, and `src/memberships.js` for the API.
|
|
37
|
+
|
|
38
|
+
## Related repository resources
|
|
39
|
+
|
|
40
|
+
- [`README.md`](../README.md) — retained npm page; context only, it shows only `get(id)` and the
|
|
41
|
+
scopes the plugin needs, see [ADR-0001](adr/0001-retain-product-readme.md)
|
|
42
|
+
- [`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-12T17:43:13Z
|
|
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
|
+
| Memberships 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.memberships`: membership create, read, list, update, and delete through Hydra; member read status and read receipts through the conversation service; webhook-shaped membership events from the Mercury socket | Partial | `src/docs/README.md` |
|
|
46
|
+
|
|
47
|
+
Generator-side field measurement for the module is complete (100%, assessed 2026-11-12). Independent semantic validation passed with warnings on 2026-11-12 in validator runtime 01a1d0d7-989e-7f62-adca-8631c8de7ccc (0 Blocking, 1 Important). A runnable unit suite and characterization baseline remain pending; coverage stays Partial.
|
|
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 build:src` and `test:style`, and the module spec |
|
|
54
|
+
| A stable code, package, or component boundary | `src/docs/README.md` | Build and lint |
|
|
55
|
+
| A public method, request path, read-status or read-receipt field, event field, or the registration | The owning architecture section, `src/docs/README.md`, and the native definition in `src/memberships.js`, `src/index.js`, or `package.json` | Build and lint; add a `test/unit/spec` case and a `test:unit` script for the changed path, since the package has no unit tests and the integration spec is not run |
|
|
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
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@webex/common": "3.13.0-next.1",
|
|
37
|
-
"@webex/internal-plugin-conversation": "3.13.0-next.
|
|
38
|
-
"@webex/internal-plugin-mercury": "3.13.0-next.
|
|
39
|
-
"@webex/webex-core": "3.13.0-next.
|
|
37
|
+
"@webex/internal-plugin-conversation": "3.13.0-next.9",
|
|
38
|
+
"@webex/internal-plugin-mercury": "3.13.0-next.5",
|
|
39
|
+
"@webex/webex-core": "3.13.0-next.5",
|
|
40
40
|
"debug": "^4.3.4",
|
|
41
41
|
"lodash": "^4.17.21"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@webex/plugin-logger": "3.13.0-next.
|
|
45
|
-
"@webex/plugin-messages": "3.13.0-next.
|
|
46
|
-
"@webex/plugin-people": "3.13.0-next.
|
|
47
|
-
"@webex/plugin-rooms": "3.13.0-next.
|
|
44
|
+
"@webex/plugin-logger": "3.13.0-next.5",
|
|
45
|
+
"@webex/plugin-messages": "3.13.0-next.9",
|
|
46
|
+
"@webex/plugin-people": "3.13.0-next.5",
|
|
47
|
+
"@webex/plugin-rooms": "3.13.0-next.9"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "yarn build:src",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"test:browser:broken": "webex-legacy-tools test --integration --runner karma",
|
|
55
55
|
"test:style": "eslint ./src/**/*.*"
|
|
56
56
|
},
|
|
57
|
-
"version": "3.13.0-next.
|
|
57
|
+
"version": "3.13.0-next.9"
|
|
58
58
|
}
|