@webex/plugin-attachment-actions 3.13.0-next.7 → 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.
@@ -0,0 +1,396 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "repository": {
4
+ "name": "@webex/plugin-attachment-actions",
5
+ "purpose": "Public plugin registered as webex.attachmentActions for the submit actions of adaptive cards attached to Webex messages, through the Webex REST API attachment/actions resource (catalog service hydra): create POSTs the caller's attachment action unchanged as a JSON body and get takes a record or id and resolves the record. listen() builds a webhook-style event envelope, connects the Mercury socket, and turns conversation activities with the verb cardAction into created events built from the activity alone, with Hydra attachment action, message, person, and room ids and the decrypted card inputs; a conversion error is logged and drops the event. 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-13T02:21:38Z"
28
+ },
29
+ "build": {
30
+ "command": "yarn build:src",
31
+ "source_file": "package.json",
32
+ "role": "package",
33
+ "verified_at": "2026-11-13T02:21:36Z"
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/attachmentActions.js, runs only under test:browser:broken, which currently bundles nothing, and there is no test:integration script. 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-13T02:21:40Z"
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": ">=16",
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-13T02:20:00Z",
119
+ "decided_by": "rarajes2@cisco.com",
120
+ "decided_at": "2026-11-13T02:20: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. Its title heading names @webex/plugin-messages, it repeats its Install and Usage sections, and it holds no usage example, method name, or scope note. 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-13; critical coverage 7/7. Independent validation on 2026-11-13 passed with warnings (0 Blocking, 2 Important), validator runtime 01a1d2c4-c928-7fc0-bc29-9bf787bf37bc. Prior Blocking consumer evidence paths now resolve; duplicate generic command roles and the pending unit-test field remain. No unit tests or test:unit script exist; the live-service integration cases have no working package runner. Module remains Partial pending those follow-ups and promotion review.",
141
+ "last_assessed": "2026-11-13",
142
+ "contracts": {
143
+ "provides": [
144
+ "attachment-actions-public-sdk"
145
+ ],
146
+ "requires": [
147
+ "hydra-attachment-actions-http",
148
+ "webex-core-plugin-host",
149
+ "webex-core-services",
150
+ "common-hydra-ids",
151
+ "common-event-envelope",
152
+ "conversation-activity-decryption",
153
+ "mercury-activity-events"
154
+ ]
155
+ },
156
+ "section_profile": {
157
+ "has_tiers": false,
158
+ "has_ui": false,
159
+ "crosses_service_boundaries": true,
160
+ "holds_client_state": false,
161
+ "enforces_domain_rules": true,
162
+ "is_concurrent_async": true,
163
+ "owns_persistence": false,
164
+ "stateful_transitions": false,
165
+ "exposes_wire_protocol": true,
166
+ "ui_multi_screen": false,
167
+ "large_data_model": false,
168
+ "returns_caller_errors": true,
169
+ "module_specific_conventions": true,
170
+ "published_package": true,
171
+ "embedded_in_host": false,
172
+ "has_design_tradeoff": true,
173
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
174
+ "resolved_at": "2026-11-13T02:22:00Z",
175
+ "has_submodules": false,
176
+ "has_submodules_computed_by": "scripts/module_tree.py",
177
+ "has_submodules_computed_at": "2026-11-13T02:22:00Z"
178
+ }
179
+ }
180
+ ],
181
+ "contract_catalog": {
182
+ "index_path": "docs/architecture.md",
183
+ "definitions": {
184
+ "attachment-actions-public-sdk": {
185
+ "kind": "sdk",
186
+ "publication": "published",
187
+ "source_kind": "repository-path",
188
+ "source": "package.json",
189
+ "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 AttachmentActions as public plugin 'attachmentActions' with no config; the first registration of the name wins. The entry exports only the default AttachmentActions class. webex.attachmentActions exposes create, get, and listen, triggers the created event, and carries the JSDoc-private onWebexApiEvent and getattachmentActionEvent; specified in src/docs/README.md."
190
+ },
191
+ "hydra-attachment-actions-http": {
192
+ "kind": "http",
193
+ "publication": "internal",
194
+ "source_kind": "external",
195
+ "source": "Webex REST API attachment actions resource (catalog service name hydra, reached through service: 'hydra' in src/attachmentActions.js; route definitions are not in this repository)",
196
+ "summary": "POST /attachment/actions with the caller's JSON body (type, messageId, inputs) answering the created record; GET /attachment/actions/<id> answering the record. Attachment action ids are base64url of ciscospark://<cluster>/ATTACHMENT_ACTION/<uuid>."
197
+ },
198
+ "webex-core-plugin-host": {
199
+ "kind": "sdk",
200
+ "publication": "published",
201
+ "source_kind": "external",
202
+ "source": "@webex/webex-core (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-013, MOD-014)",
203
+ "summary": "registerPlugin keys a public plugin by its raw name (attachmentActions, 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."
204
+ },
205
+ "webex-core-services": {
206
+ "kind": "sdk",
207
+ "publication": "published",
208
+ "source_kind": "external",
209
+ "source": "@webex/webex-core services (no module spec coverage; code consulted: packages/@webex/webex-core/src/lib/services/services.js)",
210
+ "summary": "getClusterId(url) returns the catalog cluster id of a URL, which getHydraClusterString in @webex/common turns into the cluster part of a Hydra id."
211
+ },
212
+ "common-hydra-ids": {
213
+ "kind": "sdk",
214
+ "publication": "published",
215
+ "source_kind": "external",
216
+ "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)",
217
+ "summary": "constructHydraId(type, id, cluster) encodes base64url ciscospark://<cluster>/<TYPE>/<id>, PEOPLE always with cluster us; hydraTypes holds ATTACHMENT_ACTION, MESSAGE, PEOPLE, and ROOM; getHydraClusterString maps the internal US clusters to us and throws below three cluster parts; SDK_EVENT holds the Mercury event name event:conversation.activity, the activity verb cardAction, the resource attachmentActions, and the external event name created."
218
+ },
219
+ "common-event-envelope": {
220
+ "kind": "sdk",
221
+ "publication": "published",
222
+ "source_kind": "external",
223
+ "source": "@webex/common createEventEnvelope (module spec consulted: packages/@webex/common/src/docs/README.md MOD-011; code consulted: packages/@webex/common/src/event-envelope.js)",
224
+ "summary": "createEventEnvelope(webex, resource) fetches webex.people.get('me') once per instance and resolves {createdBy, orgId, resource, ownedBy: creator, status: active, created, data: {}}; when the identity lookup fails it resolves undefined instead of rejecting."
225
+ },
226
+ "conversation-activity-decryption": {
227
+ "kind": "sdk",
228
+ "publication": "published",
229
+ "source_kind": "external",
230
+ "source": "@webex/internal-plugin-conversation (workspace package; no module spec exists; code consulted: packages/@webex/internal-plugin-conversation/src/index.js and src/decryption-transforms.js)",
231
+ "summary": "Importing the package registers internal plugin conversation with payload-transformer predicates, one of which transforms (decrypts) every inbound event that has an activity; decryptSubmit decrypts object.inputs of a submit object and, on failure, logs a warning and sets inputs to the configured decryptionFailureMessage string. This package calls no conversation method."
232
+ },
233
+ "mercury-activity-events": {
234
+ "kind": "event",
235
+ "publication": "internal",
236
+ "source_kind": "external",
237
+ "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, stale on sessions; code consulted: packages/@webex/internal-plugin-mercury/src/mercury.js)",
238
+ "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."
239
+ }
240
+ }
241
+ },
242
+ "spec_policy": {
243
+ "require_what_and_why": true,
244
+ "require_provenance": true,
245
+ "protected_specs": [
246
+ "src/docs/README.md"
247
+ ]
248
+ },
249
+ "validation": {
250
+ "generator_runtime": "claude-code",
251
+ "generator_model": "claude-opus-5-5",
252
+ "generator_runtime_source": "host-metadata",
253
+ "source_commit": "c22331c97be69968deddf2f8d55d26c84ae2c1ac",
254
+ "minimum_independence": "different-runtime",
255
+ "blocking_severities": [
256
+ "Blocking"
257
+ ],
258
+ "validator_runtime": "01a1d2c4-c928-7fc0-bc29-9bf787bf37bc",
259
+ "validator_runtime_source": "host-metadata",
260
+ "runtime_fallback_tier": "different-runtime"
261
+ },
262
+ "layout": {
263
+ "sdd_root": ".sdd",
264
+ "docs_root": "docs",
265
+ "agent_entry_path": "AGENTS.md",
266
+ "standing_docs_root": "docs",
267
+ "spec_index_path": "docs/specs/README.md",
268
+ "module_docs_strategy": "source-local",
269
+ "module_docs_relative_path": "docs/README.md",
270
+ "module_docs_decision": {
271
+ "basis": "repo-standards-default",
272
+ "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/.",
273
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
274
+ "decided_at": "2026-11-13T02:22:00Z"
275
+ },
276
+ "repo_context_decision": {
277
+ "path": ".repo-context.json",
278
+ "schema_path": "schemas/repo-context.schema.json",
279
+ "action": "create",
280
+ "schema_action": "create",
281
+ "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.",
282
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
283
+ "decided_at": "2026-11-13T02:22:00Z"
284
+ },
285
+ "artifact_decisions": [
286
+ {
287
+ "path": "docs/service.md",
288
+ "action": "omit",
289
+ "reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
290
+ "decided_by": "claude-code (code evidence)",
291
+ "decided_at": "2026-11-13T02:22:00Z"
292
+ },
293
+ {
294
+ "path": "mkdocs.yml",
295
+ "action": "omit",
296
+ "reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
297
+ "decided_by": "claude-code (code evidence)",
298
+ "decided_at": "2026-11-13T02:22:00Z"
299
+ },
300
+ {
301
+ "path": "api-specs/openapi.yaml",
302
+ "action": "omit",
303
+ "reason": "The package serves no HTTP routes. It is a client of the Webex REST API attachment actions resource; its published surface is the npm export described by attachment-actions-public-sdk.",
304
+ "decided_by": "claude-code (code evidence)",
305
+ "decided_at": "2026-11-13T02:22:00Z"
306
+ },
307
+ {
308
+ "path": "SECURITY.md",
309
+ "action": "omit",
310
+ "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.",
311
+ "decided_by": "claude-code (code evidence)",
312
+ "decided_at": "2026-11-13T02:22:00Z"
313
+ },
314
+ {
315
+ "path": "CONTRIBUTING.md",
316
+ "action": "omit",
317
+ "reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
318
+ "decided_by": "claude-code (code evidence)",
319
+ "decided_at": "2026-11-13T02:22:00Z"
320
+ },
321
+ {
322
+ "path": "CHANGELOG.md",
323
+ "action": "omit",
324
+ "reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
325
+ "decided_by": "claude-code (code evidence)",
326
+ "decided_at": "2026-11-13T02:22:00Z"
327
+ },
328
+ {
329
+ "path": "CTO_CHECKLIST.yml",
330
+ "action": "omit",
331
+ "reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
332
+ "decided_by": "claude-code (code evidence)",
333
+ "decided_at": "2026-11-13T02:22:00Z"
334
+ },
335
+ {
336
+ "path": "schemas/cto-checklist.schema.json",
337
+ "action": "omit",
338
+ "reason": "Omitted together with CTO_CHECKLIST.yml.",
339
+ "decided_by": "claude-code (code evidence)",
340
+ "decided_at": "2026-11-13T02:22:00Z"
341
+ }
342
+ ],
343
+ "template_roots": {
344
+ "canonical": ".sdd/templates/repo-standards"
345
+ },
346
+ "contract_index_path": "docs/architecture.md",
347
+ "repo_skills_root": ".sdd/skills",
348
+ "monorepo_package": {
349
+ "package_path": "packages/@webex/plugin-attachment-actions",
350
+ "root_manifest_path": "../../../.sdd/manifest.json",
351
+ "templates_root_path": "../../../.sdd/templates/repo-standards"
352
+ }
353
+ },
354
+ "tooling": {
355
+ "sdlc_skills": {
356
+ "source_ref": "repo-annotation@2.3.1"
357
+ }
358
+ },
359
+ "coverage_ratchet": {
360
+ "enabled": true,
361
+ "waivers": []
362
+ },
363
+ "substrate": {
364
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
365
+ "consumed": [
366
+ "@webex/eslint-config-legacy via .eslintrc.js",
367
+ "@webex/babel-config-legacy via babel.config.js",
368
+ "@webex/jest-config-legacy via jest.config.js (no unit spec uses it)",
369
+ "@webex/legacy-tools build and test runner via package.json",
370
+ "package README.md (context only)",
371
+ "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)"
372
+ ],
373
+ "compliance_tier": "baseline"
374
+ },
375
+ "section_profiles": {
376
+ "repo": {
377
+ "owns_datastore": false,
378
+ "holds_client_state": false,
379
+ "components_interact": true,
380
+ "domain_data_across_components": true,
381
+ "caches_data": false,
382
+ "observability_convention": false,
383
+ "deploys_to_infra": false,
384
+ "shared_base_libs": true,
385
+ "is_monorepo": false,
386
+ "multi_platform": false,
387
+ "published_package": true,
388
+ "embedded_in_host": false,
389
+ "cross_repo_deps_material": true,
390
+ "security_arch_warranted": true,
391
+ "exposes_commands_or_artifacts": true
392
+ },
393
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
394
+ "resolved_at": "2026-11-13T02:22:00Z"
395
+ }
396
+ }
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-13T02:56:49Z
7
+ validation_status: pass-with-warnings
8
+ -->
9
+
10
+ # AI Agent Instructions
11
+
12
+ Package-scoped SDD entry for `@webex/plugin-attachment-actions`, the public `attachmentActions` plugin
13
+ of the SDK (it posts and reads the submit actions of adaptive cards and emits `created` events for
14
+ them from the Mercury socket). This file orients agents. The monorepo root `AGENTS.md` governs
15
+ 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) (Attachment actions plugin);
35
+ and
36
+ - [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
37
+
38
+ Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
39
+ publishes a public SDK surface, so its contract artifact is `package.json` plus the `src/index.js`
40
+ entry. It serves no HTTP, so no OpenAPI applies.
41
+
42
+ ## 1. Commands (Run First)
43
+
44
+ Use only documented commands. Do not invent alternatives when a command is missing. Run `yarn` and
45
+ `yarn prebuild:modules` at the workspace root, and the package scripts below from this package
46
+ directory, `packages/@webex/plugin-attachment-actions`, where `package.json` defines them. From the
47
+ workspace root, `yarn workspace @webex/plugin-attachment-actions <script>` runs the same script.
48
+
49
+ | Task | Command |
50
+ | ---------------------- | ------- |
51
+ | 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/` |
52
+ | Start dev environment | N/A — library package with no start script in `package.json` |
53
+ | Run tests | N/A — the package has no unit tests and no `test:unit` script (see below) |
54
+ | Run linters | `yarn test:style` |
55
+ | Build/release artifact | `yarn build:src` (JavaScript and source maps to `dist/`) |
56
+ | Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
57
+
58
+ `yarn build` runs `yarn build:src` and produces the same output; the package emits no type
59
+ declarations.
60
+
61
+ Do not use the aggregate `test` script: after lint it calls `test:unit`, which this package does not
62
+ define, and exits 1. There is no `test:integration` script, and `yarn test:browser:broken` runs
63
+ `test/integration/spec` through karma but verifies nothing today; see
64
+ [Getting started](docs/getting-started.md#tests) for its state.
65
+
66
+ If a required command is unknown, stop and ask for the exact command.
67
+
68
+ ## 2. Agent Persona and Scope
69
+
70
+ You are the Webex JS SDK engineering assistant for `@webex/plugin-attachment-actions`.
71
+
72
+ Primary outcomes:
73
+
74
+ - Deliver production-safe changes with build and lint passing, and unit tests for what you change.
75
+ - Preserve existing behavior unless a change request explicitly requires a behavior change.
76
+ - Keep docs and configuration aligned with code changes.
77
+
78
+ Definition of done:
79
+
80
+ 1. Requested change is implemented.
81
+ 2. Build and lint pass locally, and any unit cases you added pass.
82
+ 3. Updated docs cover new behavior, including the owning module spec.
83
+ 4. PR summary includes risks and rollback notes.
84
+
85
+ ## 3. Repository Knowledge
86
+
87
+ ### Tech Stack
88
+
89
+ | Area | Tooling | Version |
90
+ | ---------------- | ------- | ------- |
91
+ | 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` reads `18.x` |
92
+ | Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
93
+ | Test framework | None runs: no unit spec; the integration spec uses mocha-style `describe` with `@webex/test-helper-chai` and `@webex/test-helper-test-users`, and no working script runs it | — |
94
+ | Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
95
+
96
+ ### Project Map
97
+
98
+ - `src/index.js`: imports the conversation and Mercury internal plugins, registers public plugin
99
+ `attachmentActions`, and exports `AttachmentActions` (default only).
100
+ - `src/attachmentActions.js`: `AttachmentActions` — `create`, `get`, `listen`, and the private event
101
+ handlers `onWebexApiEvent` and `getattachmentActionEvent`.
102
+ - `test/integration/spec/attachmentActions.js`: two live-service cases, run only by the broken karma
103
+ script.
104
+ - `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
105
+ - `dist/`: generated build output. Never edit by hand.
106
+ - `README.md`: retained npm page, context only; its heading names the messages plugin and it shows no
107
+ usage; see [ADR-0001](docs/adr/0001-retain-product-readme.md).
108
+ - Spec for every file under `src/`: `src/docs/README.md`.
109
+
110
+ ### Critical Constraints
111
+
112
+ - The plugin is `webex.attachmentActions`; `webex` and `webex-node` register it by import, and
113
+ applications and the workspace socket sample call it.
114
+ - Importing the package must keep registering `webex.internal.conversation`, which decrypts socket
115
+ activities and card inputs, and `webex.internal.mercury`, which `listen()` uses (`MOD-001` in the
116
+ module spec).
117
+ - The only event is `created`, only for the verb `cardAction`, built from a deep clone of the stored
118
+ envelope (`INV-001`, `INV-003`).
119
+ - Event ids must stay Hydra ids built with the activity's cluster (`INV-002`).
120
+ - A conversion failure must stay a logged error with no event, never an exception or a partial event
121
+ (`INV-004`).
122
+
123
+ ## 4. Testing Workflow
124
+
125
+ Run checks in this order, from the package directory:
126
+
127
+ 1. `yarn build:src`
128
+ 2. `yarn test:style`
129
+
130
+ Run `yarn prebuild:modules` once on a fresh checkout so `webex-legacy-tools` and the sibling packages'
131
+ `dist/` exist.
132
+
133
+ Testing rules:
134
+
135
+ - The package has no unit tests. When you change behavior, add a `test/unit/spec` file and the
136
+ matching `test:unit` script (`webex-legacy-tools test --unit --runner jest`, as sibling legacy
137
+ packages define it) in the same change; the integration spec does not run, so it does not count as
138
+ coverage.
139
+ - Use `@webex/test-helper-mock-webex` with sinon stubs for `webex.request`,
140
+ `webex.internal.services`, `webex.internal.mercury`, `webex.logger`, and `webex.people`, and assert
141
+ with `@webex/test-helper-chai`.
142
+ - Use `assert.calledOnceWithExactly` for call arguments, and parametrize when more than three cases are
143
+ alike, such as the activity verbs or the missing activity fields.
144
+ - Cover failure paths and edge cases, not only happy paths.
145
+ - Do not remove tests to make CI pass.
146
+
147
+ No coverage gate applies to this package; do not infer one.
148
+
149
+ ## 5. Code Style and Patterns
150
+
151
+ Coding expectations:
152
+
153
+ - Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
154
+ `root: true` and extends the legacy config.
155
+ - Prefer small functions over large procedural blocks.
156
+ - Make error handling explicit; reject argument errors before any request.
157
+ - Keep public interfaces stable unless a breaking change is requested.
158
+
159
+ Pattern example:
160
+
161
+ ```text
162
+ Preferred:
163
+ - Send attachment action requests with this.request({service: 'hydra', resource: 'attachment/actions...'}).
164
+ - Build ids with constructHydraId and getHydraClusterString from @webex/common.
165
+ - Clone this.eventEnvelope inside the try of getattachmentActionEvent before filling an event.
166
+
167
+ Avoid:
168
+ - Building Hydra ids by hand or with a fixed cluster.
169
+ - Letting a conversion error escape onWebexApiEvent.
170
+ - Treating README.md as a usage reference.
171
+ ```
172
+
173
+ ## 6. Git Workflow
174
+
175
+ - Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
176
+ - Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
177
+ the workspace `CONTRIBUTING.md` requires for pull requests.
178
+ - Keep commits focused and reversible.
179
+ - Rebase on the target branch before opening a pull request.
180
+
181
+ PR checklist:
182
+
183
+ - What changed and why.
184
+ - Tests run and results.
185
+ - Risk and impact on applications that call `webex.attachmentActions` or listen for its events, and on
186
+ the `webex` and `webex-node` bundles.
187
+ - Rollback approach.
188
+
189
+ ## 7. Boundaries and Escalation
190
+
191
+ ### Always
192
+
193
+ - Prefer existing patterns over introducing new architecture.
194
+ - Keep changes minimal for the requested scope.
195
+ - Call out assumptions and unknowns explicitly.
196
+ - Update the owning module spec in the same change that alters observable behavior.
197
+
198
+ ### Ask First
199
+
200
+ - Adding or removing dependencies or peer dependencies.
201
+ - Renaming or removing a method, the event, or the registered plugin name.
202
+ - Changing a request path or the event fields, for example adding `personEmail`.
203
+ - Guarding `listen()` against repeated calls, or adding list, update, or delete methods, since callers
204
+ may rely on the current behavior.
205
+
206
+ ### Never
207
+
208
+ - Edit `dist/` by hand.
209
+ - Commit secrets, tokens, or credentials, including in test fixtures.
210
+ - Log card inputs, ids, or email addresses 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`.
@@ -302,7 +302,7 @@ var AttachmentActions = _webexCore.WebexPlugin.extend({
302
302
  return null;
303
303
  }
304
304
  },
305
- version: "3.13.0-next.7"
305
+ version: "3.13.0-next.9"
306
306
  });
307
307
  var _default = exports.default = AttachmentActions;
308
308
  //# sourceMappingURL=attachmentActions.js.map