@webex/plugin-messages 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,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:20: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:30:10Z
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
+ ("Messages plugin for the Cisco Webex JS SDK."), install commands, a note on OAuth scopes, a pointer to
32
+ 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.messages.get(id)` resolving a message | Matches `get` in `src/messages.js` |
41
+ | `listen()` needs `spark:all` and `spark:kms`; other calls work with `spark:messages_read` and `spark:messages_write` | Matches the `listen` JSDoc in `src/messages.js` |
42
+ | Nothing about `create`, `update`, `list`, `remove`, file uploads, or the events | All six methods and the `created` and `deleted` events are in `src/messages.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 `listen()` 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; the developer chose `keep-separate` |
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 posting, file uploads, and
87
+ the events in a separate product-doc change.
88
+
89
+ ## Revisit when
90
+
91
+ - A maintainer rewrites the README to document `create`, file uploads, `listen()`, or the events.
92
+
93
+ ## References
94
+
95
+ - `README.md`
96
+ - `src/index.js`
97
+ - `src/messages.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:30:10Z
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,249 @@
1
+ ---
2
+ type: Architecture
3
+ title: '@webex/plugin-messages 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:30:10Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # @webex/plugin-messages architecture
17
+
18
+ Canonical architecture for this package. Flow behavior lives in the
19
+ [Messages 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 in `src/messages.js` | Repository data and schema |
30
+ | `repo.holds_client_state` | N/A | `src/messages.js` caches no message 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/messages.js` relies on | Dependency and interaction topology |
32
+ | `repo.domain_data_across_components` | Applicable | Message records and message events pass from Hydra and Mercury through `src/messages.js` to callers | Object and data ownership |
33
+ | `repo.caches_data` | N/A | Nothing is kept after a call settles in `src/messages.js` | Caching catalog |
34
+ | `repo.observability_convention` | N/A | One warning and one error log line in `src/messages.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/messages.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-messages and deploy:npm publishes it | Release and versioning |
40
+ | `repo.embedded_in_host` | N/A | No host theme or embed API in `src/messages.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 messages resource and the Mercury socket (`src/messages.js`) | Cross-repository topology |
43
+ | `repo.security_arch_warranted` | Applicable | `listen()` needs the spark:all and spark:kms scopes, and message text, files, and email addresses pass through `src/messages.js` | Security architecture |
44
+
45
+ ## Design overview
46
+
47
+ `@webex/plugin-messages` is a published JavaScript library with one module. Importing it registers the
48
+ internal `conversation` and `mercury` plugins and then `Messages` as the public plugin `messages`,
49
+ reached as `webex.messages`. The `webex` and `webex-node` bundles import it to register it, and
50
+ `@webex/test-webex-node` calls it to post a message.
51
+
52
+ A message is a block of content in a Webex room, served to applications by the `messages` resource of
53
+ the Webex REST API, which the SDK reaches as catalog service `hydra`. The plugin answers two questions:
54
+ "what was said" (post, edit, read, list, delete through Hydra, with file attachments sent as a
55
+ multipart upload) and "what changed" (Mercury socket activities turned into webhook-shaped `created`
56
+ and `deleted` events after `listen()`).
57
+
58
+ The package serves no routes, caches nothing, and persists nothing.
59
+
60
+ ## Resource inventory and responsibilities
61
+
62
+ | Resource | Kind | Responsibility | Owner | Source | Detailed specification |
63
+ | -------- | ---- | -------------- | ----- | ------ | ---------------------- |
64
+ | Messages plugin | package (one module) | Registration; message records; message events | @webex/web-sdk | src | [`src/docs/README.md`](../src/docs/README.md) |
65
+
66
+ ## Interaction and execution flows
67
+
68
+ Representative end-to-end flow: an application posts a message with a file and listens for new and
69
+ deleted messages.
70
+
71
+ ```mermaid
72
+ flowchart LR
73
+ App[application] -->|create, update, get, list, remove| Plugin[webex.messages]
74
+ App -->|listen, on created and deleted| Plugin
75
+ Plugin -->|messages requests, JSON or multipart| Hydra[Webex REST API messages]
76
+ Plugin -->|createEventEnvelope| Common[common]
77
+ Common -->|people get me| People[webex.people]
78
+ Plugin -->|connect, event:conversation.activity| Mercury[mercury plugin]
79
+ Convo[conversation plugin] -->|decrypts inbound activities| Mercury
80
+ Plugin -->|GET message per created event| Hydra
81
+ ```
82
+
83
+ | From | To | Interaction or transport | Purpose | Failure or compatibility behavior |
84
+ | ---- | -- | ------------------------ | ------- | --------------------------------- |
85
+ | Application | `webex.messages` | In-process calls; `on` for events | Message records, events | Rejections propagate; `update` without a `roomId` returns `null` |
86
+ | `Messages` | Webex REST API | HTTPS through `webex.request`, service `hydra` | Message records | No retry here |
87
+ | `Messages` | `webex.internal.mercury` | `connect()` and `listenTo` | Message events | A connect failure rejects `listen()` |
88
+ | `webex.internal.conversation` | Mercury activities | Payload transformer registered at import | Decrypted activities | Not called by this package |
89
+ | `Messages` | `@webex/common` | Import | Ids, envelope, event vocabulary | A failed identity lookup leaves the envelope `undefined` |
90
+
91
+ ## Dependency topology
92
+
93
+ | Dependency | Type | Used by | Purpose | Version, failure, or fallback policy |
94
+ | ---------- | ---- | ------- | ------- | ------------------------------------ |
95
+ | `@webex/webex-core` | Internal | `src/index.js`, `src/messages.js` | Registration, plugin base, `Page`, `webex.request`, services | `workspace:*` in `package.json` |
96
+ | `@webex/common` | Internal | `src/messages.js` | Hydra ids, cluster string, event envelope, `SDK_EVENT` | `workspace:*` |
97
+ | `@webex/internal-plugin-conversation` | Internal | `src/index.js` (import only) | Decrypts socket activities | `workspace:*` |
98
+ | `@webex/internal-plugin-mercury` | Internal | `src/index.js` (import), `src/messages.js` (calls) | Message events | `workspace:*` |
99
+ | `@webex/internal-plugin-device` | Internal | Not imported by `src/`; the integration spec imports it | Device registration, which Mercury performs on connect | `workspace:*` |
100
+ | `@webex/plugin-people`, `@webex/plugin-logger`, `@webex/plugin-rooms` | Internal peer | Reached at run time through `webex.people` and `webex.logger`; rooms only in JSDoc examples and the integration spec | Current user for the envelope; logging; test rooms | Peer dependencies; not imported by `src/` |
101
+ | `lodash` | External library | `src/messages.js` | `cloneDeep`, `isArray` | `^4.17.21` |
102
+ | `debug` | External library | Declared; not imported by `src/` | The integration spec's trace lines | `^4.3.4` |
103
+ | Webex REST API messages resource | External service | `src/messages.js` | Message records | Resolved through the service catalog |
104
+
105
+ No import cycle exists: none of the internal dependencies imports this package. `@webex/common` reads
106
+ `webex.people` at run time without importing it.
107
+
108
+ ## Public and consumer surfaces
109
+
110
+ | Surface | Type | Owner | Consumers | Compatibility policy | Source |
111
+ | ------- | ---- | ----- | --------- | -------------------- | ------ |
112
+ | `messages-public-sdk` — package @webex/plugin-messages, `webex.messages` with its six methods and the `created` and `deleted` events | SDK, published to npm, public | Messages plugin | `webex`, `webex-node` (registration); applications, `@webex/test-webex-node`, and the workspace samples (calls) | No versioning or deprecation rule is declared in the package | `package.json`, `src/index.js`, `src/messages.js` |
113
+
114
+ The messages requests and the event shape are a protocol this package speaks, described under
115
+ *Protocol and wire format* in the
116
+ [module specification](../src/docs/README.md#protocol-and-wire-format). The other contracts this
117
+ package requires are registered in `.sdd/manifest.json` `contract_catalog`.
118
+
119
+ ## Cross-cutting architecture
120
+
121
+ ### Security
122
+
123
+ - Trust boundaries, scopes, and identity flow: see [Security architecture](#security-architecture).
124
+ - Sensitive surfaces and data classes: message text, markdown, file content and URLs, adaptive-card
125
+ attachments, person email addresses, and message, room, person, and organization ids.
126
+
127
+ ### Observability and operations
128
+
129
+ - Logging and correlation: `create` and `update` log a fixed `webex.logger.warn` line when the
130
+ deprecated `file` property is used, and `update` logs a fixed `webex.logger.error` line when no
131
+ `roomId` is given; neither includes message content. Request tracking comes from the webex-core
132
+ interceptors. A failed fetch for a `created` event is not logged by this package.
133
+ - Metrics, traces, and audit signals: none.
134
+ - Ownership and operational entry points: `.github/CODEOWNERS` at the workspace root has no line for
135
+ `packages/@webex/plugin-messages`, so its default rule assigns the package to `@webex/web-sdk`. No
136
+ dashboards or runbooks are recorded in this package.
137
+
138
+ ### Quality attributes
139
+
140
+ - Compatibility: callers rely on the registered name `messages`, the Hydra message object,
141
+ `list().items` through `Page`, the `formData` upload for blobs and buffers, and the event names
142
+ `created` and `deleted`.
143
+ - Latency: each `created` event costs one Hydra request before it is triggered.
144
+ - Test confidence: the package has no unit tests, and the integration spec is skipped in full. No
145
+ coverage threshold is enforced.
146
+
147
+ ## Dependency and interaction topology
148
+
149
+ ```mermaid
150
+ flowchart LR
151
+ Index[src/index.js] -->|import| Convo[internal-plugin-conversation]
152
+ Index -->|import| Mercury[internal-plugin-mercury]
153
+ Index -->|registerPlugin messages| Core[webex-core]
154
+ Index --> Messages[src/messages.js]
155
+ Messages -->|WebexPlugin, Page, request| Core
156
+ Messages -->|ids, envelope, SDK_EVENT| Common[common]
157
+ Messages -->|webex.internal.mercury| Mercury
158
+ ```
159
+
160
+ | From | To | Kind | Purpose | Ordering or failure boundary |
161
+ | ---- | -- | ---- | ------- | ---------------------------- |
162
+ | `src/index.js` | conversation and Mercury plugins | Import at load | Register `webex.internal.conversation` and `webex.internal.mercury` | Before `messages` is registered |
163
+ | `src/index.js` | webex-core | Call at import | Register `messages` | First registration wins |
164
+ | `src/messages.js` | common | Import | Ids, envelope, vocabulary | Conversion errors reach Mercury's `_emit`, which logs them |
165
+
166
+ ## Object and data ownership
167
+
168
+ | Object or state | System of record | May write | May read | Movement or lifecycle |
169
+ | --------------- | ---------------- | --------- | -------- | --------------------- |
170
+ | Message record (`id`, `roomId`, `personId`, `personEmail`, `text`, `markdown`, `files`, `created`, and more) | Webex REST API | Callers, through `create`, `update`, `remove` | Callers, through `get` and `list`, and `created` listeners | Fetched per call; never kept here |
171
+ | File attachment | Webex REST API | Callers, through the multipart upload or a URL in `files` | Callers, through the `files` URLs | Sent per call; never kept here |
172
+ | Event envelope | This plugin instance, built by `@webex/common` | `listen()` | `getMessageEvent` | Replaced by each `listen()` |
173
+
174
+ ## Shared and base libraries
175
+
176
+ | Library | Inherited responsibility | Consumers | Version floor | Compatibility rule |
177
+ | ------- | ------------------------ | --------- | ------------- | ------------------ |
178
+ | `@webex/webex-core` `WebexPlugin` | `webex`, `request`, `logger`, and the event methods | `Messages` | `workspace:*` | Keep the registered name `messages` |
179
+ | `@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 |
180
+
181
+ ## Release and versioning
182
+
183
+ | Artifact | Publish target | Versioning rule | Deprecation window | Changelog or migration obligation |
184
+ | -------- | -------------- | --------------- | ------------------ | --------------------------------- |
185
+ | @webex/plugin-messages | npm through `deploy:npm` | None declared in the package | None declared; the single `file` property is deprecated by a run-time warning only | None declared in the package; the workspace owns changelog generation |
186
+
187
+ ## Commands and generated artifacts
188
+
189
+ | Command or artifact | Owner | Inputs | Output or side effect | Compatibility boundary |
190
+ | ------------------- | ----- | ------ | --------------------- | ---------------------- |
191
+ | `yarn workspace @webex/plugin-messages build:src` | Package scripts | `src` | Writes `dist/` (JavaScript and source maps) through `webex-legacy-tools` | `dist/` is generated and never edited by hand |
192
+ | `yarn workspace @webex/plugin-messages build` | Package scripts | `src` | Runs `build:src` | Same output |
193
+ | `yarn workspace @webex/plugin-messages test:style` | Package scripts | `src` | ESLint run | The shared config ignores `docs/**` and `*.md` |
194
+
195
+ ## Cross-repository topology
196
+
197
+ | Repository or external system | Relationship | Exchanged contract or artifact | Owner | Sequencing constraint |
198
+ | ----------------------------- | ------------- | ------------------------------ | ----- | --------------------- |
199
+ | `@webex/webex-core` (workspace sibling; module spec consulted) | Consumes | `registerPlugin`, `WebexPlugin`, `Page`, `request`, services | @webex/web-client, @webex/web-sdk | Registered before the first instance |
200
+ | `@webex/http-core` (workspace sibling, through webex-core; module spec consulted) | Consumes | Multipart encoding of `formData` | @webex/web-client, @webex/web-sdk | None |
201
+ | `@webex/common` (workspace sibling; module spec consulted) | Consumes | Hydra ids, `createEventEnvelope`, `SDK_EVENT` | @webex/web-client, @webex/web-sdk | None |
202
+ | `@webex/internal-plugin-conversation` (workspace sibling; no spec, code consulted) | Consumes | Decryption of inbound activities | @webex/web-client, @webex/web-sdk | Registered before Mercury events arrive |
203
+ | `@webex/internal-plugin-mercury` (workspace sibling; module spec consulted) | Consumes | `connect`, `event:conversation.activity` | @webex/web-client, @webex/web-sdk | Connected before events flow |
204
+ | `webex`, `webex-node`, `@webex/test-webex-node` (workspace siblings) | Consumed by | The plugin registration; `create` | @webex/web-sdk | None |
205
+ | Webex REST API messages resource | Consumes | Message records and uploads | Not recorded in this repository | None |
206
+
207
+ ## Security architecture
208
+
209
+ ```mermaid
210
+ flowchart LR
211
+ Caller[caller] -->|message bodies, files, ids, options| Plugin[webex.messages]
212
+ Plugin -->|SDK token| Hydra[Webex REST API]
213
+ Mercury[Mercury socket, spark:all and spark:kms] -->|decrypted activities| Plugin
214
+ Plugin -->|message records, events| Caller
215
+ ```
216
+
217
+ - This package holds no credential and no key. Every request carries the SDK authorization added by
218
+ webex-core; the README and the `listen()` JSDoc state that message requests work with the
219
+ `spark:messages_read` and `spark:messages_write` scopes, and that `listen()` needs `spark:all` and
220
+ `spark:kms`.
221
+ - Socket activities are encrypted; the conversation plugin, registered by this package's import,
222
+ decrypts them before this package reads them. Message content is fetched from Hydra in clear over
223
+ HTTPS.
224
+ - Message ids go into request paths and options into query strings. The package logs none of them,
225
+ and no message content, through `webex.logger`; its logging is described under
226
+ [Observability and operations](#observability-and-operations).
227
+ - What a caller may see or delete is decided by Hydra for the authorized user (the `remove` JSDoc: own
228
+ messages, except moderators and org administrators); the package passes records through and keeps no
229
+ copy.
230
+
231
+ ## Domain language
232
+
233
+ | Term | Repository-specific meaning | Authoritative source |
234
+ | ---- | --------------------------- | -------------------- |
235
+ | Message | A block of content in a room: text or markdown, files, and card attachments | `src/messages.js` |
236
+ | Hydra | The Webex REST API, reached as catalog service `hydra` | `src/messages.js` |
237
+ | Hydra message id | base64url of `ciscospark://<cluster>/MESSAGE/<uuid>` | `src/messages.js` |
238
+ | `altMessage` | The second argument of `update`, the payload sent in place of the message | `src/messages.js` |
239
+ | Multipart upload | A `formData` request, used when `files` holds a blob or buffer | `src/messages.js` |
240
+ | Activity verb | The `post`, `share`, or `delete` value that picks the event | `src/messages.js` |
241
+ | Event envelope | Webhook-shaped wrapper built once by `listen()` and cloned per event | `src/messages.js` |
242
+
243
+ ## References and maintenance
244
+
245
+ - Decisions: [adr/](adr/index.md)
246
+ - Instantiated specifications and routing: [specs/README.md](specs/README.md)
247
+ - Repository rules and patterns: [package agent instructions](../AGENTS.md)
248
+ - Update this document in the same change that alters package boundaries, resource ownership,
249
+ cross-resource interaction, or cross-cutting architecture.
@@ -0,0 +1,123 @@
1
+ ---
2
+ type: Getting Started
3
+ title: Getting started
4
+ description: Local setup, build, run, and test routing for @webex/plugin-messages.
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:30:10Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # Getting started
17
+
18
+ Onboarding for **@webex/plugin-messages**, a package inside the `webex-js-sdk` Yarn workspace. Run every command from the workspace root: `yarn` to install, and `yarn workspace @webex/plugin-messages <script>` for the package scripts, which `package.json` defines.
19
+
20
+ ## Prerequisites
21
+
22
+ | Tool or access | Version or requirement |
23
+ | -------------- | ---------------------- |
24
+ | 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 |
25
+ | Yarn | `yarn@3.4.1` (`packageManager` in the workspace root `package.json`) |
26
+ | Registry or account access | N/A for building and linting |
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ yarn
32
+ ```
33
+
34
+ The workspace `deploy.yml` workflow installs with the same command.
35
+
36
+ Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the workspace root; see
37
+ [Prebuilding](../../../../CONTRIBUTING.md#prebuilding).
38
+
39
+ ## Build
40
+
41
+ ```bash
42
+ yarn workspace @webex/plugin-messages build:src
43
+ ```
44
+
45
+ `build:src` writes JavaScript and source maps for the two source files to `dist/` through
46
+ `webex-legacy-tools`. `dist/` is ignored by Git. The `build` script runs `yarn workspace @webex/plugin-messages build:src`; the package
47
+ emits no type declarations.
48
+
49
+ ```bash
50
+ yarn workspace @webex/plugin-messages build
51
+ ```
52
+
53
+ ## Run
54
+
55
+ N/A — this is a library with no start script. Importing `@webex/plugin-messages` registers
56
+ `webex.messages`.
57
+
58
+ ## Tests
59
+
60
+ ```bash
61
+ yarn workspace @webex/plugin-messages test:style
62
+ ```
63
+
64
+ | Tier | Command | Test location | Framework | External dependencies |
65
+ | ---- | ------- | ------------- | --------- | --------------------- |
66
+ | Unit | N/A — `package.json` defines no `test:unit` script | none | N/A | N/A |
67
+
68
+ `test:style` lints `src/` with eslint through `@webex/eslint-config-legacy`.
69
+
70
+ - Coverage or quality gate: none; the package defines no unit test, no coverage script, and the legacy
71
+ Jest configuration it re-exports sets no threshold
72
+ - Enforcement source: N/A
73
+ - Test environment or QA dependencies: none for lint
74
+
75
+ This package has no unit tests: `package.json` defines no `test:unit` script and there is no
76
+ `test/unit` directory. Add both together when you add the first unit case; sibling legacy packages
77
+ define `test:unit` as `webex-legacy-tools test --unit --runner jest`.
78
+
79
+ `yarn workspace @webex/plugin-messages test:integration` (manifest command `integration-test`) runs `webex-legacy-tools test
80
+ --integration --runner mocha` over `test/integration/spec/messages.js`. Every case there sits inside
81
+ `describe.skip`, so on 2026-11-12 under Node 22.14 it reported 0 passing and 14 pending and exited
82
+ zero without creating test users or calling a service. If the skip is removed, the cases need
83
+ provisioned test users from `@webex/test-helper-test-users`, an `EU_PRIMARY_ORG_ID` for the EU user,
84
+ and the live services.
85
+
86
+ `yarn workspace @webex/plugin-messages test:browser` (manifest command `browser-test`) runs the same spec through karma. On 2026-11-12
87
+ the karma bundle failed to parse `isbot` (an ES module in the workspace `node_modules`), so Chrome and
88
+ Firefox headless reported a bundle error, ran no case, and the command still exited zero.
89
+
90
+ Neither command is listed in the table above because neither verifies anything today, and their exit
91
+ codes are not test results.
92
+
93
+ Do not run the aggregate `test` script in `package.json`. It runs `test:style`, then exits 1 with
94
+ `Couldn't find a script named "test:unit"` (checked 2026-11-12). It is deliberately not a manifest
95
+ command; run the commands above instead.
96
+
97
+ ## Configuration and secrets
98
+
99
+ - Required configuration: none. The plugin registers no config of its own
100
+ - Environment overrides: none read by `src/`; the integration spec reads `EU_PRIMARY_ORG_ID` and
101
+ `SKIP_FLAKY_TESTS`
102
+ - Secret source: N/A; the package holds no secret
103
+ - Package or artifact access: N/A
104
+ - Required neighboring packages: `@webex/webex-core`, `@webex/common`,
105
+ `@webex/internal-plugin-conversation`, and `@webex/internal-plugin-mercury` resolve through the
106
+ workspace; the host must also register `@webex/plugin-people` and `@webex/plugin-logger`, the peer
107
+ dependencies that `listen()` and the warning and error lines reach at run time
108
+ - Platform, simulator, device, or SDK setup: none
109
+ - Never commit credentials or copy production secrets into a local config.
110
+
111
+ ## First-run verification
112
+
113
+ 1. Run `yarn workspace @webex/plugin-messages build:src` and check that it reports `Built plugin-messages: 2 files`.
114
+ 2. Run `yarn workspace @webex/plugin-messages test:style`.
115
+
116
+ Expected result: both commands exit zero. `test:style` reports no problem in the two source files and
117
+ prints one "File ignored" warning for `src/docs/README.md`.
118
+
119
+ ## Next steps
120
+
121
+ - [Package architecture](architecture.md)
122
+ - [Specification registry](specs/README.md)
123
+ - [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:30:10Z
10
+ validation_status: pass-with-warnings
11
+ -->
12
+
13
+ # @webex/plugin-messages documentation
14
+
15
+ Doc map for developers and agents working on the Messages 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 Messages 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/messages.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 `listen()` needs, see [ADR-0001](adr/0001-retain-product-readme.md)
42
+ - [`AGENTS.md`](../AGENTS.md) — agent instructions for this package
@@ -0,0 +1,67 @@
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:30:10Z
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
+ | Messages 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.messages`: message post, edit, read, list, and delete through Hydra, with multipart file uploads; webhook-shaped message 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 (0 Blocking, 1 Important). A unit
48
+ suite, a characterization baseline, and promotion past Partial remain pending.
49
+
50
+ ## Change and verification routing
51
+
52
+ | Change affects | Load and update | Verification route |
53
+ | -------------- | --------------- | ------------------ |
54
+ | Package boundaries or cross-cutting architecture | `docs/architecture.md` and applicable ADRs | `yarn workspace @webex/plugin-messages build:src` and `test:style`, and the module spec |
55
+ | A stable code, package, or component boundary | `src/docs/README.md` | Build and lint |
56
+ | A public method, request path, payload rule, event field, or the registration | The owning architecture section, `src/docs/README.md`, and the native definition in `src/messages.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 skipped |
57
+
58
+ ## Module and contract registration
59
+
60
+ The module specification is generated at the exact `modules[].canonical_spec` path recorded in
61
+ `.sdd/manifest.json`. Register every module and submodule in the Module registry above in manifest tree
62
+ order.
63
+
64
+ Contracts are registered in `.sdd/manifest.json` `contract_catalog` and indexed in
65
+ [`docs/architecture.md`](../architecture.md#public-and-consumer-surfaces) with a stable ID, publication
66
+ state, native source, and owning module. This page provides navigation and ownership rather than a copied
67
+ contract.