@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,405 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/plugin-memberships",
|
|
5
|
+
"purpose": "Public plugin registered as webex.memberships that manages Webex memberships (a person's relationship to a room) through the Webex REST API memberships resource (catalog service hydra): create POSTs a membership, get and remove take a membership object or id, list resolves a webex-core Page, and update PUTs the whole membership object, which also sets isModerator or hides a one-to-one space through isRoomHidden. listWithReadStatus({roomId}) waits for the current user and the postauth service catalog, reads the conversation with every participant's acknowledgement from the internal conversation plugin, and resolves {items} with one membership per participant carrying lastSeenId and lastSeenDate when the member has seen the space. updateLastSeen(message) sends a read receipt through the conversation acknowledge call and resolves the updated membership. listen() builds a webhook-style event envelope, connects the Mercury socket, and turns conversation activities into created, updated, deleted, and seen events on webex.memberships. Importing the package also registers the conversation and mercury internal plugins. Nothing is cached or persisted.",
|
|
6
|
+
"category": "cat2-legacy",
|
|
7
|
+
"primary_languages": [
|
|
8
|
+
"javascript"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"topology": "Orchestrator-plus-components",
|
|
12
|
+
"commands": {
|
|
13
|
+
"install": {
|
|
14
|
+
"command": "yarn",
|
|
15
|
+
"source_file": "../../../.github/workflows/deploy.yml",
|
|
16
|
+
"role": "install"
|
|
17
|
+
},
|
|
18
|
+
"prebuild": {
|
|
19
|
+
"command": "yarn prebuild:modules",
|
|
20
|
+
"source_file": "../../../CONTRIBUTING.md",
|
|
21
|
+
"role": "other"
|
|
22
|
+
},
|
|
23
|
+
"compile": {
|
|
24
|
+
"command": "yarn build",
|
|
25
|
+
"source_file": "package.json",
|
|
26
|
+
"role": "compile",
|
|
27
|
+
"verified_at": "2026-11-12T17:20:06Z"
|
|
28
|
+
},
|
|
29
|
+
"build": {
|
|
30
|
+
"command": "yarn build:src",
|
|
31
|
+
"source_file": "package.json",
|
|
32
|
+
"role": "package",
|
|
33
|
+
"verified_at": "2026-11-12T17:20:05Z"
|
|
34
|
+
},
|
|
35
|
+
"unit-test": "[NEEDS HUMAN INPUT] -- package.json defines no test:unit script and the package has no test/unit directory; its only spec, test/integration/spec/memberships.js, runs only under test:browser:broken, which currently bundles nothing. Add a unit suite and script before recording a command here.",
|
|
36
|
+
"lint": {
|
|
37
|
+
"command": "yarn test:style",
|
|
38
|
+
"source_file": "package.json",
|
|
39
|
+
"role": "lint",
|
|
40
|
+
"verified_at": "2026-11-12T17:29:18Z"
|
|
41
|
+
},
|
|
42
|
+
"browser-test": {
|
|
43
|
+
"command": "yarn test:browser:broken",
|
|
44
|
+
"source_file": "package.json",
|
|
45
|
+
"role": "other"
|
|
46
|
+
},
|
|
47
|
+
"deploy": {
|
|
48
|
+
"command": "yarn deploy:npm",
|
|
49
|
+
"source_file": "package.json",
|
|
50
|
+
"role": "deploy"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"toolchain": [
|
|
54
|
+
{
|
|
55
|
+
"name": "node",
|
|
56
|
+
"version": ">=18",
|
|
57
|
+
"origin": "repo-config",
|
|
58
|
+
"source_file": "package.json"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "node",
|
|
62
|
+
"version": "22.14",
|
|
63
|
+
"origin": "repo-config",
|
|
64
|
+
"source_file": "../../../AGENTS.md"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "node",
|
|
68
|
+
"version": "lts/jod",
|
|
69
|
+
"origin": "repo-config",
|
|
70
|
+
"source_file": "../../../.nvmrc"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "node",
|
|
74
|
+
"version": "18.x",
|
|
75
|
+
"origin": "repo-config",
|
|
76
|
+
"source_file": "../../../package.json"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "yarn",
|
|
80
|
+
"version": "3.4.1",
|
|
81
|
+
"origin": "repo-config",
|
|
82
|
+
"source_file": "../../../package.json"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "babel",
|
|
86
|
+
"version": "^7.17.10",
|
|
87
|
+
"origin": "repo-config",
|
|
88
|
+
"source_file": "package.json"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "eslint",
|
|
92
|
+
"version": "^8.24.0",
|
|
93
|
+
"origin": "repo-config",
|
|
94
|
+
"source_file": "package.json"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "prettier",
|
|
98
|
+
"version": "^2.7.1",
|
|
99
|
+
"origin": "repo-config",
|
|
100
|
+
"source_file": "package.json"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"quality_gates": {
|
|
104
|
+
"code_coverage": {
|
|
105
|
+
"origin": "none",
|
|
106
|
+
"declared_by": "rarajes2@cisco.com via the bootstrap questionnaire (generator check: package.json defines no test:unit or coverage script, the package has no test/unit directory, and jest.config.js re-exports @webex/jest-config-legacy, which sets no coverageThreshold)"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"coverage_status_definitions": {
|
|
110
|
+
"specced": ">=80% public surface specced, drift <5% - spec is authoritative",
|
|
111
|
+
"partial": "40-80% specced - spec is a hint, cross-check code",
|
|
112
|
+
"untracked": "<40% specced - code is the source of truth"
|
|
113
|
+
},
|
|
114
|
+
"spec_source_policy": {
|
|
115
|
+
"mode": "keep-separate",
|
|
116
|
+
"migrated_source_disposition": "retain",
|
|
117
|
+
"disposition_decided_by": "rarajes2@cisco.com",
|
|
118
|
+
"disposition_decided_at": "2026-11-12T17:22:00Z",
|
|
119
|
+
"decided_by": "rarajes2@cisco.com",
|
|
120
|
+
"decided_at": "2026-11-12T17:22:00Z",
|
|
121
|
+
"decision_record": "docs/adr/0001-retain-product-readme.md"
|
|
122
|
+
},
|
|
123
|
+
"spec_sources": [
|
|
124
|
+
{
|
|
125
|
+
"path": "README.md",
|
|
126
|
+
"scope": "repo",
|
|
127
|
+
"role": "reference-only",
|
|
128
|
+
"canonical": false,
|
|
129
|
+
"use_by_agents": "context-only",
|
|
130
|
+
"post_migration_action": "retain",
|
|
131
|
+
"deletion_status": "not-applicable",
|
|
132
|
+
"notes": "npm page, kept unchanged under keep-separate. It repeats its Install and Usage sections; its one example, webex.memberships.get(id), its note that the spark:memberships_read and spark:memberships_write scopes cover most calls, and its note that listen() needs spark:all and spark:kms match the code. It documents nothing about create, list, update, remove, listWithReadStatus, updateLastSeen, or the events. See docs/adr/0001-retain-product-readme.md."
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"modules": [
|
|
136
|
+
{
|
|
137
|
+
"path": "src",
|
|
138
|
+
"canonical_spec": "src/docs/README.md",
|
|
139
|
+
"coverage_status": "Partial",
|
|
140
|
+
"coverage_evidence": "Field coverage 100% (13/13) assessed 2026-11-12 by the generator; critical field coverage 7/7. The package has no unit tests: package.json defines no test:unit script and there is no test/unit directory, so none of MOD-001 to MOD-012 or INV-001 to INV-005 has running test evidence. The integration spec test/integration/spec/memberships.js holds 16 live-service cases (none skipped) for create, get, list, update, remove, listWithReadStatus, updateLastSeen, hiding a one-to-one space, and the created, updated, deleted, and seen events, but no package script runs it: test:browser:broken bundles nothing (isbot parse error, no case run, exit 0) and test:integration does not exist. build:src, build, and test:style exit 0 (1 warning, 0 errors before this spec existed). Independent validation has not run. No characterization baseline exists; the module remains Partial pending a unit suite, a characterization baseline, independent validation, and promotion review.",
|
|
141
|
+
"last_assessed": "2026-11-12",
|
|
142
|
+
"contracts": {
|
|
143
|
+
"provides": [
|
|
144
|
+
"memberships-public-sdk"
|
|
145
|
+
],
|
|
146
|
+
"requires": [
|
|
147
|
+
"hydra-memberships-http",
|
|
148
|
+
"webex-core-plugin-host",
|
|
149
|
+
"webex-core-page",
|
|
150
|
+
"webex-core-services",
|
|
151
|
+
"common-hydra-ids",
|
|
152
|
+
"common-event-envelope",
|
|
153
|
+
"conversation-internal-sdk",
|
|
154
|
+
"mercury-activity-events"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"section_profile": {
|
|
158
|
+
"has_tiers": false,
|
|
159
|
+
"has_ui": false,
|
|
160
|
+
"crosses_service_boundaries": true,
|
|
161
|
+
"holds_client_state": false,
|
|
162
|
+
"enforces_domain_rules": true,
|
|
163
|
+
"is_concurrent_async": true,
|
|
164
|
+
"owns_persistence": false,
|
|
165
|
+
"stateful_transitions": false,
|
|
166
|
+
"exposes_wire_protocol": true,
|
|
167
|
+
"ui_multi_screen": false,
|
|
168
|
+
"large_data_model": false,
|
|
169
|
+
"returns_caller_errors": true,
|
|
170
|
+
"module_specific_conventions": true,
|
|
171
|
+
"published_package": true,
|
|
172
|
+
"embedded_in_host": false,
|
|
173
|
+
"has_design_tradeoff": true,
|
|
174
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
175
|
+
"resolved_at": "2026-11-12T17:23:00Z",
|
|
176
|
+
"has_submodules": false,
|
|
177
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
178
|
+
"has_submodules_computed_at": "2026-11-12T17:23:00Z"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"contract_catalog": {
|
|
183
|
+
"index_path": "docs/architecture.md",
|
|
184
|
+
"definitions": {
|
|
185
|
+
"memberships-public-sdk": {
|
|
186
|
+
"kind": "sdk",
|
|
187
|
+
"publication": "published",
|
|
188
|
+
"source_kind": "repository-path",
|
|
189
|
+
"source": "package.json",
|
|
190
|
+
"summary": "Published npm package (public plugin). main is dist/index.js and devMain is src/index.js; no type declarations are published. Importing it registers the conversation and mercury internal plugins and then Memberships as public plugin 'memberships' with no config; the first registration of the name wins. The entry exports only the default Memberships class. webex.memberships exposes create, get, list, update, remove, listWithReadStatus, updateLastSeen, and listen, triggers created, updated, deleted, and seen events, and carries the JSDoc-private onWebexApiEvent and getMembershipEvent; specified in src/docs/README.md."
|
|
191
|
+
},
|
|
192
|
+
"hydra-memberships-http": {
|
|
193
|
+
"kind": "http",
|
|
194
|
+
"publication": "internal",
|
|
195
|
+
"source_kind": "external",
|
|
196
|
+
"source": "Webex REST API memberships resource (catalog service name hydra, reached through service: 'hydra' in src/memberships.js; route definitions are not in this repository)",
|
|
197
|
+
"summary": "POST /memberships with a membership body; GET /memberships/<id>; GET /memberships with the caller's query object (roomId, personId, personEmail, max) answering a paged {items} with Link headers; PUT /memberships/<id> with the whole membership body; DELETE /memberships/<id> answering 204. Membership ids are base64url of ciscospark://<cluster>/MEMBERSHIP/<personUUID>:<roomUUID>."
|
|
198
|
+
},
|
|
199
|
+
"webex-core-plugin-host": {
|
|
200
|
+
"kind": "sdk",
|
|
201
|
+
"publication": "published",
|
|
202
|
+
"source_kind": "external",
|
|
203
|
+
"source": "@webex/webex-core (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-013, MOD-014)",
|
|
204
|
+
"summary": "registerPlugin keys a public plugin by its raw name (memberships, first registration wins) and adds webex.<name> to later instances; WebexPlugin supplies webex, request, logger, and the ampersand event methods on, off, trigger, listenTo, and stopListening."
|
|
205
|
+
},
|
|
206
|
+
"webex-core-page": {
|
|
207
|
+
"kind": "sdk",
|
|
208
|
+
"publication": "published",
|
|
209
|
+
"source_kind": "external",
|
|
210
|
+
"source": "@webex/webex-core Page (module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-054)",
|
|
211
|
+
"summary": "new Page(res, webex) stores the body items and parsed Link headers; next and previous request the linked URL and resolve a new Page; iteration yields items in order."
|
|
212
|
+
},
|
|
213
|
+
"webex-core-services": {
|
|
214
|
+
"kind": "sdk",
|
|
215
|
+
"publication": "published",
|
|
216
|
+
"source_kind": "external",
|
|
217
|
+
"source": "@webex/webex-core services (no module spec coverage; code consulted: packages/@webex/webex-core/src/lib/services/services.js)",
|
|
218
|
+
"summary": "waitForCatalog('postauth') resolves when the post-authentication catalog is ready, starting catalog initialization when a supertoken exists and nothing is collecting, and otherwise rejects after 60 seconds; getClusterId(url) returns the catalog cluster id of a URL."
|
|
219
|
+
},
|
|
220
|
+
"common-hydra-ids": {
|
|
221
|
+
"kind": "sdk",
|
|
222
|
+
"publication": "published",
|
|
223
|
+
"source_kind": "external",
|
|
224
|
+
"source": "@webex/common (workspace package; module spec consulted: packages/@webex/common/src/docs/README.md MOD-006, INV-001, INV-005; code consulted: packages/@webex/common/src/uuid-utils.js and constants.js)",
|
|
225
|
+
"summary": "buildHydraMembershipId encodes base64url ciscospark://<cluster>/MEMBERSHIP/<personUUID>:<spaceUUID>; buildHydraRoomId and buildHydraMessageId use the given cluster; buildHydraPersonId and buildHydraOrgId always use cluster us; getHydraClusterString maps the internal US clusters to us and throws below three cluster parts; getHydraRoomType returns direct for the ONE_ON_ONE tag, else group; deconstructHydraId decodes an id into {id, type, cluster} and throws a TypeError on undefined; SDK_EVENT holds the activity verbs, fields, tags, and external event names."
|
|
226
|
+
},
|
|
227
|
+
"common-event-envelope": {
|
|
228
|
+
"kind": "sdk",
|
|
229
|
+
"publication": "published",
|
|
230
|
+
"source_kind": "external",
|
|
231
|
+
"source": "@webex/common createEventEnvelope and ensureMyIdIsAvailable (module spec consulted: packages/@webex/common/src/docs/README.md MOD-011; code consulted: packages/@webex/common/src/event-envelope.js)",
|
|
232
|
+
"summary": "ensureMyIdIsAvailable(webex) resolves at once when webex.internal has me, else stores webex.people.get('me') as webex.internal.me and rejects when that lookup fails. createEventEnvelope(webex, resource) resolves {createdBy, orgId, resource, ownedBy: creator, status: active, created, data: {}}; when the identity lookup fails it resolves undefined instead of rejecting."
|
|
233
|
+
},
|
|
234
|
+
"conversation-internal-sdk": {
|
|
235
|
+
"kind": "sdk",
|
|
236
|
+
"publication": "published",
|
|
237
|
+
"source_kind": "external",
|
|
238
|
+
"source": "@webex/internal-plugin-conversation (workspace package; no module spec exists; code consulted: packages/@webex/internal-plugin-conversation/src/conversation.js)",
|
|
239
|
+
"summary": "Importing the package registers internal plugin conversation. get({id, cluster}, options) builds the conversation URL from the cluster and id, sends the options as the query (dropping its includeParticipants default when participantAckFilter is passed), rejects with an Error when no URL can be found, and resolves one conversation with id, tags, and participants.items carrying entryUUID, entryEmailAddress or entryEmail, displayName, orgId, and roomProperties. acknowledge(conversation, {id}) submits an acknowledge activity for that activity id and resolves the submitted activity with actor, object, target, and published."
|
|
240
|
+
},
|
|
241
|
+
"mercury-activity-events": {
|
|
242
|
+
"kind": "event",
|
|
243
|
+
"publication": "internal",
|
|
244
|
+
"source_kind": "external",
|
|
245
|
+
"source": "@webex/internal-plugin-mercury (workspace package; module spec consulted: packages/@webex/internal-plugin-mercury/src/docs/README.md MOD-001, MOD-002, MOD-009; code consulted: packages/@webex/internal-plugin-mercury/src/mercury.js)",
|
|
246
|
+
"summary": "Importing the package registers internal plugin mercury. connect() shares a connect in flight and resolves at once when connected; an inbound envelope with event type conversation.activity is emitted as event:conversation.activity with data.activity; a listener error is caught and logged by _emit."
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"spec_policy": {
|
|
251
|
+
"require_what_and_why": true,
|
|
252
|
+
"require_provenance": true,
|
|
253
|
+
"protected_specs": [
|
|
254
|
+
"src/docs/README.md"
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
"validation": {
|
|
258
|
+
"generator_runtime": "claude-code",
|
|
259
|
+
"generator_model": "claude-opus-5-5",
|
|
260
|
+
"generator_runtime_source": "host-metadata",
|
|
261
|
+
"source_commit": "46f5268b3a42650fd59b45795b7a6bc193b210b0",
|
|
262
|
+
"minimum_independence": "different-runtime",
|
|
263
|
+
"blocking_severities": [
|
|
264
|
+
"Blocking"
|
|
265
|
+
],
|
|
266
|
+
"validator_runtime": "01a1d0d7-989e-7f62-adca-8631c8de7ccc",
|
|
267
|
+
"validator_run_id": "01a1d0d7-989e-7f62-adca-8631c8de7ccc",
|
|
268
|
+
"validator_runtime_source": "invocation-input",
|
|
269
|
+
"runtime_fallback_tier": "different-runtime"
|
|
270
|
+
},
|
|
271
|
+
"layout": {
|
|
272
|
+
"sdd_root": ".sdd",
|
|
273
|
+
"docs_root": "docs",
|
|
274
|
+
"agent_entry_path": "AGENTS.md",
|
|
275
|
+
"standing_docs_root": "docs",
|
|
276
|
+
"spec_index_path": "docs/specs/README.md",
|
|
277
|
+
"module_docs_strategy": "source-local",
|
|
278
|
+
"module_docs_relative_path": "docs/README.md",
|
|
279
|
+
"module_docs_decision": {
|
|
280
|
+
"basis": "repo-standards-default",
|
|
281
|
+
"reason": "No module-local documentation existed. The source-local default gives src/docs/README.md. test:style runs eslint ./src/**/*.*, and the shared @webex/eslint-config-legacy ignore patterns exclude docs/** and *.md; build:src processes -js -ts only, so Markdown under src/ does not enter dist/.",
|
|
282
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
283
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
284
|
+
},
|
|
285
|
+
"repo_context_decision": {
|
|
286
|
+
"path": ".repo-context.json",
|
|
287
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
288
|
+
"action": "create",
|
|
289
|
+
"schema_action": "create",
|
|
290
|
+
"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.",
|
|
291
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
292
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
293
|
+
},
|
|
294
|
+
"artifact_decisions": [
|
|
295
|
+
{
|
|
296
|
+
"path": "docs/service.md",
|
|
297
|
+
"action": "omit",
|
|
298
|
+
"reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
|
|
299
|
+
"decided_by": "claude-code (code evidence)",
|
|
300
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"path": "mkdocs.yml",
|
|
304
|
+
"action": "omit",
|
|
305
|
+
"reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
|
|
306
|
+
"decided_by": "claude-code (code evidence)",
|
|
307
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"path": "api-specs/openapi.yaml",
|
|
311
|
+
"action": "omit",
|
|
312
|
+
"reason": "The package serves no HTTP routes. It is a client of the Webex REST API memberships resource; its published surface is the npm export described by memberships-public-sdk.",
|
|
313
|
+
"decided_by": "claude-code (code evidence)",
|
|
314
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"path": "SECURITY.md",
|
|
318
|
+
"action": "omit",
|
|
319
|
+
"reason": "No package-level security policy exists. The workspace owns security policy, and a per-package copy would duplicate it; security architecture is described in docs/architecture.md.",
|
|
320
|
+
"decided_by": "claude-code (code evidence)",
|
|
321
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"path": "CONTRIBUTING.md",
|
|
325
|
+
"action": "omit",
|
|
326
|
+
"reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
|
|
327
|
+
"decided_by": "claude-code (code evidence)",
|
|
328
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"path": "CHANGELOG.md",
|
|
332
|
+
"action": "omit",
|
|
333
|
+
"reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
|
|
334
|
+
"decided_by": "claude-code (code evidence)",
|
|
335
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"path": "CTO_CHECKLIST.yml",
|
|
339
|
+
"action": "omit",
|
|
340
|
+
"reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
|
|
341
|
+
"decided_by": "claude-code (code evidence)",
|
|
342
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
346
|
+
"action": "omit",
|
|
347
|
+
"reason": "Omitted together with CTO_CHECKLIST.yml.",
|
|
348
|
+
"decided_by": "claude-code (code evidence)",
|
|
349
|
+
"decided_at": "2026-11-12T17:23:00Z"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"template_roots": {
|
|
353
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
354
|
+
},
|
|
355
|
+
"contract_index_path": "docs/architecture.md",
|
|
356
|
+
"repo_skills_root": ".sdd/skills",
|
|
357
|
+
"monorepo_package": {
|
|
358
|
+
"package_path": "packages/@webex/plugin-memberships",
|
|
359
|
+
"root_manifest_path": "../../../.sdd/manifest.json",
|
|
360
|
+
"templates_root_path": "../../../.sdd/templates/repo-standards"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"tooling": {
|
|
364
|
+
"sdlc_skills": {
|
|
365
|
+
"source_ref": "repo-annotation@2.3.1"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"coverage_ratchet": {
|
|
369
|
+
"enabled": true,
|
|
370
|
+
"waivers": []
|
|
371
|
+
},
|
|
372
|
+
"substrate": {
|
|
373
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
374
|
+
"consumed": [
|
|
375
|
+
"@webex/eslint-config-legacy via .eslintrc.js",
|
|
376
|
+
"@webex/babel-config-legacy via babel.config.js",
|
|
377
|
+
"@webex/jest-config-legacy via jest.config.js (no unit spec uses it)",
|
|
378
|
+
"@webex/legacy-tools build and test runner via package.json",
|
|
379
|
+
"package README.md (context only)",
|
|
380
|
+
"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)"
|
|
381
|
+
],
|
|
382
|
+
"compliance_tier": "baseline"
|
|
383
|
+
},
|
|
384
|
+
"section_profiles": {
|
|
385
|
+
"repo": {
|
|
386
|
+
"owns_datastore": false,
|
|
387
|
+
"holds_client_state": false,
|
|
388
|
+
"components_interact": true,
|
|
389
|
+
"domain_data_across_components": true,
|
|
390
|
+
"caches_data": false,
|
|
391
|
+
"observability_convention": false,
|
|
392
|
+
"deploys_to_infra": false,
|
|
393
|
+
"shared_base_libs": true,
|
|
394
|
+
"is_monorepo": false,
|
|
395
|
+
"multi_platform": false,
|
|
396
|
+
"published_package": true,
|
|
397
|
+
"embedded_in_host": false,
|
|
398
|
+
"cross_repo_deps_material": true,
|
|
399
|
+
"security_arch_warranted": true,
|
|
400
|
+
"exposes_commands_or_artifacts": true
|
|
401
|
+
},
|
|
402
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
403
|
+
"resolved_at": "2026-11-12T17:23:00Z"
|
|
404
|
+
}
|
|
405
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: agent-entry
|
|
3
|
+
generated_from: agents@0.3.0
|
|
4
|
+
generated_by: claude-code
|
|
5
|
+
approved_by: rarajes2@cisco.com
|
|
6
|
+
updated_at: 2026-11-12T17:43:13Z
|
|
7
|
+
validation_status: pass-with-warnings
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
Package-scoped SDD entry for `@webex/plugin-memberships`, the public `memberships` plugin of the SDK
|
|
13
|
+
(it adds, reads, lists, updates, and removes people's memberships in Webex rooms, reports each
|
|
14
|
+
member's read status, sends read receipts, and emits membership events from the Mercury socket). This
|
|
15
|
+
file 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, method names, or request paths. Verify them from this
|
|
23
|
+
package's source.
|
|
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) (Memberships 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 a public SDK surface, so its contract artifact is `package.json` plus the `src/index.js`
|
|
39
|
+
entry. It 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 `yarn` and
|
|
44
|
+
`yarn prebuild:modules` at the workspace root, and the package scripts below from this package
|
|
45
|
+
directory, `packages/@webex/plugin-memberships`, where `package.json` defines them. From the workspace
|
|
46
|
+
root, `yarn workspace @webex/plugin-memberships <script>` runs the same script.
|
|
47
|
+
|
|
48
|
+
| Task | Command |
|
|
49
|
+
| ---------------------- | ------- |
|
|
50
|
+
| Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command); on a fresh checkout run `yarn prebuild:modules` once, because `yarn` does not build `@webex/legacy-tools` or sibling `dist/` |
|
|
51
|
+
| Start dev environment | N/A — library package with no start script in `package.json` |
|
|
52
|
+
| Run tests | N/A — the package has no unit tests and no `test:unit` script (see below) |
|
|
53
|
+
| Run linters | `yarn test:style` |
|
|
54
|
+
| Build/release artifact | `yarn build:src` (JavaScript and source maps to `dist/`) |
|
|
55
|
+
| Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
|
|
56
|
+
|
|
57
|
+
`yarn build` runs `yarn build:src` and produces the same output; the package emits no type
|
|
58
|
+
declarations.
|
|
59
|
+
|
|
60
|
+
Do not use the aggregate `test` script: after lint it calls `test:browser`, which this package does
|
|
61
|
+
not define, and exits 1. `yarn test:browser:broken` runs `test/integration/spec` through karma but
|
|
62
|
+
verifies nothing today; see [Getting started](docs/getting-started.md#tests) for its state.
|
|
63
|
+
|
|
64
|
+
If a required command is unknown, stop and ask for the exact command.
|
|
65
|
+
|
|
66
|
+
## 2. Agent Persona and Scope
|
|
67
|
+
|
|
68
|
+
You are the Webex JS SDK engineering assistant for `@webex/plugin-memberships`.
|
|
69
|
+
|
|
70
|
+
Primary outcomes:
|
|
71
|
+
|
|
72
|
+
- Deliver production-safe changes with build and lint passing, and unit tests for what you change.
|
|
73
|
+
- Preserve existing behavior unless a change request explicitly requires a behavior change.
|
|
74
|
+
- Keep docs and configuration aligned with code changes.
|
|
75
|
+
|
|
76
|
+
Definition of done:
|
|
77
|
+
|
|
78
|
+
1. Requested change is implemented.
|
|
79
|
+
2. Build and lint pass locally, and any unit cases you added pass.
|
|
80
|
+
3. Updated docs cover new behavior, including the owning module spec.
|
|
81
|
+
4. PR summary includes risks and rollback notes.
|
|
82
|
+
|
|
83
|
+
## 3. Repository Knowledge
|
|
84
|
+
|
|
85
|
+
### Tech Stack
|
|
86
|
+
|
|
87
|
+
| Area | Tooling | Version |
|
|
88
|
+
| ---------------- | ------- | ------- |
|
|
89
|
+
| Language runtime | node; JavaScript sources | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=18`; the workspace root `package.json` `engines.node` reads `18.x` |
|
|
90
|
+
| Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
|
|
91
|
+
| Test framework | None runs: no unit spec; the integration spec uses mocha-style `describe` with sinon, `@webex/test-helper-chai`, and `@webex/test-helper-test-users` under karma | — |
|
|
92
|
+
| Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
|
|
93
|
+
|
|
94
|
+
### Project Map
|
|
95
|
+
|
|
96
|
+
- `src/index.js`: imports the conversation and Mercury internal plugins, registers public plugin
|
|
97
|
+
`memberships`, and exports `Memberships` (default only).
|
|
98
|
+
- `src/memberships.js`: `Memberships` — `create`, `get`, `list`, `update`, `remove`,
|
|
99
|
+
`listWithReadStatus`, `updateLastSeen`, `listen`, and the private event handlers
|
|
100
|
+
`onWebexApiEvent` and `getMembershipEvent`.
|
|
101
|
+
- `test/integration/spec/memberships.js`: live-service cases that no script runs today.
|
|
102
|
+
- `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
|
|
103
|
+
- `dist/`: generated build output. Never edit by hand.
|
|
104
|
+
- `README.md`: retained npm page, context only; it shows only `get(id)` and the scopes the plugin
|
|
105
|
+
needs; see [ADR-0001](docs/adr/0001-retain-product-readme.md).
|
|
106
|
+
- Spec for every file under `src/`: `src/docs/README.md`.
|
|
107
|
+
|
|
108
|
+
### Critical Constraints
|
|
109
|
+
|
|
110
|
+
- The plugin is `webex.memberships`; `webex` and `webex-node` register it by import, and applications
|
|
111
|
+
and the workspace samples call it.
|
|
112
|
+
- Importing the package must keep registering `webex.internal.conversation` and
|
|
113
|
+
`webex.internal.mercury`, which `listWithReadStatus`, `updateLastSeen`, and `listen()` use (`MOD-001`
|
|
114
|
+
in the module spec).
|
|
115
|
+
- Events are `created`, `updated`, `deleted`, and `seen`, built from a deep clone of the stored
|
|
116
|
+
envelope, and only for the activity verbs listed in `MOD-011` (`INV-002`, `INV-003`).
|
|
117
|
+
- Membership, room, and message ids must stay Hydra ids built with the `@webex/common` helpers
|
|
118
|
+
(`INV-001`).
|
|
119
|
+
- `getMembershipEvent` must keep catching every error; a throw would reach Mercury's listener chain.
|
|
120
|
+
|
|
121
|
+
## 4. Testing Workflow
|
|
122
|
+
|
|
123
|
+
Run checks in this order, from the package directory:
|
|
124
|
+
|
|
125
|
+
1. `yarn build:src`
|
|
126
|
+
2. `yarn test:style`
|
|
127
|
+
|
|
128
|
+
Run `yarn prebuild:modules` once on a fresh checkout so `webex-legacy-tools` and the sibling packages'
|
|
129
|
+
`dist/` exist.
|
|
130
|
+
|
|
131
|
+
Testing rules:
|
|
132
|
+
|
|
133
|
+
- The package has no unit tests. When you change behavior, add a `test/unit/spec` file and the
|
|
134
|
+
matching `test:unit` script (`webex-legacy-tools test --unit --runner jest`, as sibling legacy
|
|
135
|
+
packages define it) in the same change; the integration spec does not run, so it does not count as
|
|
136
|
+
coverage.
|
|
137
|
+
- Use `@webex/test-helper-mock-webex` with sinon stubs for `webex.request`,
|
|
138
|
+
`webex.internal.conversation`, `webex.internal.services`, `webex.internal.mercury`, and
|
|
139
|
+
`webex.people`, and assert with `@webex/test-helper-chai`.
|
|
140
|
+
- Use `assert.calledOnceWithExactly` for call arguments, and parametrize when more than three cases are
|
|
141
|
+
alike, such as the activity verbs.
|
|
142
|
+
- Cover failure paths and edge cases, not only happy paths.
|
|
143
|
+
- Do not remove tests to make CI pass.
|
|
144
|
+
|
|
145
|
+
No coverage gate applies to this package; do not infer one.
|
|
146
|
+
|
|
147
|
+
## 5. Code Style and Patterns
|
|
148
|
+
|
|
149
|
+
Coding expectations:
|
|
150
|
+
|
|
151
|
+
- Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
|
|
152
|
+
`root: true` and extends the legacy config.
|
|
153
|
+
- Prefer small functions over large procedural blocks.
|
|
154
|
+
- Make error handling explicit; the public methods do not validate their arguments today, so add a
|
|
155
|
+
rejection rather than a synchronous throw when you add a check.
|
|
156
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
157
|
+
|
|
158
|
+
Pattern example:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
Preferred:
|
|
162
|
+
- Send membership requests with this.request({service: 'hydra', resource: 'memberships/...'}).
|
|
163
|
+
- Build ids with the @webex/common Hydra helpers and getHydraClusterString.
|
|
164
|
+
- Clone this.eventEnvelope before filling an event; return null from getMembershipEvent on error.
|
|
165
|
+
|
|
166
|
+
Avoid:
|
|
167
|
+
- Building Hydra ids by hand or with a fixed cluster.
|
|
168
|
+
- Throwing from the Mercury event handlers.
|
|
169
|
+
- Treating README.md as the full usage reference.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## 6. Git Workflow
|
|
173
|
+
|
|
174
|
+
- Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
|
|
175
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
|
|
176
|
+
the workspace `CONTRIBUTING.md` requires for pull requests.
|
|
177
|
+
- Keep commits focused and reversible.
|
|
178
|
+
- Rebase on the target branch before opening a pull request.
|
|
179
|
+
|
|
180
|
+
PR checklist:
|
|
181
|
+
|
|
182
|
+
- What changed and why.
|
|
183
|
+
- Tests run and results.
|
|
184
|
+
- Risk and impact on applications that call `webex.memberships` or listen for its events, on the
|
|
185
|
+
workspace samples, and on the `webex` and `webex-node` bundles.
|
|
186
|
+
- Rollback approach.
|
|
187
|
+
|
|
188
|
+
## 7. Boundaries and Escalation
|
|
189
|
+
|
|
190
|
+
### Always
|
|
191
|
+
|
|
192
|
+
- Prefer existing patterns over introducing new architecture.
|
|
193
|
+
- Keep changes minimal for the requested scope.
|
|
194
|
+
- Call out assumptions and unknowns explicitly.
|
|
195
|
+
- Update the owning module spec in the same change that alters observable behavior.
|
|
196
|
+
|
|
197
|
+
### Ask First
|
|
198
|
+
|
|
199
|
+
- Adding or removing dependencies or peer dependencies.
|
|
200
|
+
- Renaming or removing a method, an event, or the registered plugin name.
|
|
201
|
+
- Changing a request path, the read-status or read-receipt fields, the event fields, or the
|
|
202
|
+
verb-to-event mapping.
|
|
203
|
+
- Fixing the recorded argument-handling, `isRoomHidden`, or repeated-`listen()` behavior, since
|
|
204
|
+
callers may rely on it.
|
|
205
|
+
|
|
206
|
+
### Never
|
|
207
|
+
|
|
208
|
+
- Edit `dist/` by hand.
|
|
209
|
+
- Commit secrets, tokens, or credentials, including in test fixtures.
|
|
210
|
+
- Log person emails, display names, or ids through `webex.logger`.
|
|
211
|
+
- Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
|
|
212
|
+
templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
|
|
213
|
+
`.sdd/manifest.json` refers to them through `layout.monorepo_package`.
|
package/dist/memberships.js
CHANGED