@webex/plugin-webhooks 3.13.0-next.4 → 3.13.0-next.6
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 +421 -0
- package/.sdd/manifest.json +357 -0
- package/AGENTS.md +208 -0
- package/dist/webhooks.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +96 -0
- package/docs/adr/index.md +25 -0
- package/docs/architecture.md +234 -0
- package/docs/getting-started.md +117 -0
- package/docs/index.md +42 -0
- package/docs/specs/README.md +68 -0
- package/package.json +9 -9
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +313 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/plugin-webhooks",
|
|
5
|
+
"purpose": "Public plugin registered as webex.webhooks that manages Webex webhook registrations through the Webex REST API webhooks resource (catalog service hydra): create POSTs a webhook, get takes a webhook object or id and resolves one webhook, list resolves a webex-core Page, remove DELETEs a webhook and resolves undefined on a 204, and update PUTs the whole webhook object. Each call sends one request through webex.request and resolves what the service returns; the plugin checks no argument, does not receive or verify webhook deliveries, emits no SDK event, and caches or persists nothing.",
|
|
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-webhooks build",
|
|
20
|
+
"source_file": "package.json",
|
|
21
|
+
"role": "compile"
|
|
22
|
+
},
|
|
23
|
+
"build": {
|
|
24
|
+
"command": "yarn workspace @webex/plugin-webhooks 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/webhooks.js, is wrapped in describe.skip and runs only under test:browser, which currently bundles nothing. Add a unit suite and script before recording a command here.",
|
|
29
|
+
"lint": {
|
|
30
|
+
"command": "yarn workspace @webex/plugin-webhooks test:style",
|
|
31
|
+
"source_file": "package.json",
|
|
32
|
+
"role": "lint"
|
|
33
|
+
},
|
|
34
|
+
"browser-test": {
|
|
35
|
+
"command": "yarn workspace @webex/plugin-webhooks test:browser",
|
|
36
|
+
"source_file": "package.json",
|
|
37
|
+
"role": "other"
|
|
38
|
+
},
|
|
39
|
+
"deploy": {
|
|
40
|
+
"command": "yarn workspace @webex/plugin-webhooks deploy:npm",
|
|
41
|
+
"source_file": "package.json",
|
|
42
|
+
"role": "deploy"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"toolchain": [
|
|
46
|
+
{
|
|
47
|
+
"name": "node",
|
|
48
|
+
"version": ">=18",
|
|
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. It repeats its Install and Usage sections; its one example, webex.webhooks.get(id), matches the code. It documents nothing about create, list, remove, or update, names no scope, and says nothing about receiving webhook deliveries. 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% (12/12) assessed 2026-11-13 by the generator; critical field coverage 6/6. Independent validation passed 2026-11-13 (0 Blocking, 0 warnings; validator runtime 01a1d2c3-25b2-7a93-a84a-c3d3b83a8df1). The package has no unit tests: package.json defines no test:unit script and there is no test/unit directory, so none of MOD-001 to MOD-006 has running test evidence. The integration spec test/integration/spec/webhooks.js holds 7 live-service cases, all inside describe.skip; no package script would run them anyway: test:browser bundles nothing (isbot parse error, 0 tests, exit 0) and test:integration does not exist. build:src, build, and test:style exit 0 (0 warnings, 0 errors before this spec existed). No characterization baseline exists; the module remains Partial pending a unit suite, characterization baseline, and promotion review.",
|
|
133
|
+
"last_assessed": "2026-11-13",
|
|
134
|
+
"contracts": {
|
|
135
|
+
"provides": [
|
|
136
|
+
"webhooks-public-sdk"
|
|
137
|
+
],
|
|
138
|
+
"requires": [
|
|
139
|
+
"hydra-webhooks-http",
|
|
140
|
+
"webex-core-plugin-host",
|
|
141
|
+
"webex-core-page"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"section_profile": {
|
|
145
|
+
"has_tiers": false,
|
|
146
|
+
"has_ui": false,
|
|
147
|
+
"crosses_service_boundaries": true,
|
|
148
|
+
"holds_client_state": false,
|
|
149
|
+
"enforces_domain_rules": false,
|
|
150
|
+
"is_concurrent_async": true,
|
|
151
|
+
"owns_persistence": false,
|
|
152
|
+
"stateful_transitions": false,
|
|
153
|
+
"exposes_wire_protocol": true,
|
|
154
|
+
"ui_multi_screen": false,
|
|
155
|
+
"large_data_model": false,
|
|
156
|
+
"returns_caller_errors": true,
|
|
157
|
+
"module_specific_conventions": true,
|
|
158
|
+
"published_package": true,
|
|
159
|
+
"embedded_in_host": false,
|
|
160
|
+
"has_design_tradeoff": true,
|
|
161
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
162
|
+
"resolved_at": "2026-11-13T02:25:00Z",
|
|
163
|
+
"has_submodules": false,
|
|
164
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
165
|
+
"has_submodules_computed_at": "2026-11-13T02:25:00Z"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"contract_catalog": {
|
|
170
|
+
"index_path": "docs/architecture.md",
|
|
171
|
+
"definitions": {
|
|
172
|
+
"webhooks-public-sdk": {
|
|
173
|
+
"kind": "sdk",
|
|
174
|
+
"publication": "published",
|
|
175
|
+
"source_kind": "repository-path",
|
|
176
|
+
"source": "package.json",
|
|
177
|
+
"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 Webhooks as public plugin 'webhooks' with no config; the first registration of the name wins. The entry exports only the default Webhooks class. webex.webhooks exposes create, get, list, remove, and update and nothing else (no SDK events, no delivery receiver); specified in src/docs/README.md."
|
|
178
|
+
},
|
|
179
|
+
"hydra-webhooks-http": {
|
|
180
|
+
"kind": "http",
|
|
181
|
+
"publication": "internal",
|
|
182
|
+
"source_kind": "external",
|
|
183
|
+
"source": "Webex REST API webhooks resource (catalog service name hydra, reached through service: 'hydra' in src/webhooks.js; route definitions are not in this repository)",
|
|
184
|
+
"summary": "POST /webhooks with a webhook body; GET /webhooks/<id>; GET /webhooks/ with the caller's query object answering a paged {items} with Link headers; DELETE /webhooks/<id> answering 204; PUT /webhooks/<id> with the whole webhook body. A webhook carries id, resource, event, filter, targetUrl, name, and created per the JSDoc typedef; the Webhook assertion of @webex/test-helper-chai expects a Hydra id and string resource, event, filter, targetUrl, and name. The service then POSTs each matching event to targetUrl; that delivery never passes through this package."
|
|
185
|
+
},
|
|
186
|
+
"webex-core-plugin-host": {
|
|
187
|
+
"kind": "sdk",
|
|
188
|
+
"publication": "published",
|
|
189
|
+
"source_kind": "external",
|
|
190
|
+
"source": "@webex/webex-core (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-013, MOD-014, MOD-048, UC-004)",
|
|
191
|
+
"summary": "registerPlugin keys a public plugin by its raw name (webhooks, first registration wins) and adds webex.<name> to later instances; WebexPlugin supplies webex and request; a failed request rejects with a WebexHttpError whose message names the method, service, and resource."
|
|
192
|
+
},
|
|
193
|
+
"webex-core-page": {
|
|
194
|
+
"kind": "sdk",
|
|
195
|
+
"publication": "published",
|
|
196
|
+
"source_kind": "external",
|
|
197
|
+
"source": "@webex/webex-core Page (module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-054, MOD-055)",
|
|
198
|
+
"summary": "new Page(res, webex) stores the body items and parsed Link headers; next and previous request the linked URL and resolve a new Page; hasNext and hasPrevious report the links; length and iteration follow items."
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"spec_policy": {
|
|
203
|
+
"require_what_and_why": true,
|
|
204
|
+
"require_provenance": true,
|
|
205
|
+
"protected_specs": [
|
|
206
|
+
"src/docs/README.md"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"validation": {
|
|
210
|
+
"generator_runtime": "claude-code",
|
|
211
|
+
"generator_model": "claude-opus-5-5",
|
|
212
|
+
"generator_runtime_source": "host-metadata",
|
|
213
|
+
"source_commit": "c22331c97be69968deddf2f8d55d26c84ae2c1ac",
|
|
214
|
+
"minimum_independence": "different-runtime",
|
|
215
|
+
"blocking_severities": [
|
|
216
|
+
"Blocking"
|
|
217
|
+
],
|
|
218
|
+
"validator_runtime": "01a1d2c3-25b2-7a93-a84a-c3d3b83a8df1",
|
|
219
|
+
"validator_runtime_source": "invocation-input",
|
|
220
|
+
"validator_run_id": "01a1d2c3-25b2-7a93-a84a-c3d3b83a8df1",
|
|
221
|
+
"runtime_fallback_tier": "different-runtime"
|
|
222
|
+
},
|
|
223
|
+
"layout": {
|
|
224
|
+
"sdd_root": ".sdd",
|
|
225
|
+
"docs_root": "docs",
|
|
226
|
+
"agent_entry_path": "AGENTS.md",
|
|
227
|
+
"standing_docs_root": "docs",
|
|
228
|
+
"spec_index_path": "docs/specs/README.md",
|
|
229
|
+
"module_docs_strategy": "source-local",
|
|
230
|
+
"module_docs_relative_path": "docs/README.md",
|
|
231
|
+
"module_docs_decision": {
|
|
232
|
+
"basis": "repo-standards-default",
|
|
233
|
+
"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/.",
|
|
234
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
235
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
236
|
+
},
|
|
237
|
+
"repo_context_decision": {
|
|
238
|
+
"path": ".repo-context.json",
|
|
239
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
240
|
+
"action": "create",
|
|
241
|
+
"schema_action": "create",
|
|
242
|
+
"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.",
|
|
243
|
+
"decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
|
|
244
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
245
|
+
},
|
|
246
|
+
"artifact_decisions": [
|
|
247
|
+
{
|
|
248
|
+
"path": "docs/service.md",
|
|
249
|
+
"action": "omit",
|
|
250
|
+
"reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
|
|
251
|
+
"decided_by": "claude-code (code evidence)",
|
|
252
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"path": "mkdocs.yml",
|
|
256
|
+
"action": "omit",
|
|
257
|
+
"reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
|
|
258
|
+
"decided_by": "claude-code (code evidence)",
|
|
259
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"path": "api-specs/openapi.yaml",
|
|
263
|
+
"action": "omit",
|
|
264
|
+
"reason": "The package serves no HTTP routes and does not receive webhook deliveries. It is a client of the Webex REST API webhooks resource; its published surface is the npm export described by webhooks-public-sdk.",
|
|
265
|
+
"decided_by": "claude-code (code evidence)",
|
|
266
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"path": "SECURITY.md",
|
|
270
|
+
"action": "omit",
|
|
271
|
+
"reason": "No package-level security policy exists. The workspace owns security policy, and a per-package copy would duplicate it; the package's trust boundaries are described under Security architecture in docs/architecture.md.",
|
|
272
|
+
"decided_by": "claude-code (code evidence)",
|
|
273
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"path": "CONTRIBUTING.md",
|
|
277
|
+
"action": "omit",
|
|
278
|
+
"reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
|
|
279
|
+
"decided_by": "claude-code (code evidence)",
|
|
280
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"path": "CHANGELOG.md",
|
|
284
|
+
"action": "omit",
|
|
285
|
+
"reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
|
|
286
|
+
"decided_by": "claude-code (code evidence)",
|
|
287
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"path": "CTO_CHECKLIST.yml",
|
|
291
|
+
"action": "omit",
|
|
292
|
+
"reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
|
|
293
|
+
"decided_by": "claude-code (code evidence)",
|
|
294
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
298
|
+
"action": "omit",
|
|
299
|
+
"reason": "Omitted together with CTO_CHECKLIST.yml.",
|
|
300
|
+
"decided_by": "claude-code (code evidence)",
|
|
301
|
+
"decided_at": "2026-11-13T02:25:00Z"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"template_roots": {
|
|
305
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
306
|
+
},
|
|
307
|
+
"contract_index_path": "docs/architecture.md",
|
|
308
|
+
"repo_skills_root": ".sdd/skills",
|
|
309
|
+
"monorepo_package": {
|
|
310
|
+
"package_path": "packages/@webex/plugin-webhooks",
|
|
311
|
+
"root_manifest_path": "../../../.sdd/manifest.json",
|
|
312
|
+
"templates_root_path": "../../../.sdd/templates/repo-standards"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"tooling": {
|
|
316
|
+
"sdlc_skills": {
|
|
317
|
+
"source_ref": "repo-annotation@2.3.1"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"coverage_ratchet": {
|
|
321
|
+
"enabled": true,
|
|
322
|
+
"waivers": []
|
|
323
|
+
},
|
|
324
|
+
"substrate": {
|
|
325
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
326
|
+
"consumed": [
|
|
327
|
+
"@webex/eslint-config-legacy via .eslintrc.js",
|
|
328
|
+
"@webex/babel-config-legacy via babel.config.js",
|
|
329
|
+
"@webex/jest-config-legacy via jest.config.js (no unit spec uses it)",
|
|
330
|
+
"@webex/legacy-tools build and test runner via package.json",
|
|
331
|
+
"package README.md (context only)",
|
|
332
|
+
"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)"
|
|
333
|
+
],
|
|
334
|
+
"compliance_tier": "baseline"
|
|
335
|
+
},
|
|
336
|
+
"section_profiles": {
|
|
337
|
+
"repo": {
|
|
338
|
+
"owns_datastore": false,
|
|
339
|
+
"holds_client_state": false,
|
|
340
|
+
"components_interact": true,
|
|
341
|
+
"domain_data_across_components": true,
|
|
342
|
+
"caches_data": false,
|
|
343
|
+
"observability_convention": false,
|
|
344
|
+
"deploys_to_infra": false,
|
|
345
|
+
"shared_base_libs": true,
|
|
346
|
+
"is_monorepo": false,
|
|
347
|
+
"multi_platform": false,
|
|
348
|
+
"published_package": true,
|
|
349
|
+
"embedded_in_host": false,
|
|
350
|
+
"cross_repo_deps_material": true,
|
|
351
|
+
"security_arch_warranted": true,
|
|
352
|
+
"exposes_commands_or_artifacts": true
|
|
353
|
+
},
|
|
354
|
+
"resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
|
|
355
|
+
"resolved_at": "2026-11-13T02:25:00Z"
|
|
356
|
+
}
|
|
357
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
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:40:15Z
|
|
7
|
+
validation_status: pass
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
Package-scoped SDD entry for `@webex/plugin-webhooks`, the public `webhooks` plugin of the SDK (it
|
|
13
|
+
creates, reads, lists, deletes, and updates Webex webhook registrations through the Webex REST API).
|
|
14
|
+
This file orients agents. The monorepo root `AGENTS.md` governs workspace-wide setup.
|
|
15
|
+
|
|
16
|
+
## Working Method
|
|
17
|
+
|
|
18
|
+
- Read the relevant package files before editing. Do not edit blind.
|
|
19
|
+
- Understand the task and affected surfaces before writing code.
|
|
20
|
+
- Prefer focused edits over rewriting whole files.
|
|
21
|
+
- Do not invent commands, paths, exports, method names, or request paths. Verify them from this
|
|
22
|
+
package's source.
|
|
23
|
+
- Test or validate before declaring done.
|
|
24
|
+
- Keep output concise. If something is uncertain, say so instead of guessing.
|
|
25
|
+
|
|
26
|
+
## Canonical Repository Documentation
|
|
27
|
+
|
|
28
|
+
Before changing code or documentation, start with:
|
|
29
|
+
|
|
30
|
+
- [`docs/index.md`](docs/index.md) for package documentation navigation;
|
|
31
|
+
- [`docs/architecture.md`](docs/architecture.md) for package boundaries and interactions;
|
|
32
|
+
- [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
|
|
33
|
+
- the module specification at [`src/docs/README.md`](src/docs/README.md) (Webhooks plugin); and
|
|
34
|
+
- [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
|
|
35
|
+
|
|
36
|
+
Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
|
|
37
|
+
publishes a public SDK surface, so its contract artifact is `package.json` plus the `src/index.js`
|
|
38
|
+
entry. It serves no HTTP and receives no webhook deliveries, so no OpenAPI applies.
|
|
39
|
+
|
|
40
|
+
## 1. Commands (Run First)
|
|
41
|
+
|
|
42
|
+
Use only documented commands. Do not invent alternatives when a command is missing. Run `yarn` and the package scripts below from the workspace root, as
|
|
43
|
+
`yarn workspace @webex/plugin-webhooks <script>`. Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling
|
|
44
|
+
`dist/`) is owned by the workspace root; see [Prebuilding](../../../CONTRIBUTING.md#prebuilding).
|
|
45
|
+
|
|
46
|
+
| Task | Command |
|
|
47
|
+
| ---------------------- | ------- |
|
|
48
|
+
| Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command) |
|
|
49
|
+
| Start dev environment | N/A — library package with no start script in `package.json` |
|
|
50
|
+
| Run tests | N/A — the package has no unit tests and no `test:unit` script (see below) |
|
|
51
|
+
| Run linters | `yarn workspace @webex/plugin-webhooks test:style` |
|
|
52
|
+
| Build/release artifact | `yarn workspace @webex/plugin-webhooks build:src` (JavaScript and source maps to `dist/`) |
|
|
53
|
+
| Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
|
|
54
|
+
|
|
55
|
+
`yarn workspace @webex/plugin-webhooks build` runs the `build:src` script and produces the same output; the package emits no type
|
|
56
|
+
declarations.
|
|
57
|
+
|
|
58
|
+
Do not use the aggregate `test` script: after lint it calls `test:unit`, which this package does not
|
|
59
|
+
define, and exits 1. `yarn workspace @webex/plugin-webhooks test:browser` runs `test/integration/spec` through karma but verifies
|
|
60
|
+
nothing today; see [Getting started](docs/getting-started.md#tests) for its state.
|
|
61
|
+
|
|
62
|
+
If a required command is unknown, stop and ask for the exact command.
|
|
63
|
+
|
|
64
|
+
## 2. Agent Persona and Scope
|
|
65
|
+
|
|
66
|
+
You are the Webex JS SDK engineering assistant for `@webex/plugin-webhooks`.
|
|
67
|
+
|
|
68
|
+
Primary outcomes:
|
|
69
|
+
|
|
70
|
+
- Deliver production-safe changes with build and lint passing, and unit tests for what you change.
|
|
71
|
+
- Preserve existing behavior unless a change request explicitly requires a behavior change.
|
|
72
|
+
- Keep docs and configuration aligned with code changes.
|
|
73
|
+
|
|
74
|
+
Definition of done:
|
|
75
|
+
|
|
76
|
+
1. Requested change is implemented.
|
|
77
|
+
2. Build and lint pass locally, and any unit cases you added pass.
|
|
78
|
+
3. Updated docs cover new behavior, including the owning module spec.
|
|
79
|
+
4. PR summary includes risks and rollback notes.
|
|
80
|
+
|
|
81
|
+
## 3. Repository Knowledge
|
|
82
|
+
|
|
83
|
+
### Tech Stack
|
|
84
|
+
|
|
85
|
+
| Area | Tooling | Version |
|
|
86
|
+
| ---------------- | ------- | ------- |
|
|
87
|
+
| Language runtime | node; JavaScript sources | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=18`; the workspace root `package.json` `engines.node` reads `18.x` |
|
|
88
|
+
| Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
|
|
89
|
+
| Test framework | None runs: no unit spec; the integration spec uses mocha-style `describe.skip` with sinon, `@webex/test-helper-chai`, and `@webex/test-helper-test-users` under karma | — |
|
|
90
|
+
| Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
|
|
91
|
+
|
|
92
|
+
### Project Map
|
|
93
|
+
|
|
94
|
+
- `src/index.js`: registers public plugin `webhooks` and exports `Webhooks` (default only).
|
|
95
|
+
- `src/webhooks.js`: `Webhooks` — `create`, `get`, `list`, `remove`, and `update`, and the
|
|
96
|
+
`WebhookObject` typedef.
|
|
97
|
+
- `test/integration/spec/webhooks.js`: live-service cases inside `describe.skip`; no script runs them.
|
|
98
|
+
- `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
|
|
99
|
+
- `dist/`: generated build output. Never edit by hand.
|
|
100
|
+
- `README.md`: retained npm page, context only; it shows only `get(id)`; see
|
|
101
|
+
[ADR-0001](docs/adr/0001-retain-product-readme.md).
|
|
102
|
+
- Spec for every file under `src/`: `src/docs/README.md`.
|
|
103
|
+
|
|
104
|
+
### Critical Constraints
|
|
105
|
+
|
|
106
|
+
- The plugin is `webex.webhooks`; `webex` and `webex-node` register it by import, and applications
|
|
107
|
+
call it (`MOD-001` in the module spec).
|
|
108
|
+
- Every request goes to catalog service `hydra` through `this.request`: `POST webhooks`,
|
|
109
|
+
`GET webhooks/<id>`, `GET webhooks/`, `DELETE webhooks/<id>`, and `PUT webhooks/<id>` (`MOD-002` to
|
|
110
|
+
`MOD-006`).
|
|
111
|
+
- `get` and `remove` accept a webhook object or an id; `list` resolves a webex-core `Page`; `remove`
|
|
112
|
+
resolves `undefined` on a 204.
|
|
113
|
+
- The plugin passes the caller's object and options through unchanged and resolves what the service
|
|
114
|
+
returns. It only registers webhooks: the service delivers events to `targetUrl` directly, and this
|
|
115
|
+
package neither receives nor verifies them.
|
|
116
|
+
|
|
117
|
+
## 4. Testing Workflow
|
|
118
|
+
|
|
119
|
+
Run checks in this order, from the workspace root:
|
|
120
|
+
|
|
121
|
+
1. `yarn workspace @webex/plugin-webhooks build:src`
|
|
122
|
+
2. `yarn workspace @webex/plugin-webhooks test:style`
|
|
123
|
+
|
|
124
|
+
Testing rules:
|
|
125
|
+
|
|
126
|
+
- The package has no unit tests. When you change behavior, add a `test/unit/spec` file and the
|
|
127
|
+
matching `test:unit` script (`webex-legacy-tools test --unit --runner jest`, as sibling legacy
|
|
128
|
+
packages define it) in the same change; the integration spec is skipped and does not run, so it does
|
|
129
|
+
not count as coverage.
|
|
130
|
+
- Use `@webex/test-helper-mock-webex` with a sinon stub for `webex.request`, and assert with
|
|
131
|
+
`@webex/test-helper-chai`.
|
|
132
|
+
- Use `assert.calledOnceWithExactly` for the request options, and parametrize when more than three
|
|
133
|
+
cases are alike, such as the five request shapes.
|
|
134
|
+
- Cover failure paths and edge cases, not only happy paths: a rejected request, a body with `items`,
|
|
135
|
+
a 204 and a non-204 `remove`, `get` and `remove` with an object and with an id, an empty-string id,
|
|
136
|
+
and a missing argument.
|
|
137
|
+
- Do not remove tests to make CI pass.
|
|
138
|
+
|
|
139
|
+
No coverage gate applies to this package; do not infer one.
|
|
140
|
+
|
|
141
|
+
## 5. Code Style and Patterns
|
|
142
|
+
|
|
143
|
+
Coding expectations:
|
|
144
|
+
|
|
145
|
+
- Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
|
|
146
|
+
`root: true` and extends the legacy config.
|
|
147
|
+
- Prefer small functions over large procedural blocks.
|
|
148
|
+
- Make error handling explicit; keep today's failure behavior (see Ask First) unless the change
|
|
149
|
+
request covers it.
|
|
150
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
151
|
+
|
|
152
|
+
Pattern example:
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
Preferred:
|
|
156
|
+
- Send webhook requests with this.request({service: 'hydra', resource: 'webhooks/...'}).
|
|
157
|
+
- Accept a webhook object or an id where get and remove do today.
|
|
158
|
+
- Resolve list results as new Page(res, this.webex).
|
|
159
|
+
|
|
160
|
+
Avoid:
|
|
161
|
+
- Building Hydra URLs by hand or calling the service outside this.request.
|
|
162
|
+
- Caching webhook records or reshaping the service response.
|
|
163
|
+
- Treating README.md as the full usage reference.
|
|
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 applications that call `webex.webhooks`, and on the `webex` and `webex-node`
|
|
179
|
+
bundles.
|
|
180
|
+
- Rollback approach.
|
|
181
|
+
|
|
182
|
+
## 7. Boundaries and Escalation
|
|
183
|
+
|
|
184
|
+
### Always
|
|
185
|
+
|
|
186
|
+
- Prefer existing patterns over introducing new architecture.
|
|
187
|
+
- Keep changes minimal for the requested scope.
|
|
188
|
+
- Call out assumptions and unknowns explicitly.
|
|
189
|
+
- Update the owning module spec in the same change that alters observable behavior.
|
|
190
|
+
|
|
191
|
+
### Ask First
|
|
192
|
+
|
|
193
|
+
- Adding or removing dependencies or peer dependencies.
|
|
194
|
+
- Renaming or removing a method or the registered plugin name.
|
|
195
|
+
- Adding a method or an SDK event, or anything that receives or verifies webhook deliveries.
|
|
196
|
+
- Changing a request path, the `items` handling of `get`, the `Page` result of `list`, or the 204
|
|
197
|
+
handling of `remove`.
|
|
198
|
+
- Adding argument checks, including checks on `targetUrl` or `filter`, that would turn today's
|
|
199
|
+
synchronous `TypeError` or service error into a different failure.
|
|
200
|
+
|
|
201
|
+
### Never
|
|
202
|
+
|
|
203
|
+
- Edit `dist/` by hand.
|
|
204
|
+
- Commit secrets, tokens, or credentials, including in test fixtures.
|
|
205
|
+
- Log webhook bodies, target URLs, filters, or webhook ids through `webex.logger`.
|
|
206
|
+
- Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
|
|
207
|
+
templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
|
|
208
|
+
`.sdd/manifest.json` refers to them through `layout.monorepo_package`.
|
package/dist/webhooks.js
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
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-13T02:20:00Z
|
|
7
|
+
status: accepted
|
|
8
|
+
---
|
|
9
|
+
<!-- sdd-generated-metadata
|
|
10
|
+
doc_kind: standing-doc
|
|
11
|
+
generated_from: adr@0.3.0
|
|
12
|
+
generated_by: claude-code
|
|
13
|
+
approved_by: rarajes2@cisco.com
|
|
14
|
+
updated_at: 2026-11-13T02:40:15Z
|
|
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-13 |
|
|
24
|
+
| Deciders | rarajes2@cisco.com (bootstrap questionnaire) |
|
|
25
|
+
| Supersedes | N/A |
|
|
26
|
+
| Superseded by | N/A |
|
|
27
|
+
|
|
28
|
+
## Context
|
|
29
|
+
|
|
30
|
+
Onboarding found one existing document, `README.md`. It is the npm page: a one-line description
|
|
31
|
+
("Webhooks plugin for the Cisco Webex JS SDK."), install commands, a pointer to the developer portal,
|
|
32
|
+
and a Usage block. No other intent, design, or AI-authored spec exists in this package.
|
|
33
|
+
|
|
34
|
+
The README is accurate where it speaks, but it covers little and repeats itself:
|
|
35
|
+
|
|
36
|
+
| README content | Code |
|
|
37
|
+
| -------------- | ---- |
|
|
38
|
+
| The Install and Usage sections each appear twice | — |
|
|
39
|
+
| Usage shows `webex.webhooks.get(id)` resolving a webhook | Matches `get` in `src/webhooks.js` |
|
|
40
|
+
| Nothing about `create`, `list`, `remove`, or `update`, about scopes, or about receiving deliveries | All five methods are in `src/webhooks.js`; no scope is named in the package; nothing in the package receives deliveries |
|
|
41
|
+
|
|
42
|
+
## Decision
|
|
43
|
+
|
|
44
|
+
Keep `README.md` unchanged. Do not migrate it into the module specification. Record
|
|
45
|
+
`spec_source_policy.mode` as `keep-separate` with `migrated_source_disposition` `retain`, and route
|
|
46
|
+
`README.md` in `spec_sources` as `reference-only` and `context-only`.
|
|
47
|
+
|
|
48
|
+
The canonical behavior is `src/` plus `test/`. The module specification follows code.
|
|
49
|
+
|
|
50
|
+
## Why
|
|
51
|
+
|
|
52
|
+
The README is the npm-facing page. Filling it in is a product-doc change, not a requirement of making
|
|
53
|
+
the package SDD-ready, and the other onboarded packages in this workspace kept their READMEs the same
|
|
54
|
+
way. Its one behavioral claim, the `get(id)` example, is already in the module specification, so
|
|
55
|
+
nothing is lost by not migrating it.
|
|
56
|
+
|
|
57
|
+
## Alternatives considered
|
|
58
|
+
|
|
59
|
+
| Alternative | Why it was not selected |
|
|
60
|
+
| ----------- | ----------------------- |
|
|
61
|
+
| Migrate the README into `src/docs/README.md` and delete it | Its behavior is already specified; deletion was not requested |
|
|
62
|
+
| Reconcile the README with the module specification in place | Reconciling would only carry one example; the developer chose `keep-separate` |
|
|
63
|
+
| Rewrite the README during onboarding | Onboarding writes the SDD tree only and does not edit `README.md` |
|
|
64
|
+
|
|
65
|
+
## Consequences
|
|
66
|
+
|
|
67
|
+
**Positive:**
|
|
68
|
+
|
|
69
|
+
- The npm page stays stable for consumers.
|
|
70
|
+
- The module specification is the single behavioral reference.
|
|
71
|
+
|
|
72
|
+
**Negative / tradeoffs:**
|
|
73
|
+
|
|
74
|
+
- Agents must not treat `README.md` as complete; it shows only `get(id)`.
|
|
75
|
+
- The repeated Install and Usage sections remain until a maintainer makes a separate product-doc change.
|
|
76
|
+
|
|
77
|
+
## Constraint on future changes
|
|
78
|
+
|
|
79
|
+
Do not delete `README.md` as part of spec maintenance. If its usage text changes, keep the module
|
|
80
|
+
specification aligned with code rather than with the README.
|
|
81
|
+
|
|
82
|
+
## Follow-up
|
|
83
|
+
|
|
84
|
+
- [ ] A maintainer may remove the repeated sections and add examples for `create`, `list`, `remove`,
|
|
85
|
+
and `update` in a separate product-doc change.
|
|
86
|
+
|
|
87
|
+
## Revisit when
|
|
88
|
+
|
|
89
|
+
- A maintainer rewrites the README to document more than `get(id)`.
|
|
90
|
+
|
|
91
|
+
## References
|
|
92
|
+
|
|
93
|
+
- `README.md`
|
|
94
|
+
- `src/index.js`
|
|
95
|
+
- `src/webhooks.js`
|
|
96
|
+
- `.sdd/manifest.json` `spec_source_policy`
|