@webex/internal-plugin-support 3.12.0 → 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/dist/support.js CHANGED
@@ -7,6 +7,7 @@ _Object$defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
10
+ var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
10
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
11
12
  var _webexCore = require("@webex/webex-core");
12
13
  var _lodash = require("lodash");
@@ -62,10 +63,10 @@ var Support = _webexCore.WebexPlugin.extend({
62
63
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
63
64
  var metadataArray = this._constructFileMetadata(metadata);
64
65
  var type = options.type;
66
+ var diff = type !== undefined ? type === 'diff' : this.config.incrementalLogs;
65
67
 
66
68
  // this is really testing that Ampersand is fully ready. once it's ready, these exist
67
69
  if (!logs && this.webex.logger.sdkBuffer && this.webex.logger.clientBuffer && this.webex.logger.buffer) {
68
- var diff = type !== undefined ? type === 'diff' : this.config.incrementalLogs;
69
70
  logs = this.webex.logger.formatLogs({
70
71
  diff: diff
71
72
  });
@@ -123,7 +124,16 @@ var Support = _webexCore.WebexPlugin.extend({
123
124
  })
124
125
  }
125
126
  });
126
- return _context.abrupt("return", _this.webex.upload(uploadOptions));
127
+ return _context.abrupt("return", _this.webex.upload(uploadOptions).then(function (res) {
128
+ _this.webex.logger.updateLastSubmittedIndex();
129
+ return res;
130
+ }).catch(function (err) {
131
+ if (diff && _this.config.retryFailedLogUploadsAtNextInterval) {
132
+ _this.webex.logger.error('Support: Failed to upload logs. Will retry to upload these logs at next interval', err);
133
+ _this.webex.logger.resetBufferToLastSuccessfulUpload();
134
+ }
135
+ return _promise.default.reject(err);
136
+ }));
127
137
  case 1:
128
138
  case "end":
129
139
  return _context.stop();
@@ -183,7 +193,7 @@ var Support = _webexCore.WebexPlugin.extend({
183
193
  }
184
194
  return metadataArray;
185
195
  },
186
- version: "3.12.0"
196
+ version: "3.13.0-next.10"
187
197
  });
188
198
  var _default = exports.default = Support;
