@webex/internal-plugin-board 3.13.0-next.1 → 3.13.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md ADDED
@@ -0,0 +1,205 @@
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-12T07:38:37Z
7
+ validation_status: pass
8
+ -->
9
+
10
+ # AI Agent Instructions
11
+
12
+ Package-scoped SDD entry for `@webex/internal-plugin-board`, the internal whiteboard plugin of the SDK
13
+ (`webex.internal.board`: board channels, encrypted board contents, image upload, transcoder
14
+ authorization, and live board activity over Mercury). This file orients agents. The monorepo root
15
+ `AGENTS.md` governs workspace-wide setup.
16
+
17
+ ## Working Method
18
+
19
+ - Read the relevant package files before editing. Do not edit blind.
20
+ - Understand the task and affected surfaces before writing code.
21
+ - Prefer focused edits over rewriting whole files.
22
+ - Do not invent commands, paths, exports, or config keys. Verify them from this package's source and
23
+ tests, and check sibling plugin specifications before relying on their behavior.
24
+ - Test or validate before declaring done.
25
+ - Keep output concise. If something is uncertain, say so instead of guessing.
26
+
27
+ ## Canonical Repository Documentation
28
+
29
+ Before changing code or documentation, start with:
30
+
31
+ - [`docs/index.md`](docs/index.md) for package documentation navigation;
32
+ - [`docs/architecture.md`](docs/architecture.md) for package boundaries and interactions;
33
+ - [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
34
+ - the module specification at [`src/docs/README.md`](src/docs/README.md) (board plugin); and
35
+ - [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
36
+
37
+ Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
38
+ publishes an SDK surface, so its contract artifact is `package.json` plus the `src/index.js` entry. It
39
+ serves no HTTP, so no OpenAPI applies.
40
+
41
+ ## 1. Commands (Run First)
42
+
43
+ Use only documented commands. Do not invent alternatives when a command is missing. Run workspace
44
+ commands from the monorepo root. Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling
45
+ `dist/`) is owned by the workspace root; see [Prebuilding](../../../CONTRIBUTING.md#prebuilding).
46
+
47
+ | Task | Command |
48
+ | ---------------------- | ------- |
49
+ | Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command) |
50
+ | Start dev environment | N/A — library package with no start script in `package.json` |
51
+ | Run tests | `yarn workspace @webex/internal-plugin-board test:unit` (jest) after `build:src` |
52
+ | Run linters | `yarn workspace @webex/internal-plugin-board test:style` |
53
+ | Build/release artifact | `yarn workspace @webex/internal-plugin-board build` (runs `build:src`) |
54
+ | Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
55
+
56
+ `test:browser` runs the unit and integration specs through karma against live Webex services and
57
+ needs test-user credentials; it is not a routine verification command. There is no
58
+ `test:integration` script, so the aggregate `test` script fails at that step.
59
+
60
+ If a required command is unknown, stop and ask for the exact command.
61
+
62
+ ## 2. Agent Persona and Scope
63
+
64
+ You are the Webex JS SDK engineering assistant for `@webex/internal-plugin-board`.
65
+
66
+ Primary outcomes:
67
+
68
+ - Deliver production-safe changes with unit tests and lint passing.
69
+ - Preserve existing behavior unless a change request explicitly requires a behavior change.
70
+ - Keep docs and configuration aligned with code changes.
71
+
72
+ Definition of done:
73
+
74
+ 1. Requested change is implemented.
75
+ 2. Relevant tests, lint, and build checks pass locally.
76
+ 3. Updated docs cover new behavior, including the owning module spec.
77
+ 4. PR summary includes risks and rollback notes.
78
+
79
+ ## 3. Repository Knowledge
80
+
81
+ ### Tech Stack
82
+
83
+ | Area | Tooling | Version |
84
+ | ---------------- | ------- | ------- |
85
+ | Language runtime | node; JavaScript sources | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=16`; the workspace root `package.json` `engines.node` still reads `18.x`, which conflicts with the other pins |
86
+ | Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
87
+ | Test framework | jest via `webex-legacy-tools` (`test:unit`); chai, sinon, `@webex/test-helper-mock-webex`, and `@webex/test-helper-mock-web-socket` | sinon `^9.2.4` |
88
+ | Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
89
+
90
+ ### Project Map
91
+
92
+ - `src/index.js`: imports the mercury, encryption, conversation, and feature plugins, registers
93
+ internal plugin `board` with its config and payload transformer, and re-exports `Board`, `config`,
94
+ and `RealtimeChannel`.
95
+ - `src/board.js`: the `Board` plugin (channels, contents, images, registration, transcoder).
96
+ - `src/realtime.js`: the `realtime` child (publish, own and shared sockets, activity routing).
97
+ - `src/realtime-channel.js`, `src/realtime-channel-collection.js`: one board's Mercury connection and
98
+ the collection keyed by `channelId`.
99
+ - `src/config.js`: `webex.config.board` defaults.
100
+ - `src/docs/README.md`: the module specification.
101
+ - `test/unit/spec/`: three unit specs (58 cases); they import the package by name, which loads `dist/`.
102
+ - `test/integration/spec/`: live-service specs run only by `test:browser`; two of three are skipped.
103
+ - `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
104
+ - `dist/`: generated build output. Never edit by hand.
105
+ - `README.md`: retained npm page, context only; see
106
+ [ADR-0001](docs/adr/0001-retain-product-readme.md).
107
+
108
+ ### Critical Constraints
109
+
110
+ - Every board content item leaves the client encrypted with `channel.defaultEncryptionKeyUrl`.
111
+ - `createChannel` and `getChannels` must use the board cluster that matches the conversation ACL
112
+ cluster when one resolves; the home cluster answers with a 307 the browser cannot follow.
113
+ - `addContent` posts chunks one at a time; parallel chunks race.
114
+ - The `encryptChannel` transform must run before `encryptKmsMessage`; it fills the empty `keyUris`.
115
+ - `authorizeMediaInjector` and `unauthorizeMediaInjector` resolve errors as values on purpose.
116
+ - `RealtimeChannel` uses namespace `Board`, so board sockets read `webex.config.board`, not the
117
+ Mercury config.
118
+ - `webex.internal.device` is used but not declared in `package.json`; it arrives through mercury.
119
+
120
+ ## 4. Testing Workflow
121
+
122
+ Run checks in this order:
123
+
124
+ 1. `yarn workspace @webex/internal-plugin-board build:src`
125
+ 2. `yarn workspace @webex/internal-plugin-board test:unit`
126
+ 3. `yarn workspace @webex/internal-plugin-board test:style`
127
+
128
+ Step 1 matters: the unit specs import `@webex/internal-plugin-board` by name, which resolves `main`
129
+ (`dist/index.js`), so a stale `dist/` makes results meaningless.
130
+
131
+ Testing rules:
132
+
133
+ - Add or update unit cases for every behavior change. The payload transformer, the media-injector
134
+ methods, `processActivityEvent`, `unregisterFromSharedMercury`, and the shared-socket refresh have no
135
+ unit case today.
136
+ - Cover failure paths and edge cases, not only happy paths.
137
+ - Do not remove tests to make CI pass.
138
+ - Use `sinon.useFakeTimers()` when a case depends on time.
139
+
140
+ No coverage gate applies to this package; do not infer one.
141
+
142
+ ## 5. Code Style and Patterns
143
+
144
+ Coding expectations:
145
+
146
+ - Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
147
+ `root: true`; `test:style` currently reports only `require-jsdoc` warnings.
148
+ - Prefer small functions over large procedural blocks.
149
+ - Make error handling explicit; request failures reject unless a documented trade-off says otherwise.
150
+ - Keep public interfaces stable unless a breaking change is requested.
151
+
152
+ Pattern example:
153
+
154
+ ```text
155
+ Preferred:
156
+ - Read page sizes, timers, and the binding prefix from this.config (the board namespace).
157
+ - Reach encryption, services, mercury, feature, and device through this.webex.internal at call time.
158
+ - Add a case next to the matching describe block in test/unit/spec/board.js, encryption.js, or realtime.js.
159
+
160
+ Avoid:
161
+ - Sending unencrypted content or decrypted payloads to the board service.
162
+ - Treating README.md as the method, event, or error reference.
163
+ - Trusting JSDoc return annotations over the code.
164
+ ```
165
+
166
+ ## 6. Git Workflow
167
+
168
+ - Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
169
+ - Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
170
+ the workspace `CONTRIBUTING.md` requires for pull requests.
171
+ - Keep commits focused and reversible.
172
+ - Rebase on the target branch before opening a pull request.
173
+
174
+ PR checklist:
175
+
176
+ - What changed and why.
177
+ - Tests run and results.
178
+ - Risk and impact on channel creation, content encryption, image upload, and live board activity.
179
+ - Rollback approach.
180
+
181
+ ## 7. Boundaries and Escalation
182
+
183
+ ### Always
184
+
185
+ - Prefer existing patterns over introducing new architecture.
186
+ - Keep changes minimal for the requested scope.
187
+ - Call out assumptions and unknowns explicitly.
188
+ - Update the owning module spec in the same change that alters observable behavior.
189
+
190
+ ### Ask First
191
+
192
+ - Adding dependencies.
193
+ - Changing the encrypted content shape, the `publishRequest` frame, or the binding format.
194
+ - Changing the payload transformer predicates or transforms.
195
+ - Changing cluster routing for create and list.
196
+ - Making the media-injector methods reject.
197
+
198
+ ### Never
199
+
200
+ - Edit `dist/` by hand.
201
+ - Commit secrets, tokens, KMS keys, bearer tokens, or credentials, including in test fixtures.
202
+ - Log decrypted board content, keys, or transcoder bearer tokens.
203
+ - Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
204
+ templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
205
+ `.sdd/manifest.json` refers to them through `layout.monorepo_package`.
package/dist/board.js CHANGED
@@ -765,7 +765,7 @@ var Board = _webexCore.WebexPlugin.extend({
765
765
  return _promise.default.resolve([]);
766
766
  });
767
767
  },
