@webex/plugin-attachment-actions 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/.repo-context.json +412 -0
- package/.sdd/manifest.json +388 -0
- package/AGENTS.md +210 -0
- package/dist/attachmentActions.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +99 -0
- package/docs/adr/index.md +25 -0
- package/docs/architecture.md +244 -0
- package/docs/getting-started.md +124 -0
- package/docs/index.md +43 -0
- package/docs/specs/README.md +69 -0
- package/package.json +15 -15
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +354 -0
|
@@ -0,0 +1,388 @@
|
|
|
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
|
+
"compile": {
|
|
19
|
+
"command": "yarn workspace @webex/plugin-attachment-actions build",
|
|
20
|
+
"source_file": "package.json",
|
|
21
|
+
"role": "compile"
|
|
22
|
+
},
|
|
23
|
+
"build": {
|
|
24
|
+
"command": "yarn workspace @webex/plugin-attachment-actions build:src",
|
|
25
|
+
"source_file": "package.json",
|
|
26
|
+
"role": "package"
|
|
27
|
+
},
|
|
28
|
+
"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.",
|
|
29
|
+
"lint": {
|
|
30
|
+
"command": "yarn workspace @webex/plugin-attachment-actions test:style",
|
|
31
|
+
"source_file": "package.json",
|
|
32
|
+
"role": "lint"
|
|
33
|
+
},
|
|
34
|
+
"browser-test": {
|
|
35
|
+
"command": "yarn workspace @webex/plugin-attachment-actions test:browser:broken",
|
|
36
|
+
"source_file": "package.json",
|
|
37
|
+
"role": "other"
|
|
38
|
+
},
|
|
39
|
+
"deploy": {
|
|
40
|
+
"command": "yarn workspace @webex/plugin-attachment-actions deploy:npm",
|
|
41
|
+
"source_file": "package.json",
|
|
42
|
+
"role": "deploy"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"toolchain": [
|
|
46
|
+
{
|
|
47
|
+
"name": "node",
|
|
48
|
+
"version": ">=16",
|
|
49
|
+
"origin": "repo-config",
|
|
50
|
+
"source_file": "package.json"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "node",
|
|
54
|
+
"version": "22.14",
|
|
55
|
+
"origin": "repo-config",
|
|
56
|
+
"source_file": "../../../AGENTS.md"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "node",
|
|
60
|
+
"version": "lts/jod",
|
|
61
|
+
"origin": "repo-config",
|
|
62
|
+
"source_file": "../../../.nvmrc"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "node",
|
|
66
|
+
"version": "18.x",
|
|
67
|
+
"origin": "repo-config",
|
|
68
|
+
"source_file": "../../../package.json"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "yarn",
|
|
72
|
+
"version": "3.4.1",
|
|
73
|
+
"origin": "repo-config",
|
|
74
|
+
"source_file": "../../../package.json"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "babel",
|
|
78
|
+
"version": "^7.17.10",
|
|
79
|
+
"origin": "repo-config",
|
|
80
|
+
"source_file": "package.json"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "eslint",
|
|
84
|
+
"version": "^8.24.0",
|
|
85
|
+
"origin": "repo-config",
|
|
86
|
+
"source_file": "package.json"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "prettier",
|
|
90
|
+
"version": "^2.7.1",
|
|
91
|
+
"origin": "repo-config",
|
|
92
|
+
"source_file": "package.json"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"quality_gates": {
|
|
96
|
+
"code_coverage": {
|
|
97
|
+
"origin": "none",
|
|
98
|
+
"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)"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"coverage_status_definitions": {
|
|
102
|
+
"specced": ">=80% public surface specced, drift <5% - spec is authoritative",
|
|
103
|
+
"partial": "40-80% specced - spec is a hint, cross-check code",
|
|
104
|
+
"untracked": "<40% specced - code is the source of truth"
|
|
105
|
+
},
|
|
106
|
+
"spec_source_policy": {
|
|
107
|
+
"mode": "keep-separate",
|
|
108
|
+
"migrated_source_disposition": "retain",
|
|
109
|
+
"disposition_decided_by": "rarajes2@cisco.com",
|
|
110
|
+
"disposition_decided_at": "2026-11-13T02:20:00Z",
|
|
111
|
+
"decided_by": "rarajes2@cisco.com",
|
|
112
|
+
"decided_at": "2026-11-13T02:20:00Z",
|
|
113
|
+
"decision_record": "docs/adr/0001-retain-product-readme.md"
|
|
114
|
+
},
|
|
115
|
+
"spec_sources": [
|
|
116
|
+
{
|
|
117
|
+
"path": "README.md",
|
|
118
|
+
"scope": "repo",
|
|
119
|
+
"role": "reference-only",
|
|
120
|
+
"canonical": false,
|
|
121
|
+
"use_by_agents": "context-only",
|
|
122
|
+
"post_migration_action": "retain",
|
|
123
|
+
"deletion_status": "not-applicable",
|
|
124
|
+
"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."
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"modules": [
|
|
128
|
+
{
|
|
129
|
+
"path": "src",
|
|
130
|
+
"canonical_spec": "src/docs/README.md",
|
|
131
|
+
"coverage_status": "Partial",
|
|
132
|
+
"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.",
|
|
133
|
+
"last_assessed": "2026-11-13",
|
|
134
|
+
"contracts": {
|
|
135
|
+
"provides": [
|
|
136
|
+
"attachment-actions-public-sdk"
|
|
137
|
+
],
|
|
138
|
+
"requires": [
|
|
139
|
+
"hydra-attachment-actions-http",
|
|
140
|
+
"webex-core-plugin-host",
|
|
141
|
+
"webex-core-services",
|
|
142
|
+
"common-hydra-ids",
|
|
143
|
+
"common-event-envelope",
|
|
144
|
+
"conversation-activity-decryption",
|
|
145
|
+
"mercury-activity-events"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"section_profile": {
|
|
149
|
+
"has_tiers": false,
|
|
150
|
+
"has_ui": false,
|
|
151
|
+
"crosses_service_boundaries": true,
|
|
152
|
+
"holds_client_state": false,
|
|
153
|
+
"enforces_domain_rules": true,
|
|
154
|
+
"is_concurrent_async": true,
|
|
155
|
+
"owns_persistence": false,
|
|
156
|
+
"stateful_transitions": false,
|
|
157
|
+
"exposes_wire_protocol": true,
|
|
158
|
+
"ui_multi_screen": false,
|
|
159
|
+
"large_data_model": false,
|
|
160
|
+
"returns_caller_errors": true,
|
|
161
|
+
"module_specific_conventions": true,
|
|
162
|
+
"published_package": true,
|
|
163
|
+
"embedded_in_host": false,
|
|
164
|
+
"has_design_tradeoff": true,
|
|
165
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
166
|
+
"resolved_at": "2026-11-13T02:22:00Z",
|
|
167
|
+
"has_submodules": false,
|
|
168
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
169
|
+
"has_submodules_computed_at": "2026-11-13T02:22:00Z"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"contract_catalog": {
|
|
174
|
+
"index_path": "docs/architecture.md",
|
|
175
|
+
"definitions": {
|
|
176
|
+
"attachment-actions-public-sdk": {
|
|
177
|
+
"kind": "sdk",
|
|
178
|
+
"publication": "published",
|
|
179
|
+
"source_kind": "repository-path",
|
|
180
|
+
"source": "package.json",
|
|
181
|
+
"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."
|
|
182
|
+
},
|
|
183
|
+
"hydra-attachment-actions-http": {
|
|
184
|
+
"kind": "http",
|
|
185
|
+
"publication": "internal",
|
|
186
|
+
"source_kind": "external",
|
|
187
|
+
"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)",
|
|
188
|
+
"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>."
|
|
189
|
+
},
|
|
190
|
+
"webex-core-plugin-host": {
|
|
191
|
+
"kind": "sdk",
|
|
192
|
+
"publication": "published",
|
|
193
|
+
"source_kind": "external",
|
|
194
|
+
"source": "@webex/webex-core (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-013, MOD-014)",
|
|
195
|
+
"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."
|
|
196
|
+
},
|
|
197
|
+
"webex-core-services": {
|
|
198
|
+
"kind": "sdk",
|
|
199
|
+
"publication": "published",
|
|
200
|
+
"source_kind": "external",
|
|
201
|
+
"source": "@webex/webex-core services (no module spec coverage; code consulted: packages/@webex/webex-core/src/lib/services/services.js)",
|
|
202
|
+
"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."
|
|
203
|
+
},
|
|
204
|
+
"common-hydra-ids": {
|
|
205
|
+
"kind": "sdk",
|
|
206
|
+
"publication": "published",
|
|
207
|
+
"source_kind": "external",
|
|
208
|
+
"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)",
|
|
209
|
+
"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."
|
|
210
|
+
},
|
|
211
|
+
"common-event-envelope": {
|
|
212
|
+
"kind": "sdk",
|
|
213
|
+
"publication": "published",
|
|
214
|
+
"source_kind": "external",
|
|
215
|
+
"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)",
|
|
216
|
+
"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."
|
|
217
|
+
},
|
|
218
|
+
"conversation-activity-decryption": {
|
|
219
|
+
"kind": "sdk",
|
|
220
|
+
"publication": "published",
|
|
221
|
+
"source_kind": "external",
|
|
222
|
+
"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)",
|
|
223
|
+
"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."
|
|
224
|
+
},
|
|
225
|
+
"mercury-activity-events": {
|
|
226
|
+
"kind": "event",
|
|
227
|
+
"publication": "internal",
|
|
228
|
+
"source_kind": "external",
|
|
229
|
+
"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)",
|
|
230
|
+
"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."
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"spec_policy": {
|
|
235
|
+
"require_what_and_why": true,
|
|
236
|
+
"require_provenance": true,
|
|
237
|
+
"protected_specs": [
|
|
238
|
+
"src/docs/README.md"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"validation": {
|
|
242
|
+
"generator_runtime": "claude-code",
|
|
243
|
+
"generator_model": "claude-opus-5-5",
|
|
244
|
+
"generator_runtime_source": "host-metadata",
|
|
245
|
+
"source_commit": "c22331c97be69968deddf2f8d55d26c84ae2c1ac",
|
|
246
|
+
"minimum_independence": "different-runtime",
|
|
247
|
+
"blocking_severities": [
|
|
248
|
+
"Blocking"
|
|
249
|
+
],
|
|
250
|
+
"validator_runtime": "01a1d2c4-c928-7fc0-bc29-9bf787bf37bc",
|
|
251
|
+
"validator_runtime_source": "host-metadata",
|
|
252
|
+
"runtime_fallback_tier": "different-runtime"
|
|
253
|
+
},
|
|
254
|
+
"layout": {
|
|
255
|
+
"sdd_root": ".sdd",
|
|
256
|
+
"docs_root": "docs",
|
|
257
|
+
"agent_entry_path": "AGENTS.md",
|
|
258
|
+
"standing_docs_root": "docs",
|
|
259
|
+
"spec_index_path": "docs/specs/README.md",
|
|
260
|
+
"module_docs_strategy": "source-local",
|
|
261
|
+
"module_docs_relative_path": "docs/README.md",
|
|
262
|
+
"module_docs_decision": {
|
|
263
|
+
"basis": "repo-standards-default",
|
|
264
|
+
"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/.",
|
|
265
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
266
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
267
|
+
},
|
|
268
|
+
"repo_context_decision": {
|
|
269
|
+
"path": ".repo-context.json",
|
|
270
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
271
|
+
"action": "create",
|
|
272
|
+
"schema_action": "create",
|
|
273
|
+
"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.",
|
|
274
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
275
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
276
|
+
},
|
|
277
|
+
"artifact_decisions": [
|
|
278
|
+
{
|
|
279
|
+
"path": "docs/service.md",
|
|
280
|
+
"action": "omit",
|
|
281
|
+
"reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
|
|
282
|
+
"decided_by": "claude-code (code evidence)",
|
|
283
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"path": "mkdocs.yml",
|
|
287
|
+
"action": "omit",
|
|
288
|
+
"reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
|
|
289
|
+
"decided_by": "claude-code (code evidence)",
|
|
290
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"path": "api-specs/openapi.yaml",
|
|
294
|
+
"action": "omit",
|
|
295
|
+
"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.",
|
|
296
|
+
"decided_by": "claude-code (code evidence)",
|
|
297
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"path": "SECURITY.md",
|
|
301
|
+
"action": "omit",
|
|
302
|
+
"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.",
|
|
303
|
+
"decided_by": "claude-code (code evidence)",
|
|
304
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"path": "CONTRIBUTING.md",
|
|
308
|
+
"action": "omit",
|
|
309
|
+
"reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
|
|
310
|
+
"decided_by": "claude-code (code evidence)",
|
|
311
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"path": "CHANGELOG.md",
|
|
315
|
+
"action": "omit",
|
|
316
|
+
"reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
|
|
317
|
+
"decided_by": "claude-code (code evidence)",
|
|
318
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"path": "CTO_CHECKLIST.yml",
|
|
322
|
+
"action": "omit",
|
|
323
|
+
"reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
|
|
324
|
+
"decided_by": "claude-code (code evidence)",
|
|
325
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
329
|
+
"action": "omit",
|
|
330
|
+
"reason": "Omitted together with CTO_CHECKLIST.yml.",
|
|
331
|
+
"decided_by": "claude-code (code evidence)",
|
|
332
|
+
"decided_at": "2026-11-13T02:22:00Z"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"template_roots": {
|
|
336
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
337
|
+
},
|
|
338
|
+
"contract_index_path": "docs/architecture.md",
|
|
339
|
+
"repo_skills_root": ".sdd/skills",
|
|
340
|
+
"monorepo_package": {
|
|
341
|
+
"package_path": "packages/@webex/plugin-attachment-actions",
|
|
342
|
+
"root_manifest_path": "../../../.sdd/manifest.json",
|
|
343
|
+
"templates_root_path": "../../../.sdd/templates/repo-standards"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"tooling": {
|
|
347
|
+
"sdlc_skills": {
|
|
348
|
+
"source_ref": "repo-annotation@2.3.1"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"coverage_ratchet": {
|
|
352
|
+
"enabled": true,
|
|
353
|
+
"waivers": []
|
|
354
|
+
},
|
|
355
|
+
"substrate": {
|
|
356
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
357
|
+
"consumed": [
|
|
358
|
+
"@webex/eslint-config-legacy via .eslintrc.js",
|
|
359
|
+
"@webex/babel-config-legacy via babel.config.js",
|
|
360
|
+
"@webex/jest-config-legacy via jest.config.js (no unit spec uses it)",
|
|
361
|
+
"@webex/legacy-tools build and test runner via package.json",
|
|
362
|
+
"package README.md (context only)",
|
|
363
|
+
"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)"
|
|
364
|
+
],
|
|
365
|
+
"compliance_tier": "baseline"
|
|
366
|
+
},
|
|
367
|
+
"section_profiles": {
|
|
368
|
+
"repo": {
|
|
369
|
+
"owns_datastore": false,
|
|
370
|
+
"holds_client_state": false,
|
|
371
|
+
"components_interact": true,
|
|
372
|
+
"domain_data_across_components": true,
|
|
373
|
+
"caches_data": false,
|
|
374
|
+
"observability_convention": false,
|
|
375
|
+
"deploys_to_infra": false,
|
|
376
|
+
"shared_base_libs": true,
|
|
377
|
+
"is_monorepo": false,
|
|
378
|
+
"multi_platform": false,
|
|
379
|
+
"published_package": true,
|
|
380
|
+
"embedded_in_host": false,
|
|
381
|
+
"cross_repo_deps_material": true,
|
|
382
|
+
"security_arch_warranted": true,
|
|
383
|
+
"exposes_commands_or_artifacts": true
|
|
384
|
+
},
|
|
385
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
386
|
+
"resolved_at": "2026-11-13T02:22:00Z"
|
|
387
|
+
}
|
|
388
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
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 every command
|
|
45
|
+
below from the workspace root. The package scripts run through
|
|
46
|
+
`yarn workspace @webex/plugin-attachment-actions <script>`; `package.json` in
|
|
47
|
+
`packages/@webex/plugin-attachment-actions` defines them.
|
|
48
|
+
|
|
49
|
+
| Task | Command |
|
|
50
|
+
| ---------------------- | ------- |
|
|
51
|
+
| Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command). Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the workspace root; see [Prebuilding](../../../CONTRIBUTING.md#prebuilding) |
|
|
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 workspace @webex/plugin-attachment-actions test:style` |
|
|
55
|
+
| Build/release artifact | `yarn workspace @webex/plugin-attachment-actions 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 workspace @webex/plugin-attachment-actions build` runs `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 workspace @webex/plugin-attachment-actions 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 workspace root:
|
|
126
|
+
|
|
127
|
+
1. `yarn workspace @webex/plugin-attachment-actions build:src`
|
|
128
|
+
2. `yarn workspace @webex/plugin-attachment-actions test:style`
|
|
129
|
+
|
|
130
|
+
Testing rules:
|
|
131
|
+
|
|
132
|
+
- The package has no unit tests. When you change behavior, add a `test/unit/spec` file and the
|
|
133
|
+
matching `test:unit` script (`webex-legacy-tools test --unit --runner jest`, as sibling legacy
|
|
134
|
+
packages define it) in the same change; the integration spec does not run, so it does not count as
|
|
135
|
+
coverage.
|
|
136
|
+
- Use `@webex/test-helper-mock-webex` with sinon stubs for `webex.request`,
|
|
137
|
+
`webex.internal.services`, `webex.internal.mercury`, `webex.logger`, and `webex.people`, and assert
|
|
138
|
+
with `@webex/test-helper-chai`.
|
|
139
|
+
- Use `assert.calledOnceWithExactly` for call arguments, and parametrize when more than three cases are
|
|
140
|
+
alike, such as the activity verbs or the missing activity fields.
|
|
141
|
+
- Cover failure paths and edge cases, not only happy paths.
|
|
142
|
+
- Do not remove tests to make CI pass.
|
|
143
|
+
|
|
144
|
+
No coverage gate applies to this package; do not infer one.
|
|
145
|
+
|
|
146
|
+
## 5. Code Style and Patterns
|
|
147
|
+
|
|
148
|
+
Coding expectations:
|
|
149
|
+
|
|
150
|
+
- Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
|
|
151
|
+
`root: true` and extends the legacy config.
|
|
152
|
+
- Prefer small functions over large procedural blocks.
|
|
153
|
+
- Make error handling explicit; reject argument errors before any request.
|
|
154
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
155
|
+
|
|
156
|
+
Pattern example:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
Preferred:
|
|
160
|
+
- Send attachment action requests with this.request({service: 'hydra', resource: 'attachment/actions...'}).
|
|
161
|
+
- Build ids with constructHydraId and getHydraClusterString from @webex/common.
|
|
162
|
+
- Clone this.eventEnvelope inside the try of getattachmentActionEvent before filling an event.
|
|
163
|
+
|
|
164
|
+
Avoid:
|
|
165
|
+
- Building Hydra ids by hand or with a fixed cluster.
|
|
166
|
+
- Letting a conversion error escape onWebexApiEvent.
|
|
167
|
+
- Treating README.md as a usage reference.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## 6. Git Workflow
|
|
171
|
+
|
|
172
|
+
- Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
|
|
173
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
|
|
174
|
+
the workspace `CONTRIBUTING.md` requires for pull requests.
|
|
175
|
+
- Keep commits focused and reversible.
|
|
176
|
+
- Rebase on the target branch before opening a pull request.
|
|
177
|
+
|
|
178
|
+
PR checklist:
|
|
179
|
+
|
|
180
|
+
- What changed and why.
|
|
181
|
+
- Tests run and results.
|
|
182
|
+
- Risk and impact on applications that call `webex.attachmentActions` or listen for its events, and on
|
|
183
|
+
the `webex` and `webex-node` bundles.
|
|
184
|
+
- Rollback approach.
|
|
185
|
+
|
|
186
|
+
## 7. Boundaries and Escalation
|
|
187
|
+
|
|
188
|
+
### Always
|
|
189
|
+
|
|
190
|
+
- Prefer existing patterns over introducing new architecture.
|
|
191
|
+
- Keep changes minimal for the requested scope.
|
|
192
|
+
- Call out assumptions and unknowns explicitly.
|
|
193
|
+
- Update the owning module spec in the same change that alters observable behavior.
|
|
194
|
+
|
|
195
|
+
### Ask First
|
|
196
|
+
|
|
197
|
+
- Adding or removing dependencies or peer dependencies.
|
|
198
|
+
- Renaming or removing a method, the event, or the registered plugin name.
|
|
199
|
+
- Changing a request path or the event fields, for example adding `personEmail`.
|
|
200
|
+
- Guarding `listen()` against repeated calls, or adding list, update, or delete methods, since callers
|
|
201
|
+
may rely on the current behavior.
|
|
202
|
+
|
|
203
|
+
### Never
|
|
204
|
+
|
|
205
|
+
- Edit `dist/` by hand.
|
|
206
|
+
- Commit secrets, tokens, or credentials, including in test fixtures.
|
|
207
|
+
- Log card inputs, ids, or email addresses through `webex.logger`.
|
|
208
|
+
- Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
|
|
209
|
+
templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
|
|
210
|
+
`.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.
|
|
305
|
+
version: "3.13.0-next.10"
|
|
306
306
|
});
|
|
307
307
|
var _default = exports.default = AttachmentActions;
|
|
308
308
|
//# sourceMappingURL=attachmentActions.js.map
|