189
199
  //# sourceMappingURL=support.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_webexCore","require","_lodash","_uuid","_interopRequireDefault","Support","WebexPlugin","extend","namespace","getFeedbackUrl","options","request","method","api","resource","body","defaults","appVersion","config","appType","feedbackId","uuid","v4","languageCode","then","res","url","getSupportUrl","webex","qs","submitLogs","metadata","logs","_this","arguments","length","undefined","metadataArray","_constructFileMetadata","type","logger","sdkBuffer","clientBuffer","buffer","diff","incrementalLogs","formatLogs","filename","locusId","callStart","concat","sessionId","userId","credentials","getUserToken","catch","getClientToken","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","token","headers","initalOpts","finalOpts","uploadOptions","wrap","_context","prev","next","authorization","toString","service","file","shouldAttemptReauth","phases","initialize","upload","$uri","session","tempURL","finalize","$body","logFilename","data","internal","device","abrupt","stop","_x","apply","map","key","value","filter","entry","Boolean","push","support","orgId","version","_default","exports"],"sources":["support.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {defaults} from 'lodash';\nimport uuid from 'uuid';\n\nconst Support = WebexPlugin.extend({\n namespace: 'Support',\n\n getFeedbackUrl(options) {\n options = options || {};\n\n return this.request({\n method: 'POST',\n api: 'conversation',\n resource: 'users/deskFeedbackUrl',\n body: defaults(options, {\n appVersion: this.config.appVersion,\n appType: this.config.appType,\n feedbackId: options.feedbackId || uuid.v4(),\n languageCode: this.config.languageCode,\n }),\n }).then((res) => res.body.url);\n },\n\n getSupportUrl() {\n return this.webex\n .request({\n method: 'GET',\n api: 'conversation',\n resource: 'users/deskSupportUrl',\n qs: {\n languageCode: this.config.languageCode,\n },\n })\n .then((res) => res.body.url);\n },\n\n /**\n * Sends logs to the backend\n *\n * @param {Object} metadata metadata about the logs\n * @param {Array} logs logs to send, if undefined, SDK's logs will be sent\n * @param {Object} options additional options\n * @param {string} options.type 'full' or 'diff', if not specified then the config.incrementalLogs value is used to determine the type,\n * this option only applies if logs parameter is undefined\n * 'diff' means that only the logs since the last log upload will be sent\n * 'full' means that all the logs from internal buffers will be sent\n * @returns {Promise}\n */\n submitLogs(metadata, logs, options = {}) {\n const metadataArray = this._constructFileMetadata(metadata);\n\n const {type} = options;\n\n // this is really testing that Ampersand is fully ready. once it's ready, these exist\n if (\n !logs &&\n this.webex.logger.sdkBuffer &&\n this.webex.logger.clientBuffer &&\n this.webex.logger.buffer\n ) {\n const diff = type !== undefined ? type === 'diff' : this.config.incrementalLogs;\n\n logs = this.webex.logger.formatLogs({diff});\n }\n\n let filename;\n\n if (metadata.locusId && metadata.callStart) {\n filename = `${metadata.locusId}_${metadata.callStart}.txt`;\n } else {\n filename = `${this.webex.sessionId}.txt`;\n }\n\n let userId;\n\n return this.webex.credentials\n .getUserToken()\n .catch(() => this.webex.credentials.getClientToken())\n .then(async (token) => {\n const headers = {authorization: token.toString()};\n\n const initalOpts = {\n service: 'clientLogs',\n resource: 'logs/urls',\n };\n\n const finalOpts = {\n service: 'clientLogs',\n resource: 'logs/meta',\n };\n\n const uploadOptions = defaults(initalOpts, {\n file: logs,\n shouldAttemptReauth: false,\n headers,\n phases: {\n initialize: {\n body: {\n file: filename,\n },\n },\n upload: {\n $uri: (session) => session.tempURL,\n },\n finalize: defaults(finalOpts, {\n $body: (session) => {\n userId = session.userId;\n\n return {\n filename: session.logFilename,\n data: metadataArray,\n userId: this.webex.internal.device.userId || session.userId,\n };\n },\n }),\n },\n });\n\n return this.webex.upload(uploadOptions);\n })\n .then((body) => {\n if (userId && !body.userId) {\n body.userId = userId;\n }\n\n return body;\n });\n },\n\n /**\n * Constructs an array of key-value pairs for log upload.\n * @param {*} metadata\n * @returns {array}\n */\n _constructFileMetadata(metadata) {\n const metadataArray = [\n 'locusId',\n 'appVersion',\n 'callStart',\n 'feedbackId',\n 'correlationId',\n 'broadworksCorrelationInfo',\n 'meetingId',\n 'surveySessionId',\n 'productAreaTag',\n 'issueTypeTag',\n 'issueDescTag',\n 'locussessionid',\n 'autoupload',\n ]\n .map((key) => {\n if (metadata[key]) {\n return {\n key,\n value: metadata[key],\n };\n }\n\n return null;\n })\n .filter((entry) => Boolean(entry));\n\n if (this.webex.sessionId) {\n metadataArray.push({\n key: 'trackingId',\n value: this.webex.sessionId,\n });\n }\n\n if (this.webex.internal.support.config.appVersion) {\n metadataArray.push({\n key: 'appVersion',\n value: this.webex.internal.support.config.appVersion,\n });\n }\n\n if (this.webex.internal.device.userId) {\n metadataArray.push({\n key: 'userId',\n value: this.webex.internal.device.userId,\n });\n }\n\n if (this.webex.internal.device.orgId) {\n metadataArray.push({\n key: 'orgId',\n value: this.webex.internal.device.orgId,\n });\n }\n\n return metadataArray;\n },\n});\n\nexport default Support;\n"],"mappings":";;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AANA;AACA;AACA;;AAMA,IAAMI,OAAO,GAAGC,sBAAW,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAE,SAAS;EAEpBC,cAAc,WAAdA,cAAcA,CAACC,OAAO,EAAE;IACtBA,OAAO,GAAGA,OAAO,IAAI,CAAC,CAAC;IAEvB,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAE,cAAc;MACnBC,QAAQ,EAAE,uBAAuB;MACjCC,IAAI,EAAE,IAAAC,gBAAQ,EAACN,OAAO,EAAE;QACtBO,UAAU,EAAE,IAAI,CAACC,MAAM,CAACD,UAAU;QAClCE,OAAO,EAAE,IAAI,CAACD,MAAM,CAACC,OAAO;QAC5BC,UAAU,EAAEV,OA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CAAC8D,IAAI,CAAC;QACjBL,GAAG,EAAE,OAAO;QACZC,KAAK,EAAE,IAAI,CAACnE,KAAK,CAAC2D,QAAQ,CAACC,MAAM,CAACa;MACpC,CAAC,CAAC;IACJ;IAEA,OAAOhE,aAAa;EACtB,CAAC;EAAAiE,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA7C,OAAA,GAEYtD,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["_webexCore","require","_lodash","_uuid","_interopRequireDefault","Support","WebexPlugin","extend","namespace","getFeedbackUrl","options","request","method","api","resource","body","defaults","appVersion","config","appType","feedbackId","uuid","v4","languageCode","then","res","url","getSupportUrl","webex","qs","submitLogs","metadata","logs","_this","arguments","length","undefined","metadataArray","_constructFileMetadata","type","diff","incrementalLogs","logger","sdkBuffer","clientBuffer","buffer","formatLogs","filename","locusId","callStart","concat","sessionId","userId","credentials","getUserToken","catch","getClientToken","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","token","headers","initalOpts","finalOpts","uploadOptions","wrap","_context","prev","next","authorization","toString","service","file","shouldAttemptReauth","phases","initialize","upload","$uri","session","tempURL","finalize","$body","logFilename","data","internal","device","abrupt","updateLastSubmittedIndex","err","retryFailedLogUploadsAtNextInterval","error","resetBufferToLastSuccessfulUpload","_promise","reject","stop","_x","apply","map","key","value","filter","entry","Boolean","push","support","orgId","version","_default","exports"],"sources":["support.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {defaults} from 'lodash';\nimport uuid from 'uuid';\n\nconst Support = WebexPlugin.extend({\n namespace: 'Support',\n\n getFeedbackUrl(options) {\n options = options || {};\n\n return this.request({\n method: 'POST',\n api: 'conversation',\n resource: 'users/deskFeedbackUrl',\n body: defaults(options, {\n appVersion: this.config.appVersion,\n appType: this.config.appType,\n feedbackId: options.feedbackId || uuid.v4(),\n languageCode: this.config.languageCode,\n }),\n }).then((res) => res.body.url);\n },\n\n getSupportUrl() {\n return this.webex\n .request({\n method: 'GET',\n api: 'conversation',\n resource: 'users/deskSupportUrl',\n qs: {\n languageCode: this.config.languageCode,\n },\n })\n .then((res) => res.body.url);\n },\n\n /**\n * Sends logs to the backend\n *\n * @param {Object} metadata metadata about the logs\n * @param {Array} logs logs to send, if undefined, SDK's logs will be sent\n * @param {Object} options additional options\n * @param {string} options.type 'full' or 'diff', if not specified then the config.incrementalLogs value is used to determine the type,\n * this option only applies if logs parameter is undefined\n * 'diff' means that only the logs since the last log upload will be sent\n * 'full' means that all the logs from internal buffers will be sent\n * @returns {Promise}\n */\n submitLogs(metadata, logs, options = {}) {\n const metadataArray = this._constructFileMetadata(metadata);\n\n const {type} = options;\n const diff = type !== undefined ? type === 'diff' : this.config.incrementalLogs;\n\n // this is really testing that Ampersand is fully ready. once it's ready, these exist\n if (\n !logs &&\n this.webex.logger.sdkBuffer &&\n this.webex.logger.clientBuffer &&\n this.webex.logger.buffer\n ) {\n logs = this.webex.logger.formatLogs({diff});\n }\n\n let filename;\n\n if (metadata.locusId && metadata.callStart) {\n filename = `${metadata.locusId}_${metadata.callStart}.txt`;\n } else {\n filename = `${this.webex.sessionId}.txt`;\n }\n\n let userId;\n\n return this.webex.credentials\n .getUserToken()\n .catch(() => this.webex.credentials.getClientToken())\n .then(async (token) => {\n const headers = {authorization: token.toString()};\n\n const initalOpts = {\n service: 'clientLogs',\n resource: 'logs/urls',\n };\n\n const finalOpts = {\n service: 'clientLogs',\n resource: 'logs/meta',\n };\n\n const uploadOptions = defaults(initalOpts, {\n file: logs,\n shouldAttemptReauth: false,\n headers,\n phases: {\n initialize: {\n body: {\n file: filename,\n },\n },\n upload: {\n $uri: (session) => session.tempURL,\n },\n finalize: defaults(finalOpts, {\n $body: (session) => {\n userId = session.userId;\n\n return {\n filename: session.logFilename,\n data: metadataArray,\n userId: this.webex.internal.device.userId || session.userId,\n };\n },\n }),\n },\n });\n\n return this.webex\n .upload(uploadOptions)\n .then((res) => {\n this.webex.logger.updateLastSubmittedIndex();\n\n return res;\n })\n .catch((err) => {\n if (diff && this.config.retryFailedLogUploadsAtNextInterval) {\n this.webex.logger.error(\n 'Support: Failed to upload logs. Will retry to upload these logs at next interval',\n err\n );\n\n this.webex.logger.resetBufferToLastSuccessfulUpload();\n }\n\n return Promise.reject(err);\n });\n })\n .then((body) => {\n if (userId && !body.userId) {\n body.userId = userId;\n }\n\n return body;\n });\n },\n\n /**\n * Constructs an array of key-value pairs for log upload.\n * @param {*} metadata\n * @returns {array}\n */\n _constructFileMetadata(metadata) {\n const metadataArray = [\n 'locusId',\n 'appVersion',\n 'callStart',\n 'feedbackId',\n 'correlationId',\n 'broadworksCorrelationInfo',\n 'meetingId',\n 'surveySessionId',\n 'productAreaTag',\n 'issueTypeTag',\n 'issueDescTag',\n 'locussessionid',\n 'autoupload',\n ]\n .map((key) => {\n if (metadata[key]) {\n return {\n key,\n value: metadata[key],\n };\n }\n\n return null;\n })\n .filter((entry) => Boolean(entry));\n\n if (this.webex.sessionId) {\n metadataArray.push({\n key: 'trackingId',\n value: this.webex.sessionId,\n });\n }\n\n if (this.webex.internal.support.config.appVersion) {\n metadataArray.push({\n key: 'appVersion',\n value: this.webex.internal.support.config.appVersion,\n });\n }\n\n if (this.webex.internal.device.userId) {\n metadataArray.push({\n key: 'userId',\n value: this.webex.internal.device.userId,\n });\n }\n\n if (this.webex.internal.device.orgId) {\n metadataArray.push({\n key: 'orgId',\n value: this.webex.internal.device.orgId,\n });\n }\n\n return metadataArray;\n },\n});\n\nexport default Support;\n"],"mappings":";;;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AANA;AACA;AACA;;AAMA,IAAMI,OAAO,GAAGC,sBAAW,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAE,SAAS;EAEpBC,cAAc,WAAd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AC,CAAC,CACDE,MAAM,CAAC,UAACC,KAAK;MAAA,OAAKC,OAAO,CAACD,KAAK,CAAC;IAAA,EAAC;IAEpC,IAAI,IAAI,CAAC5E,KAAK,CAACuB,SAAS,EAAE;MACxBd,aAAa,CAACqE,IAAI,CAAC;QACjBL,GAAG,EAAE,YAAY;QACjBC,KAAK,EAAE,IAAI,CAAC1E,KAAK,CAACuB;MACpB,CAAC,CAAC;IACJ;IAEA,IAAI,IAAI,CAACvB,KAAK,CAAC2D,QAAQ,CAACoB,OAAO,CAACzF,MAAM,CAACD,UAAU,EAAE;MACjDoB,aAAa,CAACqE,IAAI,CAAC;QACjBL,GAAG,EAAE,YAAY;QACjBC,KAAK,EAAE,IAAI,CAAC1E,KAAK,CAAC2D,QAAQ,CAACoB,OAAO,CAACzF,MAAM,CAACD;MAC5C,CAAC,CAAC;IACJ;IAEA,IAAI,IAAI,CAACW,KAAK,CAAC2D,QAAQ,CAACC,MAAM,CAACpC,MAAM,EAAE;MACrCf,aAAa,CAACqE,IAAI,CAAC;QACjBL,GAAG,EAAE,QAAQ;QACbC,KAAK,EAAE,IAAI,CAAC1E,KAAK,CAAC2D,QAAQ,CAACC,MAAM,CAACpC;MACpC,CAAC,CAAC;IACJ;IAEA,IAAI,IAAI,CAACxB,KAAK,CAAC2D,QAAQ,CAACC,MAAM,CAACoB,KAAK,EAAE;MACpCvE,aAAa,CAACqE,IAAI,CAAC;QACjBL,GAAG,EAAE,OAAO;QACZC,KAAK,EAAE,IAAI,CAAC1E,KAAK,CAAC2D,QAAQ,CAACC,MAAM,CAACoB;MACpC,CAAC,CAAC;IACJ;IAEA,OAAOvE,aAAa;EACtB,CAAC;EAAAwE,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApD,OAAA,GAEYtD,OAAO","ignoreList":[]}