768
- version: "3.13.0-next.1"
768
+ version: "3.13.0-next.10"
769
769
  });
770
770
  var _default = exports.default = Board;
771
771
  //# sourceMappingURL=board.js.map
package/dist/realtime.js CHANGED
@@ -221,7 +221,7 @@ var RealtimeService = _webexCore.WebexPlugin.extend({
221
221
  return _this7.realtimeChannels.remove(channel.channelId);
222
222
  }));
223
223
  },
224
- version: "3.13.0-next.1"
224
+ version: "3.13.0-next.10"
225
225
  });
226
226
  var _default = exports.default = RealtimeService;
227
227
  //# sourceMappingURL=realtime.js.map
@@ -0,0 +1,92 @@
1
+ ---
2
+ type: ADR
3
+ title: ADR-0001 - Retain the product README
4
+ description: SDD onboarding keeps README.md as product documentation and routes it only as context.
5
+ tags: [adr]
6
+ timestamp: 2026-11-12T06:57:16Z
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-12T07:38:37Z
15
+ validation_status: pass
16
+ -->
17
+
18
+ # ADR-0001 - Retain the product README
19
+
20
+ | Field | Value |
21
+ | ------------- | ----- |
22
+ | Status | Accepted |
23
+ | Decision date | 2026-11-12 |
24
+ | Deciders | rarajes2@cisco.com (bootstrap questionnaire) |
25
+ | Supersedes | N/A |
26
+ | Superseded by | N/A |
27
+
28
+ ## Context
29
+
30
+ Onboarding found one existing document, `README.md`. It is the npm usage page: an install command, an
31
+ import of the package, and a usage block that reads `webex.internal.board.WHATEVER`, which is a
32
+ placeholder rather than an API. It lists no method, event, or error.
33
+
34
+ The implementation in `src/board.js` and `src/realtime.js` has channel, content, image, registration,
35
+ shared-Mercury, and transcoder methods and the `event:board.activity` event. The README describes none
36
+ of them. No other intent, design, or AI-authored spec exists in this package.
37
+
38
+ ## Decision
39
+
40
+ Keep `README.md` unchanged. Do not migrate it into the module specification. Record
41
+ `spec_source_policy.mode` as `keep-separate` with `migrated_source_disposition` `retain`, and route
42
+ `README.md` in `spec_sources` as `reference-only` and `context-only`.
43
+
44
+ The canonical behavior is `src/` plus `test/`. Where the README is silent or generic, code wins.
45
+
46
+ ## Why
47
+
48
+ The README is the npm-facing page and carries no behavioral claim that the module specification would
49
+ need to preserve. Rewriting it is a product-doc change, not a requirement of making the package
50
+ SDD-ready. The sibling packages `@webex/internal-plugin-feature` and `@webex/internal-plugin-user`
51
+ made the same choice for the same README shape.
52
+
53
+ ## Alternatives considered
54
+
55
+ | Alternative | Why it was not selected |
56
+ | ----------- | ----------------------- |
57
+ | Migrate the README into `src/docs/README.md` and delete it | The page holds no behavioral content to migrate, and deletion was not requested |
58
+ | Reconcile the README with the module specification in place | Nothing in it needs reconciling, and the npm page would gain spec-only detail |
59
+ | Replace the README placeholder with real usage during onboarding | Onboarding writes the SDD tree only and does not edit `README.md` |
60
+
61
+ ## Consequences
62
+
63
+ **Positive:**
64
+
65
+ - The npm page stays stable for consumers.
66
+ - The module specification is the single behavioral reference.
67
+
68
+ **Negative / tradeoffs:**
69
+
70
+ - Agents must not treat `README.md` as the list of methods or events.
71
+ - The `WHATEVER` placeholder in the README stays until a maintainer makes a separate product-doc change.
72
+
73
+ ## Constraint on future changes
74
+
75
+ Do not delete `README.md` as part of spec maintenance. If its usage text changes, keep the module
76
+ specification aligned with code rather than with the README.
77
+
78
+ ## Follow-up
79
+
80
+ - [ ] None required for onboarding.
81
+
82
+ ## Revisit when
83
+
84
+ - A maintainer chooses to document the plugin methods and events on the npm page.
85
+
86
+ ## References
87
+
88
+ - `README.md`
89
+ - `src/index.js`
90
+ - `src/board.js`
91
+ - `src/realtime.js`
92
+ - `.sdd/manifest.json` `spec_source_policy`
@@ -0,0 +1,25 @@
1
+ <!-- sdd-generated-metadata
2
+ doc_kind: standing-doc
3
+ generated_from: adr-index@0.3.0
4
+ generated_by: claude-code
5
+ approved_by: rarajes2@cisco.com
6
+ updated_at: 2026-11-12T07:38:37Z
7
+ validation_status: pass
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,294 @@
1
+ ---
2
+ type: Architecture
3
+ title: '@webex/internal-plugin-board 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-12T07:38:37Z
13
+ validation_status: pass
14
+ -->
15
+
16
+ # @webex/internal-plugin-board architecture
17
+
18
+ Canonical architecture for this package. Flow behavior lives in the
19
+ [board 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; channels and contents live in the board service (`src/board.js`) | Repository data and schema |
30
+ | `repo.holds_client_state` | Applicable | The realtimeChannels collection and per-channel session properties in `src/realtime.js` and `src/realtime-channel.js` | Client state model |
31
+ | `repo.components_interact` | Applicable | `src/board.js` and `src/realtime.js` call the encryption, services, mercury, feature, and device plugins, and the payload transformer in `src/index.js` runs inside webex-core | Dependency and interaction topology |
32
+ | `repo.domain_data_across_components` | Applicable | Channel keys come from KMS through the encryption plugin and conversation ACLs come from conversation objects (`src/board.js`, `src/index.js`) | Object and data ownership |
33
+ | `repo.caches_data` | N/A | No cache; the realtime collection holds connections, not data (`src/realtime.js`) | Caching catalog |
34
+ | `repo.observability_convention` | Applicable | `src/realtime.js` logs with a board realtime: prefix | Observability patterns |
35
+ | `repo.deploys_to_infra` | N/A | Library published to npm (`package.json`). No service runtime | Runtime and infrastructure |
36
+ | `repo.shared_base_libs` | Applicable | Extends WebexPlugin from webex-core and Mercury from internal-plugin-mercury, and uses the legacy build, lint, and test stack (`babel.config.js`, `jest.config.js`, `.eslintrc.js`) | Shared and base libraries |
37
+ | `repo.is_monorepo` | N/A | This SDD root is one package. The workspace around it is out of scope | Package map and inter-package dependencies |
38
+ | `repo.multi_platform` | N/A | One JavaScript source set; Node runs the unit specs and karma browsers run `test:browser` against the same code (`package.json`) | Platform matrix |
39
+ | `repo.published_package` | Applicable | `package.json` name is @webex/internal-plugin-board and deploy:npm publishes it | Release and versioning |
40
+ | `repo.embedded_in_host` | N/A | No host theme or embed API in `src/board.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 board, ACL, Files, KMS, and Mercury services (`src/board.js`, `src/realtime.js`) | Cross-repository topology |
43
+ | `repo.security_arch_warranted` | Applicable | Board content keys, KMS messages, encrypted content, and transcoder bearer tokens pass through `src/board.js` and `src/index.js` | Security architecture |
44
+
45
+ ## Design overview
46
+
47
+ `@webex/internal-plugin-board` is a published internal library with one module. Importing it
48
+ registers `Board` as the internal plugin `board` (with child `realtime`) and, as side effects, the
49
+ internal `mercury`, `encryption`, `conversation`, and `feature` plugins. `@webex/webex-server` and
50
+ `@webex/recipe-private-web-client` import it; first-party clients then call `webex.internal.board`.
51
+
52
+ The plugin is a request builder for the Webex board service. A board channel is bound to a
53
+ conversation's ACL and KMS resource; its content key is created when the channel is created, and every
54
+ content item is encrypted with that key before it is stored or published. Reads come back through the
55
+ SDK payload transformer, which decrypts them. Live drawing is exchanged as `board.activity` frames over
56
+ Mercury, either on a board socket of its own or on the shared Mercury socket when the server allows it.
57
+
58
+ The package makes outbound HTTP and web socket calls only. It serves no routes and persists nothing.
59
+
60
+ ## Resource inventory and responsibilities
61
+
62
+ | Resource | Kind | Responsibility | Owner | Source | Detailed specification |
63
+ | -------- | ---- | -------------- | ----- | ------ | ---------------------- |
64
+ | Board plugin | package (one module) | Board channels, encrypted contents, image upload, transcoder authorization, live board activity | @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: a client creates a board for a conversation, stores strokes, and
69
+ shares them live with other participants.
70
+
71
+ ```mermaid
72
+ flowchart LR
73
+ Client[First-party client] -->|createChannel conversation| Board[Board plugin]
74
+ Board -->|cluster lookup| Svc[webex-core services]
75
+ Board -->|unbound key, wrap kmsMessage| Enc[encryption plugin and KMS]
76
+ Board -->|POST channels| BS[Board service]
77
+ Client -->|addContent| Board
78
+ Board -->|encrypt items| Enc
79
+ Board -->|POST contents in serial chunks| BS
80
+ Client -->|realtime.publish| RT[realtime child]
81
+ RT -->|publishRequest frame| Merc[Mercury socket]
82
+ Merc -->|board.activity| RT
83
+ RT -->|event:board.activity| Client
84
+ ```
85
+
86
+ | From | To | Interaction or transport | Purpose | Failure or compatibility behavior |
87
+ | ---- | -- | ------------------------ | ------- | --------------------------------- |
88
+ | First-party client | Board plugin | In-process calls | Channels, contents, images, live activity | Rejections propagate; media-injector errors resolve as values |
89
+ | Board plugin | Board service | HTTPS through `webex.request` | Channels, contents, locks, spaces, registrations, share policies | No plugin-local retry |
90
+ | Board plugin | ACL service | HTTPS PUT to the channel `aclUrl` | Remove the conversation link on delete | Rejection propagates |
91
+ | Board plugin | Webex Files | `webex.upload` three-phase upload | Encrypted image bytes | Rejection propagates |
92
+ | Board plugin | encryption plugin and KMS | In-process calls | Content keys, encryption, transcoder authorization | Rejection propagates |
93
+ | realtime child | Mercury | Web socket frames | Live board activity | Reconnect owned by Mercury |
94
+ | webex-core payload transformer | Board plugin | Transform callbacks | Decrypt content reads; create channel keys | Transform rejection fails the request |
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/board.js`, `src/realtime.js` | Plugin base, registration, `Page`, request, upload, services, payload transformer | Workspace version (`workspace:*` in `package.json`) |
101
+ | `@webex/internal-plugin-encryption` | Internal | `src/index.js`, `src/board.js` | Content and image encryption, KMS keys and authorizations | Workspace version |
102
+ | `@webex/internal-plugin-mercury` | Internal | `src/index.js`, `src/realtime-channel.js`, `src/realtime.js` | `Mercury` base class and the shared socket | Workspace version |
103
+ | `@webex/internal-plugin-feature` | Internal | `src/index.js`, `src/board.js` | `web-shared-mercury` developer toggle | Workspace version |
104
+ | `@webex/internal-plugin-conversation` | Internal | `src/index.js` | Import side effect registering `conversation` | Workspace version |
105
+ | `@webex/internal-plugin-device` | Internal, undeclared | `src/board.js` through `webex.internal.device` | `deviceType`, `webSocketUrl` | Not in `package.json`; registered by the mercury plugin import |
106
+ | `@webex/common` | Internal | `src/realtime.js` | `tap` | Workspace version |
107
+ | `ampersand-collection` | External | `src/realtime-channel-collection.js` | Realtime channel collection | `^2.0.2` in `package.json` |
108
+ | `es6-promise-series` | External | `src/board.js` | Serial content chunks | `^0.2.2` in `package.json` |
109
+ | `lodash` | External | `src/index.js`, `src/board.js` | Object helpers | `^4.17.21` in `package.json` |
110
+ | `uuid` | External | `src/realtime.js` | Frame ids | `^3.3.2` in `package.json` |
111
+ | Board, ACL, Files, KMS, Mercury services | External services | `src/board.js`, `src/realtime.js` | Storage, access control, upload, keys, sockets | URLs from the services catalog and from channel objects |
112
+
113
+ Every runtime dependency in `package.json` is imported by `src/`. No import cycle exists: this package
114
+ imports its siblings, and none of them imports this package.
115
+
116
+ ## Public and consumer surfaces
117
+
118
+ | Surface | Type | Owner | Consumers | Compatibility policy | Source |
119
+ | ------- | ---- | ----- | --------- | -------------------- | ------ |
120
+ | `board-internal-sdk` — package @webex/internal-plugin-board, the `webex.internal.board` and `webex.internal.board.realtime` APIs, and `webex.config.board` | SDK, published to npm | Board plugin | `@webex/webex-server`, `@webex/recipe-private-web-client`, first-party clients | Internal plugin; the README says it does not strictly follow semver | `package.json`, `src/index.js`, `src/board.js`, `src/realtime.js`, `src/config.js` |
121
+
122
+ The board service, ACL, Files, and Mercury shapes are protocols this package consumes, described under
123
+ *Protocol and wire format* in the
124
+ [module specification](../src/docs/README.md#protocol-and-wire-format), not published contracts of this
125
+ package. They are registered as internal requires-contracts in `.sdd/manifest.json`.
126
+
127
+ ## Client state model
128
+
129
+ | State or slice | Owner | Transition triggers | Persistence or reset boundary |
130
+ | -------------- | ----- | ------------------- | ----------------------------- |
131
+ | `realtimeChannels` | realtime child | Connect and disconnect methods | In memory for the instance |
132
+ | `isSharingMercury`, `socket` per channel | `RealtimeChannel` | Shared registration; Mercury `online` | In memory |
133
+ | Socket connection state | Mercury base class | `connect`, `disconnect`, reconnect | Owned by Mercury |
134
+
135
+ ## Cross-cutting architecture
136
+
137
+ ### Security
138
+
139
+ - Trust boundaries and identity flow: see [Security architecture](#security-architecture). The
140
+ plugin builds requests; webex-core adds the user token and the encryption plugin talks to KMS.
141
+ - Sensitive surfaces and data classes: board contents (curves, text, image metadata), image bytes,
142
+ content keys and their KMS resource bindings, and transcoder bearer tokens.
143
+ - Encryption and secret boundaries: content is encrypted with the channel's key before it leaves the
144
+ client, image bytes are encrypted before upload, and KMS messages are wrapped by the encryption
145
+ plugin.
146
+
147
+ ### Observability and operations
148
+
149
+ - Logging and correlation: two `this.logger.info` messages in `src/realtime.js`, prefixed
150
+ `board realtime:`; the Mercury base class logs under namespace `Board`.
151
+ - Metrics, traces, and audit signals: none emitted here.
152
+ - Ownership and operational entry points: `.github/CODEOWNERS` at the workspace root has no entry for
153
+ this package, so the default rule routes it to `@webex/web-sdk`. No dashboards or runbooks are
154
+ recorded in this package.
155
+
156
+ ### Quality attributes
157
+
158
+ - Compatibility: other clients read the same encrypted content and frames, so their shapes are
159
+ cross-client contracts.
160
+ - Footprint: six source files; runtime imports are webex-core, common, four sibling plugins, and four
161
+ npm libraries.
162
+ - Test confidence: 58 unit cases pass; the payload transformer, the media-injector methods,
163
+ `processActivityEvent`, and the shared-socket refresh have no test, and two of three integration
164
+ specs are skipped. No coverage threshold is enforced.
165
+
166
+ ## Dependency and interaction topology
167
+
168
+ ```mermaid
169
+ flowchart LR
170
+ Index[src/index.js] -->|import side effects| Sib[mercury, encryption, conversation, feature plugins]
171
+ Index -->|registerInternalPlugin board| Core[webex-core]
172
+ Index --> BoardJs[src/board.js]
173
+ Index --> Config[src/config.js]
174
+ BoardJs -->|child realtime| RTJs[src/realtime.js]
175
+ RTJs --> Coll[src/realtime-channel-collection.js]
176
+ Coll --> RC[src/realtime-channel.js]
177
+ RC -->|extends Mercury| Merc[internal-plugin-mercury]
178
+ BoardJs -->|encrypt, KMS| Enc[internal-plugin-encryption]
179
+ BoardJs -->|cluster lookup, request, upload, Page| Core
180
+ BoardJs -->|getFeature| Feat[internal-plugin-feature]
181
+ RTJs -->|shared socket, events| Merc
182
+ RTJs -->|tap| Common[common]
183
+ Core -->|payload transforms| Index
184
+ ```
185
+
186
+ | From | To | Kind | Purpose | Ordering or failure boundary |
187
+ | ---- | -- | ---- | ------- | ---------------------------- |
188
+ | `src/index.js` | sibling plugins, `src/board.js`, `src/config.js` | Import | Build and register the plugin | Registration at import time; first registration wins |
189
+ | `src/board.js` | encryption plugin | Call | Keys, encryption, KMS authorizations | Rejections propagate except in media-injector methods |
190
+ | `src/board.js` | webex-core | Call | Request, upload, services, `Page` | Rejections propagate |
191
+ | `src/realtime.js` | mercury plugin | Call and events | Shared socket and activity | Handlers attached once |
192
+ | `src/realtime-channel.js` | mercury plugin | Inheritance | Socket lifecycle | Config from namespace `Board` |
193
+ | webex-core | `src/index.js` transforms | Callback | Decrypt reads, create channel keys | Transform failure fails the request |
194
+
195
+ ## Object and data ownership
196
+
197
+ | Object or state | System of record | May write | May read | Movement or lifecycle |
198
+ | --------------- | ---------------- | --------- | -------- | --------------------- |
199
+ | Board channel | Board service | This plugin (create, patch snapshot, delete) | Conversation participants | Bound to the conversation ACL until deleted |
200
+ | Board contents | Board service | This plugin, other clients | Conversation participants with the key | Encrypted on write, decrypted on read |
201
+ | Channel content key | KMS | The `encryptChannel` transform (create) | Holders of the conversation KMS authorization | Created with the channel |
202
+ | Board images | Webex Files | This plugin | Holders of the SCR | Encrypted upload; SCR stored as content |
203
+ | Realtime channels | This plugin (memory) | realtime child | realtime child | Created on connect, removed on disconnect |
204
+
205
+ ## Observability patterns
206
+
207
+ | Signal | Convention or required fields | Propagation or naming rule | Primary evidence |
208
+ | ------- | ----------------------------- | -------------------------- | ---------------- |
209
+ | Logs | `info` messages when a realtime channel is created | Prefix `board realtime:`; no content or keys are logged | `src/realtime.js` |
210
+ | Metrics | None | N/A | `src/board.js` |
211
+ | Traces | None | N/A | `src/board.js` |
212
+ | Audit | None | N/A | `src/board.js` |
213
+
214
+ ## Shared and base libraries
215
+
216
+ | Library | Inherited responsibility | Consumers | Version floor | Compatibility rule |
217
+ | ------- | ------------------------ | --------- | ------------- | ------------------ |
218
+ | `@webex/webex-core` `WebexPlugin` | `webex`, `request`, `upload`, namespaced `config`, `logger`, children, collections | `Board`, `RealtimeService` | `workspace:*` | Keep namespace `Board` |
219
+ | `@webex/internal-plugin-mercury` `Mercury` | Socket connect, disconnect, ping/pong, reconnect, envelope routing | `RealtimeChannel` | `workspace:*` | Board config must declare every Mercury key board sockets need |
220
+ | `@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 |
221
+
222
+ ## Release and versioning
223
+
224
+ | Artifact | Publish target | Versioning rule | Deprecation window | Changelog or migration obligation |
225
+ | -------- | -------------- | --------------- | ------------------ | --------------------------------- |
226
+ | @webex/internal-plugin-board | npm through `deploy:npm` | None declared; the README says internal plugins do not strictly follow semver | None declared | None declared in the package; the workspace owns changelog generation |
227
+
228
+ ## Commands and generated artifacts
229
+
230
+ | Command or artifact | Owner | Inputs | Output or side effect | Compatibility boundary |
231
+ | ------------------- | ----- | ------ | --------------------- | ---------------------- |
232
+ | `yarn workspace @webex/internal-plugin-board build:src` | Package scripts | `src` | Writes `dist/` through `webex-legacy-tools` (JavaScript, TypeScript, source maps) | `dist/` is generated and never edited by hand; unit tests load it |
233
+ | `yarn workspace @webex/internal-plugin-board test:unit` | Package scripts | `test/unit/spec` | Jest run | Requires a current `dist/` |
234
+ | `yarn workspace @webex/internal-plugin-board test:style` | Package scripts | `src` | ESLint run | The shared config ignores `docs/**` and `*.md` |
235
+ | `yarn workspace @webex/internal-plugin-board test:browser` | Package scripts | `test/unit/spec`, `test/integration/spec` | Karma run against live services | Needs test-user credentials; not a routine verification command |
236
+
237
+ ## Cross-repository topology
238
+
239
+ | Repository or external system | Relationship | Exchanged contract or artifact | Owner | Sequencing constraint |
240
+ | ----------------------------- | ------------ | ------------------------------ | ----- | --------------------- |
241
+ | `@webex/webex-core` (workspace sibling; module specs consulted) | Consumes | `WebexPlugin`, `registerInternalPlugin`, payload transformer, services, `Page`, request, upload | @webex/web-sdk | None beyond plugin registration |
242
+ | `@webex/internal-plugin-mercury` (workspace sibling; module spec consulted) | Consumes and extends | `Mercury` class, shared socket, events | @webex/web-sdk | Shared mode needs a registered Mercury connection |
243
+ | `@webex/internal-plugin-encryption` (workspace sibling; no spec, code consulted) | Consumes | Encryption and KMS API, `encryptKmsMessage` transform | @webex/web-sdk | `encryptChannel` runs before `encryptKmsMessage` |
244
+ | `@webex/internal-plugin-feature` (workspace sibling; module spec consulted) | Consumes | `web-shared-mercury` toggle | @webex/web-sdk | None |
245
+ | `@webex/internal-plugin-conversation` (workspace sibling; no spec, code consulted) | Consumes | Import side effect; conversation objects | @webex/web-client, @webex/web-sdk | None |
246
+ | `@webex/internal-plugin-device` (workspace sibling; module spec consulted) | Consumes, undeclared | `deviceType`, `webSocketUrl` | @webex/web-client, @webex/web-sdk | Registered through mercury |
247
+ | `@webex/common` (workspace sibling; module spec consulted) | Consumes | `tap` | @webex/web-client, @webex/web-sdk | None |
248
+ | `@webex/webex-server`, `@webex/recipe-private-web-client` (workspace siblings, no spec) | Provides to | Import side effect registering `board` | @webex/web-sdk | None |
249
+ | Board, ACL, Files, KMS, and Mercury services | Consumes | REST and socket shapes under Protocol and wire format | Not recorded in this repository | Cluster-local board URL for create and list |
250
+
251
+ ## Security architecture
252
+
253
+ ```mermaid
254
+ flowchart LR
255
+ Client[First-party client] -->|plain content| Board[Board plugin]
256
+ Board -->|encrypt with channel key| Enc[encryption plugin]
257
+ Enc -->|keys and wrapped messages| KMS[KMS]
258
+ Board -->|ciphertext, user token| BS[Board service]
259
+ Board -->|encrypted image bytes| Files[Webex Files]
260
+ Board -->|kmsMessage delete authorization| ACL[ACL service]
261
+ Board -->|anonymous KMS authorization| BS
262
+ BS -->|kmsResponse with bearer| Board
263
+ Board -->|bearer| Client
264
+ ```
265
+
266
+ - Board content, image metadata, and image bytes are encrypted on the client; the board service and
267
+ Files store ciphertext. Decryption needs the channel key, which KMS releases to holders of the
268
+ conversation's authorization.
269
+ - Channel creation authorizes the conversation's KMS resource (`kmsMessage.userIds`) to the new
270
+ channel key; deletion removes that authorization and the ACL link.
271
+ - `authorizeMediaInjector` creates an anonymous KMS authorization for the transcoder and returns its
272
+ bearer to the caller; treat it as a secret. `unauthorizeMediaInjector` removes every authorization
273
+ on the board's KRO.
274
+ - The user token and transport security come from webex-core; KMS cryptography comes from the
275
+ encryption plugin.
276
+
277
+ ## Domain language
278
+
279
+ | Term | Repository-specific meaning | Authoritative source |
280
+ | ---- | --------------------------- | -------------------- |
281
+ | Board, channel | A whiteboard stored by the board service and bound to a conversation ACL | `src/board.js` |
282
+ | Content | One encrypted board item (curve, text, or image reference), typed `STRING` or `FILE` | `src/board.js` |
283
+ | SCR | Secure content reference: the encrypted locator and key material of an uploaded file | encryption plugin (sibling package) |
284
+ | Binding | The Mercury route of a board, `board.` plus the transformed channel id | `src/realtime.js` |
285
+ | Shared Mercury | Carrying board activity on the SDK's main Mercury socket | `src/realtime.js` |
286
+ | Media injector, transcoder | The service that renders a shared whiteboard for mobile receivers | `src/board.js` |
287
+
288
+ ## References and maintenance
289
+
290
+ - Decisions: [adr/](adr/index.md)
291
+ - Instantiated specifications and routing: [specs/README.md](specs/README.md)
292
+ - Repository rules and patterns: [package agent instructions](../AGENTS.md)
293
+ - Update this document in the same change that alters package boundaries, resource ownership,
294
+ cross-resource interaction, or cross-cutting architecture.