@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,414 @@
1
+ {
2
+ "$schema": "./schemas/repo-context.schema.json",
3
+ "version": 1,
4
+ "repository": {
5
+ "name": "@webex/plugin-attachment-actions",
6
+ "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."
7
+ },
8
+ "commands": {
9
+ "install": "yarn",
10
+ "prebuild": "yarn prebuild:modules",
11
+ "compile": "yarn build",
12
+ "build": "yarn build:src",
13
+ "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.",
14
+ "lint": "yarn test:style",
15
+ "browser-test": "yarn test:browser:broken",
16
+ "deploy": "yarn deploy:npm"
17
+ },
18
+ "public_interfaces": [
19
+ {
20
+ "name": "@webex/plugin-attachment-actions package entry",
21
+ "kind": "package_export",
22
+ "source": "src/index.js",
23
+ "entrypoints": [
24
+ "import '@webex/plugin-attachment-actions'",
25
+ "import AttachmentActions from '@webex/plugin-attachment-actions'"
26
+ ],
27
+ "audience": "SDK bundles (webex, webex-node) and applications that build their own webex instance",
28
+ "notes": "Importing the package registers the internal plugins conversation (whose payload transformer decrypts socket activities and card inputs) and mercury, then AttachmentActions as public plugin 'attachmentActions' with no config; the first registration of the name wins. The default export AttachmentActions is the only export."
29
+ },
30
+ {
31
+ "name": "webex.attachmentActions methods and events",
32
+ "kind": "plugin_api",
33
+ "source": "src/attachmentActions.js",
34
+ "entrypoints": [
35
+ "webex.attachmentActions.create(attachmentAction)",
36
+ "webex.attachmentActions.get(attachmentAction)",
37
+ "webex.attachmentActions.listen()",
38
+ "webex.attachmentActions.on('created', handler)"
39
+ ],
40
+ "audience": "applications and the workspace sample browser-socket",
41
+ "notes": "create POSTs the caller's object unchanged to hydra attachment/actions and get GETs attachment/actions by record or id; get(undefined) throws synchronously. listen() needs spark:all and spark:kms; each call adds another Mercury listener. Only the verb cardAction gives created, built from the activity alone with Hydra ids and the inputs when present; there is no personEmail. A conversion error is logged through webex.logger.error and drops the event. onWebexApiEvent and getattachmentActionEvent are marked @private."
42
+ },
43
+ {
44
+ "name": "package scripts",
45
+ "kind": "npm_scripts",
46
+ "source": "package.json",
47
+ "entrypoints": [
48
+ "build",
49
+ "build:src",
50
+ "test:style",
51
+ "test:browser:broken",
52
+ "test",
53
+ "deploy:npm"
54
+ ],
55
+ "audience": "contributors and CI",
56
+ "notes": "build runs build:src, which writes dist. There is no test:unit script, no unit test, and no test:integration script. test:browser:broken (commands.browser-test) runs karma over test/integration/spec but bundles nothing today (no case run, exit 0). The aggregate test script runs test:style, then exits 1 because test:unit is not defined; it is deliberately not a manifest command."
57
+ }
58
+ ],
59
+ "source_of_truth": [
60
+ {
61
+ "surface": "Attachment actions plugin implementation",
62
+ "paths": [
63
+ "src/index.js",
64
+ "src/attachmentActions.js"
65
+ ],
66
+ "generated_artifacts": [
67
+ "dist"
68
+ ],
69
+ "refresh_with": [
70
+ "yarn build:src"
71
+ ],
72
+ "validate_with": [
73
+ "yarn test:style"
74
+ ]
75
+ },
76
+ {
77
+ "surface": "module specification",
78
+ "paths": [
79
+ "src/docs/README.md"
80
+ ],
81
+ "generated_artifacts": [],
82
+ "refresh_with": [
83
+ "update alongside the behavior change in the same commit"
84
+ ],
85
+ "validate_with": [
86
+ "spec-validator on an independent runtime"
87
+ ]
88
+ }
89
+ ],
90
+ "generated_artifacts": [
91
+ {
92
+ "path": "dist",
93
+ "generated_from": "src",
94
+ "refresh_with": "yarn build:src"
95
+ },
96
+ {
97
+ "path": "../../../.sdd/templates/repo-standards/template-map.json",
98
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
99
+ "refresh_with": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
100
+ }
101
+ ],
102
+ "validation_matrix": [
103
+ {
104
+ "paths": [
105
+ "src/**"
106
+ ],
107
+ "minimum": [
108
+ "yarn build:src",
109
+ "yarn test:style"
110
+ ],
111
+ "recommended": [
112
+ "add a test/unit/spec case and a test:unit script for the changed behavior; the package has no unit tests"
113
+ ]
114
+ },
115
+ {
116
+ "paths": [
117
+ "src/attachmentActions.js"
118
+ ],
119
+ "minimum": [
120
+ "yarn build:src",
121
+ "yarn test:style"
122
+ ],
123
+ "recommended": [
124
+ "pin the request paths, the cardAction-only mapping, the event fields, and the conversion error path with unit cases before changing them; check the workspace sample browser-socket, which uses listen and the created event"
125
+ ]
126
+ },
127
+ {
128
+ "paths": [
129
+ "src/index.js"
130
+ ],
131
+ "minimum": [
132
+ "yarn build:src",
133
+ "yarn test:style"
134
+ ],
135
+ "recommended": [
136
+ "check the bundles that register the plugin (webex, webex-node) when the registered name or the conversation and mercury imports change"
137
+ ]
138
+ }
139
+ ],
140
+ "change_impact": [
141
+ {
142
+ "paths": [
143
+ "src/attachmentActions.js"
144
+ ],
145
+ "affects": [
146
+ "the hydra attachment/actions requests and their result shapes",
147
+ "the created event and its envelope",
148
+ "the conversion error log line"
149
+ ],
150
+ "refresh_with": [
151
+ "yarn build:src"
152
+ ],
153
+ "validate_with": [
154
+ "yarn test:style"
155
+ ],
156
+ "avoid_direct_edits": [
157
+ "dist"
158
+ ],
159
+ "notes": "No unit case covers any method; add one before changing behavior."
160
+ },
161
+ {
162
+ "paths": [
163
+ "src/index.js"
164
+ ],
165
+ "affects": [
166
+ "the registered plugin name",
167
+ "registration of webex.internal.conversation and webex.internal.mercury"
168
+ ],
169
+ "refresh_with": [
170
+ "yarn build:src"
171
+ ],
172
+ "validate_with": [
173
+ "yarn test:style"
174
+ ],
175
+ "avoid_direct_edits": [
176
+ "dist"
177
+ ],
178
+ "notes": "listen() depends on the mercury plugin registered here, and socket activities and card inputs are decrypted by the conversation plugin registered here (MOD-001)."
179
+ }
180
+ ],
181
+ "evidence_rules": [
182
+ {
183
+ "claim_category": "command_name",
184
+ "sources": [
185
+ "package.json"
186
+ ],
187
+ "requirement": "The script must exist in package.json scripts.",
188
+ "notes": "test:unit and test:integration do not exist, so the aggregate test script fails; test:browser:broken currently verifies nothing."
189
+ },
190
+ {
191
+ "claim_category": "import_path",
192
+ "sources": [
193
+ "src/index.js"
194
+ ],
195
+ "requirement": "A binding is public only if exported from src/index.js.",
196
+ "notes": "The only export is the default AttachmentActions."
197
+ },
198
+ {
199
+ "claim_category": "behavior_claim",
200
+ "sources": [
201
+ "src"
202
+ ],
203
+ "requirement": "Ground every behavioral claim in source evidence.",
204
+ "notes": "Commit history is not an evidence source for this package. README.md is context only (docs/adr/0001-retain-product-readme.md). The integration spec under test/integration/spec states intended behavior but no working script runs it. The webex-core, common, and internal-plugin-mercury specs were consulted, and the mercury spec is stale on sessions, so its code was the referee there; internal-plugin-conversation has no spec, so its code was read, as were the webex-core services and the common helpers where those specs are silent."
205
+ }
206
+ ],
207
+ "negative_guidance": [
208
+ {
209
+ "rule": "Do not build Hydra ids by hand or with a fixed cluster.",
210
+ "why": "Event ids must match the ids the attachment actions resource returns (INV-002)."
211
+ },
212
+ {
213
+ "rule": "Do not let a conversion error escape getattachmentActionEvent or trigger a partial event.",
214
+ "why": "A failure is one error log line and no event (INV-004)."
215
+ },
216
+ {
217
+ "rule": "Do not fill an event without deep-cloning the stored envelope.",
218
+ "why": "One envelope is shared by every event (INV-003)."
219
+ },
220
+ {
221
+ "rule": "Do not log card inputs, ids, or email addresses through webex.logger.",
222
+ "why": "Inputs carry what users typed; only the fixed conversion error line is logged today."
223
+ },
224
+ {
225
+ "rule": "Do not treat README.md as the behavior reference.",
226
+ "why": "Its heading names the messages plugin and it shows no usage; see docs/adr/0001-retain-product-readme.md."
227
+ },
228
+ {
229
+ "rule": "Do not infer a coverage threshold or a unit-test command for this package.",
230
+ "why": "No unit test, test:unit script, coverage script, or threshold exists."
231
+ }
232
+ ],
233
+ "confidence_policy": {
234
+ "high": {
235
+ "action": "update",
236
+ "expectation": "Source and a unit case agree; no such case exists in this package yet."
237
+ },
238
+ "medium": {
239
+ "action": "narrow-scope",
240
+ "expectation": "Only source evidence exists, or only the integration spec that no script runs, as for every method and the event today. Pin current behavior with a unit case before modifying."
241
+ },
242
+ "low": {
243
+ "action": "noop",
244
+ "expectation": "Neither source, tests, nor a dependency's spec or code settles the question, as for why get checks res.body.items. Stop and report the gap."
245
+ }
246
+ },
247
+ "repository_topology": {
248
+ "main_entrypoints": [
249
+ {
250
+ "name": "package entry",
251
+ "path": "src/index.js",
252
+ "purpose": "Registers the conversation and mercury internal plugins and the attachmentActions plugin, and exports the class",
253
+ "notes": "No subpath exports; package.json main is dist/index.js and devMain is src/index.js."
254
+ }
255
+ ],
256
+ "workspace_packages": [
257
+ {
258
+ "name": "@webex/plugin-attachment-actions",
259
+ "paths": [
260
+ "src",
261
+ "test"
262
+ ],
263
+ "notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
264
+ }
265
+ ],
266
+ "source_surfaces": [
267
+ {
268
+ "name": "Attachment actions plugin",
269
+ "paths": [
270
+ "src"
271
+ ],
272
+ "notes": "index.js and attachmentActions.js. Specified at src/docs/README.md."
273
+ },
274
+ {
275
+ "name": "tests",
276
+ "paths": [
277
+ "test/integration/spec"
278
+ ],
279
+ "notes": "One live-service integration spec with 2 cases; only test:browser:broken runs it, and it bundles nothing today. There is no unit spec."
280
+ }
281
+ ],
282
+ "generated_surfaces": [
283
+ {
284
+ "name": "build output",
285
+ "paths": [
286
+ "dist"
287
+ ],
288
+ "generated_from": "src",
289
+ "refresh_with": "yarn build:src",
290
+ "notes": "JavaScript and source maps from webex-legacy-tools; no type declarations. Do not edit by hand."
291
+ },
292
+ {
293
+ "name": "repo-standards template map",
294
+ "paths": [
295
+ "../../../.sdd/templates/repo-standards"
296
+ ],
297
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
298
+ "refresh_with": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package.",
299
+ "notes": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
300
+ }
301
+ ],
302
+ "validation_entrypoints": [
303
+ {
304
+ "name": "compile",
305
+ "command": "yarn build",
306
+ "scope": "src",
307
+ "notes": "Runs build:src."
308
+ },
309
+ {
310
+ "name": "lint",
311
+ "command": "yarn test:style",
312
+ "scope": "src",
313
+ "notes": "eslint via the local .eslintrc.js; docs/** and *.md are ignored."
314
+ }
315
+ ],
316
+ "sync_paths": [
317
+ {
318
+ "source": "src/attachmentActions.js",
319
+ "targets": [
320
+ "src/docs/README.md"
321
+ ],
322
+ "mechanism": "Manual; update the module specification in the same change that alters observable behavior.",
323
+ "notes": "Keep the request, event, failure-mode, and wire rows of the specification aligned with src/attachmentActions.js and src/index.js."
324
+ },
325
+ {
326
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
327
+ "targets": [
328
+ "../../../.sdd/templates/repo-standards"
329
+ ],
330
+ "mechanism": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package.",
331
+ "notes": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
332
+ }
333
+ ]
334
+ },
335
+ "folder_readme_contract": {
336
+ "required_sections": [
337
+ "purpose",
338
+ "boundaries",
339
+ "key-files",
340
+ "common-tasks"
341
+ ],
342
+ "rules": [
343
+ "Orient the reader before describing detail.",
344
+ "Link to the module specification rather than duplicating it."
345
+ ],
346
+ "example_policy": "Examples are allowed only when verified against src/ or test/.",
347
+ "fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
348
+ },
349
+ "regression_feedback_rules": [
350
+ {
351
+ "trigger": "An attachment actions request or its result handling in src/attachmentActions.js changes.",
352
+ "required_followups": [
353
+ "Add a test:unit script and a test/unit/spec case asserting the request options and the resolved value, including the items branch of get",
354
+ "Update MOD-002 and MOD-003 in src/docs/README.md"
355
+ ],
356
+ "notes": "No unit case exists for any method today."
357
+ },
358
+ {
359
+ "trigger": "listen, onWebexApiEvent, or getattachmentActionEvent in src/attachmentActions.js, or the imports in src/index.js, change.",
360
+ "required_followups": [
361
+ "Add parametrized unit cases for each activity verb, each missing activity field, the absent inputs, and the undefined envelope",
362
+ "Update MOD-001, MOD-004 to MOD-007, and INV-001 to INV-004 in src/docs/README.md"
363
+ ],
364
+ "notes": "Listeners and the socket sample rely on the event name created and on the envelope and data fields."
365
+ }
366
+ ],
367
+ "surface_owners": [
368
+ {
369
+ "surface": "module implementation and specifications",
370
+ "owner": "@webex/web-sdk",
371
+ "edit_boundary": "The monorepo .github/CODEOWNERS has no line for packages/@webex/plugin-attachment-actions, so its default rule assigns the package to @webex/web-sdk."
372
+ }
373
+ ],
374
+ "do_not_edit": [
375
+ "dist",
376
+ "../../../.sdd/templates/repo-standards"
377
+ ],
378
+ "marker_scopes": {
379
+ "sdd": [
380
+ ".sdd/manifest.json",
381
+ "src/docs/README.md",
382
+ "docs"
383
+ ]
384
+ },
385
+ "fallback_rules": [
386
+ "When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
387
+ "When neither source nor tests settle a question, report it as a gap instead of inferring.",
388
+ "Commit history is not a valid rationale source for this package.",
389
+ "When a dependency's specification disagrees with that dependency's code, use the code and record the disagreement; when a dependency has no specification, use its code."
390
+ ],
391
+ "downstream_context_pack": {
392
+ "required_human_surfaces": [
393
+ "README.md",
394
+ "docs/index.md",
395
+ "docs/architecture.md",
396
+ "src/docs/README.md"
397
+ ],
398
+ "required_agent_operational_surfaces": [
399
+ "AGENTS.md",
400
+ "docs/specs/README.md"
401
+ ],
402
+ "required_machine_readable_surface": ".sdd/manifest.json",
403
+ "recommended_machine_readable_sections": [
404
+ "public_interfaces",
405
+ "change_impact",
406
+ "evidence_rules",
407
+ "negative_guidance",
408
+ "confidence_policy",
409
+ "repository_topology",
410
+ "folder_readme_contract",
411
+ "regression_feedback_rules"
412
+ ]
413
+ }
414
+ }