@@ -0,0 +1,97 @@
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-12T11:54:25Z
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-12T12:27:40Z
15
+ validation_status: pass-with-warnings
16
+ -->
17
+
18
+ # ADR-0001 - Retain the product README
19
+
20
+ | Field | Value |
21
+ | ------------- | ----- |
22
+ | Status | Accepted |
23
+ | Decision date | 2026-11-12 |
24
+ | Deciders | rarajes2@cisco.com (bootstrap questionnaire) |
25
+ | Supersedes | N/A |
26
+ | Superseded by | N/A |
27
+
28
+ ## Context
29
+
30
+ Onboarding found one existing document, `README.md`. It is the npm page: a one-line description
31
+ ("Plugin for Support-related endpoints"), an internal-plugin notice, an install command, and a Usage
32
+ block. No other intent, design, or AI-authored spec exists in this package.
33
+
34
+ The README documents no behavior that the code has:
35
+
36
+ | README content | Code |
37
+ | -------------- | ---- |
38
+ | Usage ends with the placeholder member `webex.internal.support.WHATEVER` | The plugin exposes `getFeedbackUrl`, `getSupportUrl`, and `submitLogs` (`src/support.js`) |
39
+ | No method, option, or result is described | `submitLogs` takes metadata, optional logs, and a `type` of `full` or `diff`, and resolves the upload result (`src/support.js`) |
40
+ | Nothing about configuration | Importing the package sets `config.support` defaults and pre-discovery service URLs (`src/config.js`) |
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. It holds no behavioral claim to preserve, so nothing is lost by not migrating it.
55
+
56
+ ## Alternatives considered
57
+
58
+ | Alternative | Why it was not selected |
59
+ | ----------- | ----------------------- |
60
+ | Migrate the README into `src/docs/README.md` and delete it | It carries no behavior to migrate; deletion was not requested |
61
+ | Reconcile the README with the module specification in place | Reconciling would only preserve placeholder wording; the developer chose `keep-separate` |
62
+ | Rewrite the README during onboarding | Onboarding writes the SDD tree only and does not edit `README.md` |
63
+
64
+ ## Consequences
65
+
66
+ **Positive:**
67
+
68
+ - The npm page stays stable for consumers.
69
+ - The module specification is the single behavioral reference.
70
+
71
+ **Negative / tradeoffs:**
72
+
73
+ - Agents must not treat `README.md` as a usage reference; its Usage block names a member that does not
74
+ exist.
75
+ - The placeholder README remains 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 replace the README Usage placeholder with real `submitLogs` and desk URL
85
+ examples in a separate product-doc change.
86
+
87
+ ## Revisit when
88
+
89
+ - A maintainer rewrites the README to document `submitLogs`, `getFeedbackUrl`, and `getSupportUrl`.
90
+
91
+ ## References
92
+
93
+ - `README.md`
94
+ - `src/index.js`
95
+ - `src/config.js`
96
+ - `src/support.js`
97
+ - `.sdd/manifest.json` `spec_source_policy`
@@ -0,0 +1,25 @@
1
+ <!-- sdd-generated-metadata
2
+ doc_kind: standing-doc
3
+ generated_from: adr-index@0.3.0
4
+ generated_by: claude-code
5
+ approved_by: rarajes2@cisco.com
6
+ updated_at: 2026-11-12T12:27:40Z
7
+ validation_status: pass-with-warnings
8
+ -->
9
+
10
+ # Architectural decision records
11
+
12
+ Numbered, append-only records of structural decisions affecting this package and its documentation.
13
+ Add a concrete ADR (for example, `0042-cache-policy.md`) when a decision is non-obvious, hard to
14
+ reverse, or worth explaining to a future contributor. Do not edit an accepted decision in place when
15
+ its outcome changes; supersede it with a new ADR and link both records.
16
+
17
+ ## Index
18
+
19
+ - [ADR-0001 - Retain the product README](0001-retain-product-readme.md) — accepted 2026-11-12
20
+
21
+ Add new entries as ADRs are accepted. Keep this list in numeric order.
22
+
23
+ Each ADR should state its context, decision, alternatives, consequences, and the condition that would
24
+ cause the team to revisit it. Record the deciders, any superseded decision, and the constraint future
25
+ changes must preserve.
@@ -0,0 +1,260 @@
1
+ ---
2
+ type: Architecture
3
+ title: '@webex/internal-plugin-support architecture'
4
+ description: Package-wide boundaries, resources, interactions, dependencies, and cross-cutting architecture.
5
+ tags: [architecture]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: architecture@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-11-12T12:27:40Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # @webex/internal-plugin-support architecture
17
+
18
+ Canonical architecture for this package. Flow behavior lives in the
19
+ [Support plugin specification](../src/docs/README.md). This page owns package boundaries, the plugin
20
+ registration, the contract index, and how the package meets the rest of the SDK.
21
+
22
+ Related context: [specification registry](specs/README.md) ·
23
+ [package agent instructions](../AGENTS.md)
24
+
25
+ ## Applicability
26
+
27
+ | Condition ID | Status | Evidence or reason | Owned section |
28
+ | ------------------------------------ | ---------- | ------------------ | ------------- |
29
+ | `repo.owns_datastore` | N/A | No database, file store, or migration in `src/support.js` | Repository data and schema |
30
+ | `repo.holds_client_state` | Applicable | `src/support.js` commits or rolls back the logger's diff index; defaults in `src/config.js` | Client state model |
31
+ | `repo.components_interact` | Applicable | `src/support.js` drives the logger, credentials, upload, and device plugins | Dependency and interaction topology |
32
+ | `repo.domain_data_across_components` | Applicable | Log text and its metadata pass between the logger, this package, and the client logs service (`src/support.js`) | Object and data ownership |
33
+ | `repo.caches_data` | N/A | `src/support.js` keeps no cache | Caching catalog |
34
+ | `repo.observability_convention` | Applicable | One error line through webex.logger with the Support: prefix in `src/support.js` | Observability patterns |
35
+ | `repo.deploys_to_infra` | N/A | Library published to npm (`package.json`). No service runtime | Runtime and infrastructure |
36
+ | `repo.shared_base_libs` | Applicable | Extends WebexPlugin, uses webex.upload and the credentials plugin, and the legacy build, lint, and test stack (`babel.config.js`, `jest.config.js`, `.eslintrc.js`) | Shared and base libraries |
37
+ | `repo.is_monorepo` | N/A | This SDD root is one package. The workspace around it is out of scope | Package map and inter-package dependencies |
38
+ | `repo.multi_platform` | N/A | `src/support.js` uses no platform-specific API; `process` declares only {browser: true} | Platform matrix |
39
+ | `repo.published_package` | Applicable | `package.json` name is @webex/internal-plugin-support and deploy:npm publishes it | Release and versioning |
40
+ | `repo.embedded_in_host` | N/A | No host theme or embed API in `src/support.js` | Host integration and theming |
41
+ | `repo.exposes_commands_or_artifacts` | Applicable | build:src in `package.json` writes dist | Commands and generated artifacts |
42
+ | `repo.cross_repo_deps_material` | Applicable | Behavior depends on the client logs and conversation services (`src/support.js`) | Cross-repository topology |
43
+ | `repo.security_arch_warranted` | Applicable | Log text and identity metadata leave the client under a user or client token, and the file body goes to a pre-signed URL (`src/support.js`) | Security architecture |
44
+
45
+ ## Design overview
46
+
47
+ `@webex/internal-plugin-support` is a published JavaScript library with one module. Importing it
48
+ registers the device plugin and then `Support` as the internal plugin `support`, reached as
49
+ `webex.internal.support`. Inside this repository `@webex/calling`, `@webex/contact-center`, and
50
+ `@webex/plugin-meetings` call its `submitLogs`, and the `webex`, `webex-node`, `@webex/webex-server`,
51
+ `@webex/recipe-private-web-client`, and `@webex/contact-center` packages load it.
52
+
53
+ The plugin talks to two services. On the conversation service it fetches the desk feedback and desk
54
+ support URLs. On the client logs service, catalog name `clientLogs`, it uploads log text in the three
55
+ phases that `webex.upload` runs: it asks for an upload session, the file goes to the URL the session
56
+ returns, and a metadata list that tags the file with the call, meeting, feedback, tracking, user, and
57
+ organization ids follows. The log text normally comes from the SDK logger, either all of it or only
58
+ what is new since the last upload; this package commits or rolls back the logger's position.
59
+
60
+ The package serves no routes and persists nothing itself.
61
+
62
+ ## Resource inventory and responsibilities
63
+
64
+ | Resource | Kind | Responsibility | Owner | Source | Detailed specification |
65
+ | -------- | ---- | -------------- | ----- | ------ | ---------------------- |
66
+ | Support plugin | package (one module) | Registration and config defaults, desk feedback and support URLs, log upload with metadata, diff index commit and rollback | @webex/web-sdk | `src` | [`src/docs/README.md`](../src/docs/README.md) |
67
+
68
+ ## Interaction and execution flows
69
+
70
+ Representative end-to-end flow: the calling SDK uploads the logs written since its last upload.
71
+
72
+ ```mermaid
73
+ flowchart LR
74
+ Client[calling SDK] -->|submitLogs type diff| Plugin[webex.internal.support]
75
+ Plugin -->|formatLogs diff| Logger[webex.logger]
76
+ Plugin -->|getUserToken or getClientToken| Cred[webex.credentials]
77
+ Plugin -->|upload phases| Upload[webex.upload]
78
+ Upload -->|logs/urls, PUT tempURL, logs/meta| Svc[client logs service]
79
+ Plugin -->|commit or roll back the index| Logger
80
+ Plugin -->|result with trackingid| Client
81
+ ```
82
+
83
+ | From | To | Interaction or transport | Purpose | Failure or compatibility behavior |
84
+ | ---- | -- | ------------------------ | ------- | --------------------------------- |
85
+ | Client | `webex.internal.support` | In-process calls | Log upload; desk URLs | Rejections propagate |
86
+ | `Support` | `webex.logger` | In-process calls | Read log text; commit or roll back the diff index | Not read until its buffers exist |
87
+ | `Support` | Credentials | In-process calls | Authorization for the upload | User token, then client token |
88
+ | `Support` | Client logs service | `webex.upload`, HTTPS | Upload session, file, metadata | Upload phase retried by webex-core; other failures reject |
89
+ | `Support` | Conversation service | HTTPS through `webex.request` | Desk feedback and support URLs | No retry here |
90
+
91
+ ## Dependency topology
92
+
93
+ | Dependency | Type | Used by | Purpose | Version, failure, or fallback policy |
94
+ | ---------- | ---- | ------- | ------- | ------------------------------------ |
95
+ | `@webex/webex-core` | Internal | `src/index.js`, `src/support.js` | Registration, plugin base, `webex.request`, `webex.upload`, credentials, `sessionId` | `workspace:*` in `package.json` |
96
+ | `@webex/internal-plugin-device` | Internal | `src/index.js`, `src/support.js` | Registration side effect; `userId` and `orgId` | `workspace:*` |
97
+ | `@webex/plugin-logger` | Internal, not declared | `src/support.js` | `webex.logger` buffers and index calls | Provided by the host |
98
+ | `lodash` | External | `src/support.js` | `defaults` | `^4.17.21` in `package.json` |
99
+ | `uuid` | External | `src/support.js` | Feedback id | `^3.3.2` in `package.json` |
100
+ | `@webex/internal-plugin-search` and the `@webex/test-helper-*` packages | Internal, declared under dependencies | Integration spec only | Test setup | `workspace:*`; not used by `src/` |
101
+ | Client logs and conversation services | External service | `src/support.js` | Log upload; desk URLs | Resolved through the service catalog |
102
+
103
+ No import cycle exists: neither webex-core nor the device plugin imports this package.
104
+
105
+ ## Public and consumer surfaces
106
+
107
+ | Surface | Type | Owner | Consumers | Compatibility policy | Source |
108
+ | ------- | ---- | ----- | --------- | -------------------- | ------ |
109
+ | `support-internal-sdk` — package @webex/internal-plugin-support, `webex.internal.support`, `submitLogs`, `getFeedbackUrl`, `getSupportUrl`, and the config defaults | SDK, published to npm, internal | Support plugin | First-party clients; `@webex/calling`, `@webex/contact-center`, `@webex/plugin-meetings`, and the packages that register it | The README states that internal plugins do not strictly follow semantic versioning; no deprecation rule is declared | `package.json`, `src/index.js`, `src/support.js` |
110
+
111
+ The upload phase bodies, the metadata list, and the desk URL requests are protocols this package
112
+ speaks with other services, described under *Protocol and wire format* in the
113
+ [module specification](../src/docs/README.md#protocol-and-wire-format). The other contracts this
114
+ package requires are registered in `.sdd/manifest.json` `contract_catalog`.
115
+
116
+ ## Client state model
117
+
118
+ | State or slice | Owner | Transition triggers | Persistence or reset boundary |
119
+ | -------------- | ----- | ------------------- | ----------------------------- |
120
+ | Logger diff indexes | `@webex/plugin-logger`, moved by `Support` | `formatLogs({diff: true})`, then a commit or rollback by `submitLogs` | In memory with the logger |
121
+ | `config.support` | webex-core config | Host config at construction | SDK instance lifetime |
122
+
123
+ Full detail is in the module specification's *Client state model* and *State machine*.
124
+
125
+ ## Cross-cutting architecture
126
+
127
+ ### Security
128
+
129
+ - Trust boundaries and identity flow: see [Security architecture](#security-architecture).
130
+ - Sensitive surfaces and data classes: log text, which can hold any SDK or client log line, and the
131
+ metadata ids (locus, meeting, correlation, user, and organization).
132
+ - Encryption and secret boundaries: see [Security architecture](#security-architecture).
133
+
134
+ ### Observability and operations
135
+
136
+ - Logging and correlation: see [Observability patterns](#observability-patterns).
137
+ - Metrics, traces, and audit signals: see [Observability patterns](#observability-patterns).
138
+ - Ownership and operational entry points: `.github/CODEOWNERS` at the workspace root has no line for
139
+ this package, so its default rule assigns it to `@webex/web-sdk`. No dashboards or runbooks are
140
+ recorded in this package.
141
+
142
+ ### Quality attributes
143
+
144
+ - Compatibility: clients rely on the registered name `support`, the `submitLogs` argument order and
145
+ `type` values, the metadata key names, and the resolved result fields `url`, `userId`, and
146
+ `trackingid`.
147
+ - Footprint: three source files; runtime imports are webex-core, the device plugin, lodash, and uuid.
148
+ - Test confidence: 43 unit cases cover the log choice, the commit and rollback, and the metadata list;
149
+ the desk URL methods and the registration have no test. No coverage threshold is enforced.
150
+
151
+ ## Dependency and interaction topology
152
+
153
+ ```mermaid
154
+ flowchart LR
155
+ Index[src/index.js] -->|registerInternalPlugin support| Core[webex-core]
156
+ Index -->|import| Device[internal-plugin-device]
157
+ Index --> Config[src/config.js]
158
+ Index --> Plugin[src/support.js]
159
+ Plugin -->|extends WebexPlugin, request, upload, credentials| Core
160
+ Plugin -.->|webex.logger, not imported| Logger[plugin-logger]
161
+ Plugin -.->|userId, orgId| Device
162
+ ```
163
+
164
+ | From | To | Kind | Purpose | Ordering or failure boundary |
165
+ | ---- | -- | ---- | ------- | ---------------------------- |
166
+ | `src/index.js` | webex-core | Call at import | Register `support` | First registration wins |
167
+ | `src/support.js` | `webex.logger` | Property reads and calls, no import | Log text and index moves | The host must provide the logger |
168
+ | `src/support.js` | credentials, then `webex.upload` | Calls | Authorize and upload | Token before upload |
169
+ | `src/support.js` | `webex.internal.device` | Property reads | Identity metadata | Missing values are left out |
170
+
171
+ ## Object and data ownership
172
+
173
+ | Object or state | System of record | May write | May read | Movement or lifecycle |
174
+ | --------------- | ---------------- | --------- | -------- | --------------------- |
175
+ | Log buffers and indexes | `@webex/plugin-logger` | The logger; this package moves the indexes | This package | In memory; read per upload |
176
+ | Uploaded log file and metadata | Client logs service | This package, per upload | The service | Sent per call; not stored here |
177
+ | Desk feedback and support URLs | Conversation service | — | This package, then the caller | Returned per call |
178
+ | Device `userId` and `orgId` | Device plugin | The device plugin | This package | Read per upload |
179
+
180
+ ## Observability patterns
181
+
182
+ | Signal | Convention or required fields | Propagation or naming rule | Primary evidence |
183
+ | ------- | ----------------------------- | -------------------------- | ---------------- |
184
+ | Logs | One `webex.logger.error` line, `Support: Failed to upload logs. Will retry to upload these logs at next interval`, with the error object, only for a failed diff upload with the retry config | The uploaded metadata carries `trackingId` (`webex.sessionId`) | `src/support.js` |
185
+ | Metrics | None; the calling and contact-center callers emit their own upload metrics | — | `src/support.js` |
186
+ | Traces | None | — | `src/support.js` |
187
+ | Audit | None | — | `src/support.js` |
188
+
189
+ ## Shared and base libraries
190
+
191
+ | Library | Inherited responsibility | Consumers | Version floor | Compatibility rule |
192
+ | ------- | ------------------------ | --------- | ------------- | ------------------ |
193
+ | `@webex/webex-core` `WebexPlugin` | `webex`, `config`, `logger`, `request` | `Support` | `workspace:*` | Keep the registered name `support` |
194
+ | `@webex/webex-core` `upload` | Three-phase upload, size limit, upload-phase retry | `submitLogs` | `workspace:*` | Keep the `$uri` and `$body` phase keys |
195
+ | `@webex/babel-config-legacy`, `@webex/eslint-config-legacy`, `@webex/jest-config-legacy`, `@webex/legacy-tools` | Build, lint, and test stack through one-line config files | Package tooling | `workspace:*` | Do not fork the config locally |
196
+
197
+ ## Release and versioning
198
+
199
+ | Artifact | Publish target | Versioning rule | Deprecation window | Changelog or migration obligation |
200
+ | -------- | -------------- | --------------- | ------------------ | --------------------------------- |
201
+ | @webex/internal-plugin-support | npm through `deploy:npm` | Internal plugin; the README says semantic versioning is not strictly followed | None declared | None declared in the package; the workspace owns changelog generation |
202
+
203
+ ## Commands and generated artifacts
204
+
205
+ | Command or artifact | Owner | Inputs | Output or side effect | Compatibility boundary |
206
+ | ------------------- | ----- | ------ | --------------------- | ---------------------- |
207
+ | `yarn workspace @webex/internal-plugin-support build:src` | Package scripts | `src` | Writes `dist/` (JavaScript and source maps) through `webex-legacy-tools` | `dist/` is generated and never edited by hand |
208
+ | `yarn workspace @webex/internal-plugin-support build` | Package scripts | `src` | Runs `build:src` | Same output |
209
+ | `yarn workspace @webex/internal-plugin-support test:unit` | Package scripts | `test/unit/spec`, `dist/` | Jest run | Run `build:src` first |
210
+ | `yarn workspace @webex/internal-plugin-support test:style` | Package scripts | `src` | ESLint run | The shared config ignores `docs/**` and `*.md` |
211
+
212
+ ## Cross-repository topology
213
+
214
+ | Repository or external system | Relationship | Exchanged contract or artifact | Owner | Sequencing constraint |
215
+ | ----------------------------- | ------------- | ------------------------------ | ----- | --------------------- |
216
+ | `@webex/webex-core` (workspace sibling; module, credentials, interceptors, and services specs consulted) | Consumes | `registerInternalPlugin`, `WebexPlugin`, `upload`, credentials, auth and service interceptors | @webex/web-sdk | Credentials before the upload |
217
+ | `@webex/plugin-logger` (workspace sibling; module spec consulted) | Consumes | Buffers, `formatLogs`, index calls | @webex/web-sdk | Buffers must exist before a logger read |
218
+ | `@webex/internal-plugin-device` (workspace sibling; spec consulted, code used) | Consumes | `userId`, `orgId` | @webex/web-sdk | Device registered before identity is tagged |
219
+ | `@webex/calling`, `@webex/contact-center`, `@webex/plugin-meetings` (workspace siblings) | Consumed by | `submitLogs` | @webex/web-sdk | None |
220
+ | `webex`, `webex-node`, `@webex/webex-server`, `@webex/recipe-private-web-client` (workspace siblings) | Consumed by | The plugin registration | @webex/web-sdk | None |
221
+ | Client logs and conversation services | Consumes | Upload sessions, files, and metadata; desk URLs | Not recorded in this repository | Initialize, upload, finalize |
222
+
223
+ ## Security architecture
224
+
225
+ ```mermaid
226
+ flowchart LR
227
+ Client[Client] -->|metadata, optional log text| Plugin[Support]
228
+ Plugin -->|read log text| Logger[webex.logger]
229
+ Plugin -->|user token, else client token| Svc[client logs service]
230
+ Svc -->|pre-signed tempURL| Plugin
231
+ Plugin -->|log text, no SDK authorization| Store[tempURL storage]
232
+ Plugin -->|metadata with user and org ids| Svc
233
+ ```
234
+
235
+ - This package holds no credential. It asks webex-core for a user token, or a client token when that
236
+ fails, and sets it as the `authorization` header of the session and metadata requests
237
+ (`MOD-006` in the module spec).
238
+ - The file itself is sent to the pre-signed `tempURL` without SDK authorization or credentials, as
239
+ `webex.upload` sets for its upload phase.
240
+ - Log text is sent as the logger formats it; this package does not filter or redact it. The metadata
241
+ adds the device user and organization ids. The logging rule is under
242
+ [Observability patterns](#observability-patterns).
243
+
244
+ ## Domain language
245
+
246
+ | Term | Repository-specific meaning | Authoritative source |
247
+ | ---- | --------------------------- | -------------------- |
248
+ | clientLogs | The catalog name of the client logs service that receives uploads | `src/support.js` |
249
+ | Diff upload | An upload of only the log entries written since the logger's next index, selected by `type: 'diff'` or `incrementalLogs` | `src/support.js` |
250
+ | Full upload | An upload of every buffered log entry | `src/support.js` |
251
+ | File metadata | The `{key, value}` list sent with the finalize phase | `src/support.js` |
252
+ | Desk feedback and support URLs | Links the conversation service returns for the feedback form and the support page | `src/support.js` |
253
+
254
+ ## References and maintenance
255
+
256
+ - Decisions: [adr/](adr/index.md)
257
+ - Instantiated specifications and routing: [specs/README.md](specs/README.md)
258
+ - Repository rules and patterns: [package agent instructions](../AGENTS.md)
259
+ - Update this document in the same change that alters package boundaries, resource ownership,
260
+ cross-resource interaction, or cross-cutting architecture.
@@ -0,0 +1,122 @@
1
+ ---
2
+ type: Getting Started
3
+ title: Getting started
4
+ description: Local setup, build, run, and test routing for @webex/internal-plugin-support.
5
+ tags: [onboarding]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: getting-started@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-11-12T12:27:40Z
13
+ validation_status: pass-with-warnings
14
+ -->
15
+
16
+ # Getting started
17
+
18
+ Onboarding for **@webex/internal-plugin-support**, a package inside the `webex-js-sdk` Yarn workspace.
19
+ Run every command from the workspace root.
20
+
21
+ ## Prerequisites
22
+
23
+ | Tool or access | Version or requirement |
24
+ | -------------- | ---------------------- |
25
+ | Node.js | Use 22.14: the workspace root `AGENTS.md` requires it and the workspace `.nvmrc` selects `lts/jod` (Node 22). This package's `engines` accepts `>=18`. The workspace root `package.json` `engines.node` reads `18.x`, which conflicts with the other pins; the build, unit tests, and lint pass on 22.14 |
26
+ | Yarn | `yarn@3.4.1` (`packageManager` in the workspace root `package.json`) |
27
+ | Registry or account access | N/A for building, unit tests, and linting |
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ yarn
33
+ ```
34
+
35
+ The workspace `deploy.yml` workflow installs with the same command.
36
+
37
+ Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the workspace root; see
38
+ [Prebuilding](../../../../CONTRIBUTING.md#prebuilding).
39
+
40
+ ## Build
41
+
42
+ ```bash
43
+ yarn workspace @webex/internal-plugin-support build:src
44
+ ```
45
+
46
+ `build:src` writes JavaScript and source maps for the three source files to `dist/` through
47
+ `webex-legacy-tools`. `dist/` is ignored by Git. The `build` script runs `yarn build:src`; the package
48
+ emits no type declarations.
49
+
50
+ ```bash
51
+ yarn workspace @webex/internal-plugin-support build
52
+ ```
53
+
54
+ ## Run
55
+
56
+ N/A — this is a library with no start script. Importing `@webex/internal-plugin-support` registers
57
+ `webex.internal.support`; `submitLogs` reads `webex.logger`, which the host must provide.
58
+
59
+ ## Tests
60
+
61
+ ```bash
62
+ yarn workspace @webex/internal-plugin-support test:unit
63
+ ```
64
+
65
+ ```bash
66
+ yarn workspace @webex/internal-plugin-support test:style
67
+ ```
68
+
69
+ | Tier | Command | Test location | Framework | External dependencies |
70
+ | ---- | ------- | ------------- | --------- | --------------------- |
71
+ | Unit | `yarn workspace @webex/internal-plugin-support test:unit` | `test/unit/spec` | jest through `webex-legacy-tools` and `@webex/jest-config-legacy` | None; `@webex/test-helper-mock-webex` and sinon stubs |
72
+
73
+ Run `build:src` before `test:unit`. The unit spec imports `@webex/internal-plugin-support` by name, which
74
+ resolves to `dist/index.js`, so a stale build tests old code.
75
+
76
+ `test:style` lints `src/` with eslint through `@webex/eslint-config-legacy`.
77
+
78
+ - Coverage or quality gate: none; the package defines no coverage script, and the legacy Jest
79
+ configuration it re-exports sets no threshold
80
+ - Enforcement source: N/A
81
+ - Test environment or QA dependencies: none for unit tests and lint
82
+
83
+ `test:browser` runs `webex-legacy-tools test --integration --runner karma` over
84
+ `test/integration/spec/support.js`, which needs a live test user and the client logs service. On
85
+ 2026-11-12 under Node 22.14 the karma bundle failed to parse `isbot` (an ES module in the workspace
86
+ `node_modules`), so the run reported "0 tests completed" and still exited zero. It is not listed in the
87
+ table above because it verifies nothing today.
88
+
89
+ `yarn workspace @webex/internal-plugin-support test` chains style, unit, integration, and browser runs,
90
+ and stops at `test:integration`, which is not defined in this package's `package.json`; the mocha
91
+ script for the integration spec is named `test:integratio:broken`.
92
+
93
+ ## Configuration and secrets
94
+
95
+ - Required configuration: none. Defaults live under `webex.config.support` (`appType`, `appVersion`,
96
+ `languageCode`, `incrementalLogs`); a host that wants a failed incremental upload resent sets
97
+ `config.support.retryFailedLogUploadsAtNextInterval`, which has no default (`src/config.js`)
98
+ - Environment overrides: `ATLAS_SERVICE_URL` and `CLIENT_LOGS_SERVICE_URL` are read at import into
99
+ `config.device.preDiscoveryServices`; no workspace code reads those entries
100
+ - Secret source: N/A; the package holds no secret and takes tokens from `webex.credentials`
101
+ - Package or artifact access: N/A
102
+ - Required neighboring packages: `@webex/webex-core` and `@webex/internal-plugin-device` resolve
103
+ through the workspace; the host must also provide `webex.logger` (`@webex/plugin-logger`)
104
+ - Platform, simulator, device, or SDK setup: none
105
+ - Never commit credentials or copy production secrets into a local config.
106
+
107
+ ## First-run verification
108
+
109
+ 1. Run `yarn workspace @webex/internal-plugin-support build:src` and check that it reports
110
+ `Built internal-plugin-support: 3 files`.
111
+ 2. Run `yarn workspace @webex/internal-plugin-support test:unit`.
112
+ 3. Run `yarn workspace @webex/internal-plugin-support test:style`.
113
+
114
+ Expected result: all three commands exit zero. The unit run reports 43 passing tests. `test:style`
115
+ prints warnings but no errors: two `require-jsdoc` warnings in `src/support.js` and "File ignored" for
116
+ `src/docs/README.md`.
117
+
118
+ ## Next steps
119
+
120
+ - [Package architecture](architecture.md)
121
+ - [Specification registry](specs/README.md)
122
+ - [Documentation index](index.md)