@webex/internal-plugin-call-ai-summary 3.12.0-next.59 → 3.12.0-next.60
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 +381 -0
- package/.sdd/manifest.json +408 -0
- package/AGENTS.md +218 -0
- package/README.md +17 -12
- package/dist/ai-summary.js +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/manual-integration-test.js +3 -1
- package/dist/manual-integration-test.js.map +1 -1
- package/dist/manual-pragya-api-test.js +3 -1
- package/dist/manual-pragya-api-test.js.map +1 -1
- package/dist/types.js.map +1 -1
- package/docs/adr/0001-flatten-container-response-and-prefer-single-request-summary.md +115 -0
- package/docs/adr/index.md +26 -0
- package/docs/architecture.md +287 -0
- package/docs/getting-started.md +147 -0
- package/docs/index.md +53 -0
- package/docs/specs/README.md +83 -0
- package/package.json +2 -2
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +372 -0
- package/src/index.ts +1 -1
- package/src/manual-integration-test.js +3 -1
- package/src/manual-pragya-api-test.js +3 -1
- package/src/types.ts +12 -12
- package/test/unit/fixture/responses.ts +123 -0
- package/test/unit/spec/ai-summary.ts +388 -0
- package/ai-docs/AGENTS.md +0 -300
- package/ai-docs/ARCHITECTURE.md +0 -1189
package/dist/ai-summary.js
CHANGED
|
@@ -412,7 +412,7 @@ var AISummary = _webexCore.WebexPlugin.extend({
|
|
|
412
412
|
}
|
|
413
413
|
return new Error("".concat(methodName, " failed: ").concat(error.message || 'Unknown error'));
|
|
414
414
|
},
|
|
415
|
-
version: "3.12.0-next.
|
|
415
|
+
version: "3.12.0-next.60"
|
|
416
416
|
});
|
|
417
417
|
var _default = exports.default = AISummary;
|
|
418
418
|
//# sourceMappingURL=ai-summary.js.map
|
package/dist/index.js
CHANGED
|
@@ -5,12 +5,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequ
|
|
|
5
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _aiSummary.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
8
|
+
exports.default = void 0;
|
|
14
9
|
require("@webex/internal-plugin-encryption");
|
|
15
10
|
var _webexCore = require("@webex/webex-core");
|
|
16
11
|
var _aiSummary = _interopRequireDefault(require("./ai-summary"));
|
|
@@ -22,4 +17,5 @@ var _config = _interopRequireDefault(require("./config"));
|
|
|
22
17
|
(0, _webexCore.registerInternalPlugin)('aisummary', _aiSummary.default, {
|
|
23
18
|
config: _config.default
|
|
24
19
|
});
|
|
20
|
+
var _default = exports.default = _aiSummary.default;
|
|
25
21
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","_webexCore","_aiSummary","_interopRequireDefault","_config","registerInternalPlugin","AISummary","config"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport '@webex/internal-plugin-encryption';\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport AISummary from './ai-summary';\nimport config from './config';\n\nregisterInternalPlugin('aisummary', AISummary, {config});\n\nexport
|
|
1
|
+
{"version":3,"names":["require","_webexCore","_aiSummary","_interopRequireDefault","_config","registerInternalPlugin","AISummary","config","_default","exports","default"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport '@webex/internal-plugin-encryption';\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport AISummary from './ai-summary';\nimport config from './config';\n\nregisterInternalPlugin('aisummary', AISummary, {config});\n\nexport default AISummary;\n"],"mappings":";;;;;;;;AAIAA,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AARA;AACA;AACA;;AAQA,IAAAK,iCAAsB,EAAC,WAAW,EAAEC,kBAAS,EAAE;EAACC,MAAM,EAANA;AAAM,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE1CJ,kBAAS","ignoreList":[]}
|
|
@@ -19,7 +19,9 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/
|
|
|
19
19
|
* WEBEX_TOKEN='<token>' node src/manual-integration-test.js
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
// Standalone Node dev script: it loads the built package by name and uses CommonJS
|
|
23
|
+
// requires, so the module-graph rules below do not apply.
|
|
24
|
+
/* eslint-disable no-console, require-jsdoc, import/no-extraneous-dependencies, @typescript-eslint/no-var-requires */
|
|
23
25
|
|
|
24
26
|
require('@webex/internal-plugin-call-ai-summary');
|
|
25
27
|
var WebexCore = require('@webex/webex-core').default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","WebexCore","default","WEBEX_TOKEN","process","env","CONTAINER_ID","main","_main","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","_container$summaryDat","_container$summaryDat2","webex","pragyaUrl","container","summaryResult","noteStr","shortNoteStr","truncNote","truncShort","truncated","transcriptUrl","_yield$webex$request","transcriptBody","_t","wrap","_context","prev","next","console","log","credentials","access_token","internal","device","register","url","services","get","e","message","aisummary","getContainer","containerId","sent","_stringify","id","objectType","encryptionKeyUrl","summaryUrl","summaryData","getSummary","containerInfo","note","shortNote","length","concat","substring","actionItems","map","item","content","aiGeneratedContent","truncContent","editedContent","feedbackUrl","getTranscriptUrl","request","method","uri","body","_keys","error","exit","stop","catch","err"],"sources":["manual-integration-test.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n *\n * Manual integration test for internal-plugin-call-ai-summary\n * Tests the full flow using the SDK service catalog (WDM):\n * device.register() -> getContainer -> getSummary (with KMS decryption)\n *\n * The SDK resolves `service: 'pragya'` to the correct base URL via the\n * service catalog populated during device registration.\n *\n * Usage:\n * WEBEX_TOKEN='<token>' node src/manual-integration-test.js\n */\n\n/* eslint-disable no-console, require-jsdoc */\n\nrequire('@webex/internal-plugin-call-ai-summary');\n\nconst WebexCore = require('@webex/webex-core').default;\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\nconst WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';\nconst CONTAINER_ID = process.env.CONTAINER_ID || '<PASTE_CONTAINER_ID_HERE>';\n\n// ---------------------------------------------------------------------------\n// Main\n// ---------------------------------------------------------------------------\nasync function main() {\n console.log('=== Step 1: Create WebexCore ===\\n');\n const webex = new WebexCore({\n credentials: {\n access_token: WEBEX_TOKEN,\n },\n });\n\n // Step 2: Register device to populate service catalog\n console.log('=== Step 2: Register device (WDM) ===\\n');\n await webex.internal.device.register();\n console.log('Device registered successfully.');\n console.log('Device URL:', webex.internal.device.url);\n\n // Log the pragya service URL from the service catalog\n try {\n const pragyaUrl = webex.internal.services.get('pragya');\n console.log('Pragya service URL (from catalog):', pragyaUrl);\n } catch (e) {\n console.log('Could not resolve pragya from service catalog:', e.message);\n }\n\n // Step 3: Get container via plugin (uses service: 'pragya' + resource)\n console.log('\\n=== Step 3: getContainer via plugin ===\\n');\n const container = await webex.internal.aisummary.getContainer({\n containerId: CONTAINER_ID,\n });\n console.log(\n 'Container Info:',\n JSON.stringify(\n {\n id: container.id,\n objectType: container.objectType,\n encryptionKeyUrl: container.encryptionKeyUrl,\n summaryUrl: container.summaryData?.summaryUrl,\n transcriptUrl: container.summaryData?.transcriptUrl,\n },\n null,\n 2\n )\n );\n\n // Step 4: Call getSummary via plugin (fetches + decrypts all content)\n console.log('\\n=== Step 4: getSummary via plugin ===\\n');\n const summaryResult = await webex.internal.aisummary.getSummary({\n containerInfo: container,\n });\n\n console.log('=== getSummary return structure ===');\n const noteStr = summaryResult.note || '';\n const shortNoteStr = summaryResult.shortNote || '';\n const truncNote = noteStr.length > 200 ? `${noteStr.substring(0, 200)}...` : noteStr;\n const truncShort =\n shortNoteStr.length > 200 ? `${shortNoteStr.substring(0, 200)}...` : shortNoteStr;\n const truncated = {\n id: summaryResult.id,\n note: truncNote,\n shortNote: truncShort,\n actionItems: (summaryResult.actionItems || []).map((item) => {\n const content = item.aiGeneratedContent || '';\n const truncContent = content.length > 100 ? `${content.substring(0, 100)}...` : content;\n\n return {\n id: item.id,\n aiGeneratedContent: truncContent,\n editedContent: item.editedContent,\n };\n }),\n feedbackUrl: summaryResult.feedbackUrl,\n };\n console.log(JSON.stringify(truncated, null, 2));\n\n // Step 5: Get transcript URL via plugin\n console.log('\\n=== Step 5: getTranscriptUrl via plugin ===\\n');\n const transcriptUrl = webex.internal.aisummary.getTranscriptUrl({\n containerInfo: container,\n });\n console.log('Transcript URL:', transcriptUrl);\n\n // Step 6: Fetch transcript content\n console.log('\\n=== Step 6: Fetch transcript content ===\\n');\n try {\n const {body: transcriptBody} = await webex.request({\n method: 'GET',\n uri: `${transcriptUrl}?fields=id,content`,\n });\n console.log('Transcript response keys:', Object.keys(transcriptBody));\n console.log(JSON.stringify(transcriptBody, null, 2).substring(0, 500));\n } catch (err) {\n console.error('Transcript fetch failed:', err.message);\n }\n\n console.log('\\nDone.');\n process.exit(0);\n}\n\nmain().catch((err) => {\n console.error('FATAL:', err.message || err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEAA,OAAO,CAAC,wCAAwC,CAAC;AAEjD,IAAMC,SAAS,GAAGD,OAAO,CAAC,mBAAmB,CAAC,CAACE,OAAO;;AAEtD;AACA;AACA;AACA,IAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACF,WAAW,IAAI,y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main","_main","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","_container$summaryDat","_container$summaryDat2","webex","pragyaUrl","container","summaryResult","noteStr","shortNoteStr","truncNote","truncShort","truncated","transcriptUrl","_yield$webex$request","transcriptBody","_t","wrap","_context","prev","next","console","log","credentials","access_token","internal","device","register","url","services","get","e","message","aisummary","getContainer","containerId","sent","_stringify","id","objectType","encryptionKeyUrl","summaryUrl","summaryData","getSummary","containerInfo","note","shortNote","length","concat","substring","actionItems","map","item","content","aiGeneratedContent","truncContent","editedContent","feedbackUrl","getTranscriptUrl","request","method","uri","body","_keys","error","exit","stop","catch","err"],"sources":["manual-integration-test.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n *\n * Manual integration test for internal-plugin-call-ai-summary\n * Tests the full flow using the SDK service catalog (WDM):\n * device.register() -> getContainer -> getSummary (with KMS decryption)\n *\n * The SDK resolves `service: 'pragya'` to the correct base URL via the\n * service catalog populated during device registration.\n *\n * Usage:\n * WEBEX_TOKEN='<token>' node src/manual-integration-test.js\n */\n\n// Standalone Node dev script: it loads the built package by name and uses CommonJS\n// requires, so the module-graph rules below do not apply.\n/* eslint-disable no-console, require-jsdoc, import/no-extraneous-dependencies, @typescript-eslint/no-var-requires */\n\nrequire('@webex/internal-plugin-call-ai-summary');\n\nconst WebexCore = require('@webex/webex-core').default;\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\nconst WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';\nconst CONTAINER_ID = process.env.CONTAINER_ID || '<PASTE_CONTAINER_ID_HERE>';\n\n// ---------------------------------------------------------------------------\n// Main\n// ---------------------------------------------------------------------------\nasync function main() {\n console.log('=== Step 1: Create WebexCore ===\\n');\n const webex = new WebexCore({\n credentials: {\n access_token: WEBEX_TOKEN,\n },\n });\n\n // Step 2: Register device to populate service catalog\n console.log('=== Step 2: Register device (WDM) ===\\n');\n await webex.internal.device.register();\n console.log('Device registered successfully.');\n console.log('Device URL:', webex.internal.device.url);\n\n // Log the pragya service URL from the service catalog\n try {\n const pragyaUrl = webex.internal.services.get('pragya');\n console.log('Pragya service URL (from catalog):', pragyaUrl);\n } catch (e) {\n console.log('Could not resolve pragya from service catalog:', e.message);\n }\n\n // Step 3: Get container via plugin (uses service: 'pragya' + resource)\n console.log('\\n=== Step 3: getContainer via plugin ===\\n');\n const container = await webex.internal.aisummary.getContainer({\n containerId: CONTAINER_ID,\n });\n console.log(\n 'Container Info:',\n JSON.stringify(\n {\n id: container.id,\n objectType: container.objectType,\n encryptionKeyUrl: container.encryptionKeyUrl,\n summaryUrl: container.summaryData?.summaryUrl,\n transcriptUrl: container.summaryData?.transcriptUrl,\n },\n null,\n 2\n )\n );\n\n // Step 4: Call getSummary via plugin (fetches + decrypts all content)\n console.log('\\n=== Step 4: getSummary via plugin ===\\n');\n const summaryResult = await webex.internal.aisummary.getSummary({\n containerInfo: container,\n });\n\n console.log('=== getSummary return structure ===');\n const noteStr = summaryResult.note || '';\n const shortNoteStr = summaryResult.shortNote || '';\n const truncNote = noteStr.length > 200 ? `${noteStr.substring(0, 200)}...` : noteStr;\n const truncShort =\n shortNoteStr.length > 200 ? `${shortNoteStr.substring(0, 200)}...` : shortNoteStr;\n const truncated = {\n id: summaryResult.id,\n note: truncNote,\n shortNote: truncShort,\n actionItems: (summaryResult.actionItems || []).map((item) => {\n const content = item.aiGeneratedContent || '';\n const truncContent = content.length > 100 ? `${content.substring(0, 100)}...` : content;\n\n return {\n id: item.id,\n aiGeneratedContent: truncContent,\n editedContent: item.editedContent,\n };\n }),\n feedbackUrl: summaryResult.feedbackUrl,\n };\n console.log(JSON.stringify(truncated, null, 2));\n\n // Step 5: Get transcript URL via plugin\n console.log('\\n=== Step 5: getTranscriptUrl via plugin ===\\n');\n const transcriptUrl = webex.internal.aisummary.getTranscriptUrl({\n containerInfo: container,\n });\n console.log('Transcript URL:', transcriptUrl);\n\n // Step 6: Fetch transcript content\n console.log('\\n=== Step 6: Fetch transcript content ===\\n');\n try {\n const {body: transcriptBody} = await webex.request({\n method: 'GET',\n uri: `${transcriptUrl}?fields=id,content`,\n });\n console.log('Transcript response keys:', Object.keys(transcriptBody));\n console.log(JSON.stringify(transcriptBody, null, 2).substring(0, 500));\n } catch (err) {\n console.error('Transcript fetch failed:', err.message);\n }\n\n console.log('\\nDone.');\n process.exit(0);\n}\n\nmain().catch((err) => {\n console.error('FATAL:', err.message || err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEAA,OAAO,CAAC,wCAAwC,CAAC;AAEjD,IAAMC,SAAS,GAAGD,OAAO,CAAC,mBAAmB,CAAC,CAACE,OAAO;;AAEtD;AACA;AACA;AACA,IAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACF,WAAW,IAAI,yBAAyB;AACxE,IAAMG,YAAY,GAAGF,OAAO,CAACC,GAAG,CAACC,YAAY,IAAI,2BAA2B;;AAE5E;AACA;AACA;AAAA,SACeC,IAAIA,CAAA;EAAA,OAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,MAAA;EAAAA,KAAA,OAAAG,kBAAA,CAAAT,OAAA,eAAAU,YAAA,CAAAV,OAAA,CAAAW,IAAA,CAAnB,SAAAC,QAAA;IAAA,IAAAC,qBAAA,EAAAC,sBAAA;IAAA,IAAAC,KAAA,EAAAC,SAAA,EAAAC,SAAA,EAAAC,aAAA,EAAAC,OAAA,EAAAC,YAAA,EAAAC,SAAA,EAAAC,UAAA,EAAAC,SAAA,EAAAC,aAAA,EAAAC,oBAAA,EAAAC,cAAA,EAAAC,EAAA;IAAA,OAAAjB,YAAA,CAAAV,OAAA,CAAA4B,IAAA,WAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IA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vEG,OAAO,CAAC2C,KAAK,CAAC,0BAA0B,EAAEhD,EAAA,CAAIgB,OAAO,CAAC;QAAC;UAGzDX,OAAO,CAACC,GAAG,CAAC,SAAS,CAAC;UACtB/B,OAAO,CAAC0E,IAAI,CAAC,CAAC,CAAC;QAAC;QAAA;UAAA,OAAA/C,QAAA,CAAAgD,IAAA;MAAA;IAAA,GAAAjE,OAAA;EAAA,CACjB;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDH,IAAI,CAAC,CAAC,CAACyE,KAAK,CAAC,UAACC,GAAG,EAAK;EACpB/C,OAAO,CAAC2C,KAAK,CAAC,QAAQ,EAAEI,GAAG,CAACpC,OAAO,IAAIoC,GAAG,CAAC;EAC3C7E,OAAO,CAAC0E,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -17,7 +17,9 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/
|
|
|
17
17
|
* Or paste your token directly into WEBEX_TOKEN below.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// Standalone Node dev script: it loads the built package by name and uses CommonJS
|
|
21
|
+
// requires, so the module-graph rules below do not apply.
|
|
22
|
+
/* eslint-disable no-console, require-jsdoc, import/no-extraneous-dependencies, @typescript-eslint/no-var-requires */
|
|
21
23
|
|
|
22
24
|
require('@webex/internal-plugin-call-ai-summary');
|
|
23
25
|
var WebexCore = require('@webex/webex-core').default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","WebexCore","default","WEBEX_TOKEN","process","env","CONTAINER_ID","PRAGYA_BASE_URL","main","_main","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","webex","response","container","passed","failed","check","checkExists","checkType","checkMatch","summaryData","summaryDataData","memberships","first","wrap","_context","prev","next","_checkMatch","label","value","regex","test","console","log","concat","_stringify","_checkType","type","actual","_isArray","_typeof2","expected","_checkExists","undefined","_check","error","exit","credentials","access_token","request","method","uri","headers","sent","body","id","objectType","encryptionKeyUrl","kmsResourceObjectUrl","aclUrl","start","end","forkSessionId","callSessionId","ownerUserId","orgId","extensionId","extensionType","data","status","summaryUrl","transcriptUrl","summarizeAfterCall","contentRetention","items","length","roles","stop","catch","err","message"],"sources":["manual-pragya-api-test.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n *\n * Manual test for internal-plugin-call-ai-summary\n *\n * Usage:\n * WEBEX_TOKEN='<your-token>' node manual-test.js\n *\n * Or paste your token directly into WEBEX_TOKEN below.\n */\n\n/* eslint-disable no-console, require-jsdoc */\n\nrequire('@webex/internal-plugin-call-ai-summary');\n\nconst WebexCore = require('@webex/webex-core').default;\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\nconst WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';\nconst CONTAINER_ID = '<PASTE_CONTAINER_ID_HERE>';\nconst PRAGYA_BASE_URL = '<PASTE_PRAGYA_BASE_URL_HERE>';\n\n// ---------------------------------------------------------------------------\n// Main\n// ---------------------------------------------------------------------------\nasync function main() {\n if (WEBEX_TOKEN === '<PASTE_YOUR_TOKEN_HERE>') {\n console.error('ERROR: Set WEBEX_TOKEN env var or paste your token in the script.');\n process.exit(1);\n }\n\n const webex = new WebexCore({\n credentials: {\n access_token: WEBEX_TOKEN,\n },\n });\n\n console.log('--- Fetching container', CONTAINER_ID, '(SDK auth) ---\\n');\n\n const response = await webex.request({\n method: 'GET',\n uri: `${PRAGYA_BASE_URL}/containers/${CONTAINER_ID}`,\n headers: {\n 'content-type': 'application/json',\n },\n });\n\n const container = response.body;\n let passed = 0;\n let failed = 0;\n\n function check(label, actual, expected) {\n if (actual === expected) {\n console.log(` PASS: ${label}`);\n passed += 1;\n } else {\n console.log(\n ` FAIL: ${label} — expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`\n );\n failed += 1;\n }\n }\n\n function checkExists(label, value) {\n if (value !== undefined && value !== null) {\n console.log(` PASS: ${label} exists`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} is missing`);\n failed += 1;\n }\n }\n\n function checkType(label, value, type) {\n const actual = Array.isArray(value) ? 'array' : typeof value;\n const expected = type;\n if (type === 'array' ? Array.isArray(value) : actual === expected) {\n console.log(` PASS: ${label} is ${type}`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} — expected ${type}, got ${actual}`);\n failed += 1;\n }\n }\n\n function checkMatch(label, value, regex) {\n if (regex.test(value)) {\n console.log(` PASS: ${label} matches ${regex}`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} — ${JSON.stringify(value)} does not match ${regex}`);\n failed += 1;\n }\n }\n\n // --- Top-level container ---\n console.log('\\n--- Top-level container ---');\n checkType('container', container, 'object');\n check('container.id', container.id, CONTAINER_ID);\n check('container.objectType', container.objectType, 'callingAIContainer');\n checkExists('container.summaryData', container.summaryData);\n checkExists('container.memberships', container.memberships);\n checkMatch('container.encryptionKeyUrl', container.encryptionKeyUrl, /^kms:\\/\\//);\n checkMatch('container.kmsResourceObjectUrl', container.kmsResourceObjectUrl, /^kms:\\/\\//);\n checkMatch('container.aclUrl', container.aclUrl, /^https?:\\/\\//);\n checkExists('container.start', container.start);\n checkExists('container.end', container.end);\n checkExists('container.forkSessionId', container.forkSessionId);\n checkExists('container.callSessionId', container.callSessionId);\n checkExists('container.ownerUserId', container.ownerUserId);\n checkExists('container.orgId', container.orgId);\n\n // --- summaryData ---\n console.log('\\n--- summaryData ---');\n const {summaryData} = container;\n checkType('summaryData', summaryData, 'object');\n checkExists('summaryData.extensionId', summaryData.extensionId);\n check('summaryData.objectType', summaryData.objectType, 'extension');\n check('summaryData.extensionType', summaryData.extensionType, 'callingAISummary');\n\n // --- summaryData.data ---\n console.log('\\n--- summaryData.data ---');\n const summaryDataData = summaryData.data;\n checkType('summaryData.data', summaryDataData, 'object');\n checkExists('summaryData.data.id', summaryDataData.id);\n check('summaryData.data.objectType', summaryDataData.objectType, 'callingAISummary');\n checkExists('summaryData.data.status', summaryDataData.status);\n checkMatch('summaryData.data.summaryUrl', summaryDataData.summaryUrl, /^https?:\\/\\//);\n checkMatch('summaryData.data.transcriptUrl', summaryDataData.transcriptUrl, /^https?:\\/\\//);\n checkMatch('summaryData.data.aclUrl', summaryDataData.aclUrl, /^https?:\\/\\//);\n checkMatch(\n 'summaryData.data.kmsResourceObjectUrl',\n summaryDataData.kmsResourceObjectUrl,\n /^kms:\\/\\//\n );\n checkType('summaryData.data.summarizeAfterCall', summaryDataData.summarizeAfterCall, 'boolean');\n checkType('summaryData.data.contentRetention', summaryDataData.contentRetention, 'object');\n\n // --- memberships ---\n console.log('\\n--- memberships ---');\n const {memberships} = container;\n checkType('memberships', memberships, 'object');\n checkType('memberships.items', memberships.items, 'array');\n if (memberships.items.length > 0) {\n console.log(` PASS: memberships.items has ${memberships.items.length} member(s)`);\n passed += 1;\n const first = memberships.items[0];\n checkExists('memberships.items[0].id', first.id);\n checkType('memberships.items[0].roles', first.roles, 'array');\n check('memberships.items[0].objectType', first.objectType, 'containerMembership');\n } else {\n console.log(' FAIL: memberships.items is empty');\n failed += 1;\n }\n\n // --- Summary ---\n console.log(`\\n=== ${passed} passed, ${failed} failed ===`);\n process.exit(failed > 0 ? 1 : 0);\n}\n\nmain().catch((err) => {\n console.error('FAILED:', err.message || err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEAA,OAAO,CAAC,wCAAwC,CAAC;AAEjD,IAAMC,SAAS,GAAGD,OAAO,CAAC,mBAAmB,CAAC,CAACE,OAAO;;AAEtD;AACA;AACA;AACA,IAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACF,WAAW,IAAI,yBAAyB;AACxE,IAAMG,YAAY,GAAG,2BAA2B;AAChD,IAAMC,eAAe,GAAG,8BAA8B;;A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AACgD,IAAI,CAAChC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAAC;QAAA;UAAA,OAAAU,QAAA,CAAAqD,IAAA;MAAA;IAAA,GAAApE,OAAA;EAAA,CAClC;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDH,IAAI,CAAC,CAAC,CAAC4E,KAAK,CAAC,UAACC,GAAG,EAAK;EACpB/C,OAAO,CAACa,KAAK,CAAC,SAAS,EAAEkC,GAAG,CAACC,OAAO,IAAID,GAAG,CAAC;EAC5CjF,OAAO,CAACgD,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["require","WebexCore","default","WEBEX_TOKEN","process","env","CONTAINER_ID","PRAGYA_BASE_URL","main","_main","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","webex","response","container","passed","failed","check","checkExists","checkType","checkMatch","summaryData","summaryDataData","memberships","first","wrap","_context","prev","next","_checkMatch","label","value","regex","test","console","log","concat","_stringify","_checkType","type","actual","_isArray","_typeof2","expected","_checkExists","undefined","_check","error","exit","credentials","access_token","request","method","uri","headers","sent","body","id","objectType","encryptionKeyUrl","kmsResourceObjectUrl","aclUrl","start","end","forkSessionId","callSessionId","ownerUserId","orgId","extensionId","extensionType","data","status","summaryUrl","transcriptUrl","summarizeAfterCall","contentRetention","items","length","roles","stop","catch","err","message"],"sources":["manual-pragya-api-test.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n *\n * Manual test for internal-plugin-call-ai-summary\n *\n * Usage:\n * WEBEX_TOKEN='<your-token>' node manual-test.js\n *\n * Or paste your token directly into WEBEX_TOKEN below.\n */\n\n// Standalone Node dev script: it loads the built package by name and uses CommonJS\n// requires, so the module-graph rules below do not apply.\n/* eslint-disable no-console, require-jsdoc, import/no-extraneous-dependencies, @typescript-eslint/no-var-requires */\n\nrequire('@webex/internal-plugin-call-ai-summary');\n\nconst WebexCore = require('@webex/webex-core').default;\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\nconst WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';\nconst CONTAINER_ID = '<PASTE_CONTAINER_ID_HERE>';\nconst PRAGYA_BASE_URL = '<PASTE_PRAGYA_BASE_URL_HERE>';\n\n// ---------------------------------------------------------------------------\n// Main\n// ---------------------------------------------------------------------------\nasync function main() {\n if (WEBEX_TOKEN === '<PASTE_YOUR_TOKEN_HERE>') {\n console.error('ERROR: Set WEBEX_TOKEN env var or paste your token in the script.');\n process.exit(1);\n }\n\n const webex = new WebexCore({\n credentials: {\n access_token: WEBEX_TOKEN,\n },\n });\n\n console.log('--- Fetching container', CONTAINER_ID, '(SDK auth) ---\\n');\n\n const response = await webex.request({\n method: 'GET',\n uri: `${PRAGYA_BASE_URL}/containers/${CONTAINER_ID}`,\n headers: {\n 'content-type': 'application/json',\n },\n });\n\n const container = response.body;\n let passed = 0;\n let failed = 0;\n\n function check(label, actual, expected) {\n if (actual === expected) {\n console.log(` PASS: ${label}`);\n passed += 1;\n } else {\n console.log(\n ` FAIL: ${label} — expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`\n );\n failed += 1;\n }\n }\n\n function checkExists(label, value) {\n if (value !== undefined && value !== null) {\n console.log(` PASS: ${label} exists`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} is missing`);\n failed += 1;\n }\n }\n\n function checkType(label, value, type) {\n const actual = Array.isArray(value) ? 'array' : typeof value;\n const expected = type;\n if (type === 'array' ? Array.isArray(value) : actual === expected) {\n console.log(` PASS: ${label} is ${type}`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} — expected ${type}, got ${actual}`);\n failed += 1;\n }\n }\n\n function checkMatch(label, value, regex) {\n if (regex.test(value)) {\n console.log(` PASS: ${label} matches ${regex}`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} — ${JSON.stringify(value)} does not match ${regex}`);\n failed += 1;\n }\n }\n\n // --- Top-level container ---\n console.log('\\n--- Top-level container ---');\n checkType('container', container, 'object');\n check('container.id', container.id, CONTAINER_ID);\n check('container.objectType', container.objectType, 'callingAIContainer');\n checkExists('container.summaryData', container.summaryData);\n checkExists('container.memberships', container.memberships);\n checkMatch('container.encryptionKeyUrl', container.encryptionKeyUrl, /^kms:\\/\\//);\n checkMatch('container.kmsResourceObjectUrl', container.kmsResourceObjectUrl, /^kms:\\/\\//);\n checkMatch('container.aclUrl', container.aclUrl, /^https?:\\/\\//);\n checkExists('container.start', container.start);\n checkExists('container.end', container.end);\n checkExists('container.forkSessionId', container.forkSessionId);\n checkExists('container.callSessionId', container.callSessionId);\n checkExists('container.ownerUserId', container.ownerUserId);\n checkExists('container.orgId', container.orgId);\n\n // --- summaryData ---\n console.log('\\n--- summaryData ---');\n const {summaryData} = container;\n checkType('summaryData', summaryData, 'object');\n checkExists('summaryData.extensionId', summaryData.extensionId);\n check('summaryData.objectType', summaryData.objectType, 'extension');\n check('summaryData.extensionType', summaryData.extensionType, 'callingAISummary');\n\n // --- summaryData.data ---\n console.log('\\n--- summaryData.data ---');\n const summaryDataData = summaryData.data;\n checkType('summaryData.data', summaryDataData, 'object');\n checkExists('summaryData.data.id', summaryDataData.id);\n check('summaryData.data.objectType', summaryDataData.objectType, 'callingAISummary');\n checkExists('summaryData.data.status', summaryDataData.status);\n checkMatch('summaryData.data.summaryUrl', summaryDataData.summaryUrl, /^https?:\\/\\//);\n checkMatch('summaryData.data.transcriptUrl', summaryDataData.transcriptUrl, /^https?:\\/\\//);\n checkMatch('summaryData.data.aclUrl', summaryDataData.aclUrl, /^https?:\\/\\//);\n checkMatch(\n 'summaryData.data.kmsResourceObjectUrl',\n summaryDataData.kmsResourceObjectUrl,\n /^kms:\\/\\//\n );\n checkType('summaryData.data.summarizeAfterCall', summaryDataData.summarizeAfterCall, 'boolean');\n checkType('summaryData.data.contentRetention', summaryDataData.contentRetention, 'object');\n\n // --- memberships ---\n console.log('\\n--- memberships ---');\n const {memberships} = container;\n checkType('memberships', memberships, 'object');\n checkType('memberships.items', memberships.items, 'array');\n if (memberships.items.length > 0) {\n console.log(` PASS: memberships.items has ${memberships.items.length} member(s)`);\n passed += 1;\n const first = memberships.items[0];\n checkExists('memberships.items[0].id', first.id);\n checkType('memberships.items[0].roles', first.roles, 'array');\n check('memberships.items[0].objectType', first.objectType, 'containerMembership');\n } else {\n console.log(' FAIL: memberships.items is empty');\n failed += 1;\n }\n\n // --- Summary ---\n console.log(`\\n=== ${passed} passed, ${failed} failed ===`);\n process.exit(failed > 0 ? 1 : 0);\n}\n\nmain().catch((err) => {\n console.error('FAILED:', err.message || err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEAA,OAAO,CAAC,wCAAwC,CAAC;AAEjD,IAAMC,SAAS,GAAGD,OAAO,CAAC,mBAAmB,CAAC,CAACE,OAAO;;AAEtD;AACA;AACA;AACA,IAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACF,WAAW,IAAI,yBAAyB;AACxE,IAAMG,YAAY,GAAG,2BAA2B;AAChD,IAAMC,eAAe,GAAG,8BAA8B;;AAEtD;AACA;AACA;AAAA,SACeC,IAAIA,CAAA;EAAA,OAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,MAAA;EAAAA,KAAA,OAAAG,kBAAA,CAAAV,OAAA,eAAAW,YAAA,CAAAX,OAAA,CAAAY,IAAA,CAAnB,SAAAC,QAAA;IAAA,IAAAC,KAAA,EAAAC,QAAA,EAAAC,SAAA,EAAAC,MAAA,EAAAC,MAAA,EA0BWC,KAAK,EAYLC,WAAW,EAUXC,SAAS,EAYTC,UAAU,EAAAC,WAAA,EAAAC,eAAA,EAAAC,WAAA,EAAAC,KAAA;IAAA,OAAAf,YAAA,CAAAX,OAAA,C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|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n */\n\n// --- Pragya Response DTOs ---\n\n/**\n * Summary data URLs from a Pragya container.\n */\nexport interface PragyaSummaryData {\n /** Status of the summary (e.g., \"Active\") */\n status: string;\n /** Full summary URL (AI Bridge) */\n summaryUrl: string;\n /** Transcript URL (AI Bridge) */\n transcriptUrl: string;\n /** Whether summarization runs after call ends */\n summarizeAfterCall: boolean;\n /** Notes-specific URL (may not be present in all API versions) */\n notesUrl?: string;\n /** Action items URL (may not be present in all API versions) */\n actionItemsUrl?: string;\n}\n\n/**\n * Complete Pragya container response.\n */\nexport interface PragyaContainerResponse {\n /** Summary data with content URLs */\n summaryData: PragyaSummaryData;\n /** KMS encryption key URL for decrypting content */\n encryptionKeyUrl: string;\n /** KMS resource object URL */\n kmsResourceObjectUrl: string;\n /** ACL URL for access control */\n aclUrl: string;\n /** Fork session ID */\n forkSessionId: string;\n /** Call session ID */\n callSessionId: string;\n /** Owner user ID */\n ownerUserId: string;\n /** Organization ID */\n orgId: string;\n /** Call start time */\n start: string;\n /** Call end time */\n end: string;\n}\n\n// --- Request DTOs ---\n\n/**\n * Options for resolving a Pragya container.\n */\nexport interface GetContainerOptions {\n /** Pragya container ID (from Janus extensionPayload.callingContainerIds) */\n containerId: string;\n}\n\n/**\n * Options for fetching summary content.\n * Requires the resolved Pragya container info.\n */\nexport interface GetSummaryContentOptions {\n /** The resolved Pragya container response */\n containerInfo: PragyaContainerResponse;\n}\n\n// --- Summary Response DTOs ---\n\n/**\n * Decrypted AI-generated summary content.\n * Contains all three content types returned by the summary API.\n */\nexport interface SummaryContent {\n /** Unique identifier */\n id: string;\n /** Decrypted full note content */\n note: string;\n /** Decrypted short note content */\n shortNote: string;\n /** Decrypted action item snippets */\n actionItems: ActionItemSnippet[];\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n * Decrypted AI-generated notes.\n */\nexport interface SummaryNotes {\n /** Unique identifier */\n id: string;\n /** Decrypted notes content */\n content: string;\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n */\n\n// --- Pragya Response DTOs ---\n\n/**\n * Summary data URLs from a Pragya container.\n */\nexport interface PragyaSummaryData {\n /** Status of the summary (e.g., \"Active\") */\n status: string;\n /** Full summary URL (AI Bridge) */\n summaryUrl: string;\n /** Transcript URL (AI Bridge) */\n transcriptUrl: string;\n /** Whether summarization runs after call ends */\n summarizeAfterCall: boolean;\n /** Notes-specific URL (may not be present in all API versions) */\n notesUrl?: string;\n /** Action items URL (may not be present in all API versions) */\n actionItemsUrl?: string;\n}\n\n/**\n * Complete Pragya container response.\n */\nexport interface PragyaContainerResponse {\n /** Summary data with content URLs */\n summaryData: PragyaSummaryData;\n /** KMS encryption key URL for decrypting content */\n encryptionKeyUrl: string;\n /** KMS resource object URL */\n kmsResourceObjectUrl: string;\n /** ACL URL for access control */\n aclUrl: string;\n /** Fork session ID */\n forkSessionId: string;\n /** Call session ID */\n callSessionId: string;\n /** Owner user ID */\n ownerUserId: string;\n /** Organization ID */\n orgId: string;\n /** Call start time */\n start: string;\n /** Call end time */\n end: string;\n}\n\n// --- Request DTOs ---\n\n/**\n * Options for resolving a Pragya container.\n */\nexport interface GetContainerOptions {\n /** Pragya container ID (from Janus extensionPayload.callingContainerIds) */\n containerId: string;\n}\n\n/**\n * Options for fetching summary content.\n * Requires the resolved Pragya container info.\n */\nexport interface GetSummaryContentOptions {\n /** The resolved Pragya container response */\n containerInfo: PragyaContainerResponse;\n}\n\n// --- Summary Response DTOs ---\n\n/**\n * Single action item snippet.\n */\nexport interface ActionItemSnippet {\n /** Unique identifier */\n id: string;\n /** User-edited version (if available) */\n editedContent?: string;\n /** Decrypted AI-generated content */\n aiGeneratedContent: string;\n}\n\n/**\n * Decrypted AI-generated summary content.\n * Contains all three content types returned by the summary API.\n */\nexport interface SummaryContent {\n /** Unique identifier */\n id: string;\n /** Decrypted full note content */\n note: string;\n /** Decrypted short note content */\n shortNote: string;\n /** Decrypted action item snippets */\n actionItems: ActionItemSnippet[];\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n * Decrypted AI-generated notes.\n */\nexport interface SummaryNotes {\n /** Unique identifier */\n id: string;\n /** Decrypted notes content */\n content: string;\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n * Decrypted AI-generated action items.\n */\nexport interface SummaryActionItems {\n /** Unique identifier (absent when no action items exist) */\n id?: string;\n /** Array of action item snippets */\n snippets: ActionItemSnippet[];\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n * Single decrypted transcript snippet.\n */\nexport interface TranscriptSnippet {\n /** Start time in milliseconds */\n startTime: string;\n /** End time in milliseconds */\n endTime: string;\n /** Decrypted transcript content */\n content: string;\n /** Audio CSI identifier */\n audioCSI?: string;\n /** Speaker information */\n speaker?: {\n speakerName: string;\n speakerId: string;\n };\n}\n\n/**\n * Decrypted transcript response.\n */\nexport interface TranscriptContent {\n /** Unique identifier */\n id: string;\n /** Total number of snippets */\n totalCount: number;\n /** Decrypted transcript snippets */\n snippets: TranscriptSnippet[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ADR
|
|
3
|
+
title: ADR-0001 - Self-contained plugin with a flattened container response
|
|
4
|
+
description: Keep the plugin self-contained, flatten the Pragya container response, and treat Pragya as the source of truth for content URLs and keys.
|
|
5
|
+
tags: [adr]
|
|
6
|
+
timestamp: 2026-09-23T00:00: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: "@riag"
|
|
14
|
+
updated_at: 2026-09-23T14:03:22Z
|
|
15
|
+
validation_status: pass
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
# ADR-0001 - Self-contained plugin with a flattened container response
|
|
19
|
+
|
|
20
|
+
| Field | Value |
|
|
21
|
+
| ------------- | --------------------------------------------- |
|
|
22
|
+
| Status | Accepted |
|
|
23
|
+
| Decision date | 2026-09-23 |
|
|
24
|
+
| Deciders | Webex JS SDK Team |
|
|
25
|
+
| Supersedes | N/A |
|
|
26
|
+
| Superseded by | N/A |
|
|
27
|
+
|
|
28
|
+
## Context
|
|
29
|
+
|
|
30
|
+
The SDK needed to expose AI-generated call summaries without disturbing the existing call-history
|
|
31
|
+
and bundle packages. Container IDs arrive from Janus, but the content URLs and the decryption key
|
|
32
|
+
are owned by Pragya, and Pragya's response shape does not match what consumers want to read. These
|
|
33
|
+
decisions were recorded with the original feature design and are reconstructed here from that
|
|
34
|
+
design material together with the shipped implementation in `src/ai-summary.ts`.
|
|
35
|
+
|
|
36
|
+
## Decision
|
|
37
|
+
|
|
38
|
+
Four choices were made together:
|
|
39
|
+
|
|
40
|
+
- **Self-contained plugin with zero changes to existing packages.** The plugin owns all of its types, constants, and logic. It does not modify `UserSession`, `CallHistory`, or the `packages/webex` bundle.
|
|
41
|
+
- **Flatten the container response.** `getContainer()` lifts `summaryData.data` onto `summaryData` so consumers can read `summaryData.summaryUrl` directly.
|
|
42
|
+
- **No separate service discovery for summary endpoints.** Pragya returns fully-qualified URLs that already include the correct regional host. The SDK fetches from these URLs directly.
|
|
43
|
+
- **Pragya is the source of truth** for both the content URLs and the encryption key.
|
|
44
|
+
|
|
45
|
+
Pragya is discoverable via U2C as `serviceName: "pragya"` (validated: e.g., load-us resolves to `https://pragya-loada.ciscospark.com/pragya/api/v1`).
|
|
46
|
+
|
|
47
|
+
This plugin is fully self-contained. It does **not** require modifications to any existing package:
|
|
48
|
+
|
|
49
|
+
| Concern | Approach |
|
|
50
|
+
| ------- | -------- |
|
|
51
|
+
| `UserSession` type in `@webex/calling` | **Not modified.** The plugin accepts a plain `containerId: string`. Consumers extract it from the Janus response at the application layer. The `UserSession` type update is a separate, optional task for the calling package team. |
|
|
52
|
+
| `packages/webex` bundle | **Not modified.** Consumers import `@webex/internal-plugin-call-ai-summary` directly, which self-registers via `registerInternalPlugin`. |
|
|
53
|
+
| `@webex/internal-plugin-encryption` | **Not modified.** Used as a runtime dependency via `this.webex.internal.encryption.decryptText()`. |
|
|
54
|
+
|
|
55
|
+
A related consequence of the same shape: `getSummary()` retrieves note, short note, and action items
|
|
56
|
+
in a single request with `?fields=note,shortnote,actionitems`, which is why it is the recommended
|
|
57
|
+
entry point over the standalone `getNotes()` and `getActionItems()` methods.
|
|
58
|
+
|
|
59
|
+
## Why
|
|
60
|
+
|
|
61
|
+
Modifying `UserSession` or the bundle would have coupled an experimental internal plugin to widely
|
|
62
|
+
consumed packages. Flattening the response keeps the awkward upstream nesting out of every consumer.
|
|
63
|
+
Trusting Pragya's absolute URLs avoids a second discovery mechanism that could disagree with Pragya
|
|
64
|
+
about the correct region.
|
|
65
|
+
|
|
66
|
+
## Alternatives considered
|
|
67
|
+
|
|
68
|
+
The non-modification choices recorded in the Decision table above were each weighed against
|
|
69
|
+
extending the existing package instead. The remaining alternatives:
|
|
70
|
+
|
|
71
|
+
| Alternative | Why it was not selected |
|
|
72
|
+
| ----------- | ----------------------- |
|
|
73
|
+
| Return the raw Pragya body unchanged | Pushes the `summaryData.data` nesting onto every consumer |
|
|
74
|
+
| Resolve content endpoints through the service catalog | Pragya already returns region-correct absolute URLs; a second mechanism could disagree |
|
|
75
|
+
| Require three standalone calls for note, short note, and action items | Costs three round trips and breaks when the optional `notesUrl` or `actionItemsUrl` is absent |
|
|
76
|
+
|
|
77
|
+
## Consequences
|
|
78
|
+
|
|
79
|
+
**Positive:**
|
|
80
|
+
|
|
81
|
+
- Zero changes to existing packages; the plugin ships and versions independently.
|
|
82
|
+
- Consumers read `summaryData.summaryUrl` without knowing the upstream shape.
|
|
83
|
+
- Region correctness comes from Pragya for free.
|
|
84
|
+
- One request returns all three summary content types.
|
|
85
|
+
|
|
86
|
+
**Negative / tradeoffs:**
|
|
87
|
+
|
|
88
|
+
- The object returned by `getContainer()` no longer matches the raw Pragya wire body, so wire-level debugging must account for the transform.
|
|
89
|
+
- The module trusts absolute URLs supplied by an upstream response.
|
|
90
|
+
- Type definitions overlap conceptually with neighbouring plugins and must be maintained in parallel.
|
|
91
|
+
- Callers wanting a single content type still pay for the combined `getSummary()` response.
|
|
92
|
+
|
|
93
|
+
## Constraint on future changes
|
|
94
|
+
|
|
95
|
+
`getContainer()` must keep flattening `summaryData.data` onto `summaryData` while consumers depend on
|
|
96
|
+
the flattened shape; changing it is a breaking change to every caller. The plugin must remain free of
|
|
97
|
+
edits to `UserSession`, `CallHistory`, and the `packages/webex` bundle.
|
|
98
|
+
|
|
99
|
+
## Follow-up
|
|
100
|
+
|
|
101
|
+
- [ ] Add unit tests covering the flattening transform and the `keyUrl` precedence rule
|
|
102
|
+
- [ ] Confirm whether `notesUrl` and `actionItemsUrl` are now present in all Pragya API versions
|
|
103
|
+
- [x] Record an owner answer for the package's coverage gate — resolved 2026-09-23: no gate applies, recorded as `quality_gates.code_coverage.origin: none`
|
|
104
|
+
|
|
105
|
+
## Revisit when
|
|
106
|
+
|
|
107
|
+
- Pragya stops nesting URLs under `summaryData.data`, making the transform a no-op
|
|
108
|
+
- The standalone notes and action-item endpoints become universally available
|
|
109
|
+
- A consumer needs the raw, untransformed container body
|
|
110
|
+
|
|
111
|
+
## References
|
|
112
|
+
|
|
113
|
+
- [Repository architecture](../architecture.md)
|
|
114
|
+
- [Module specification](../../src/docs/README.md)
|
|
115
|
+
- `src/ai-summary.ts`
|
|
@@ -0,0 +1,26 @@
|
|
|
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: "@riag"
|
|
6
|
+
updated_at: 2026-09-23T14:03:22Z
|
|
7
|
+
validation_status: pass
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# Architectural decision records
|
|
11
|
+
|
|
12
|
+
Numbered, append-only records of structural decisions affecting this repository
|
|
13
|
+
and its documentation. Add a concrete ADR (for example, `0042-cache-policy.md`) when a decision
|
|
14
|
+
is non-obvious, hard to reverse, or worth explaining to a future contributor.
|
|
15
|
+
Do not edit an accepted decision in place when its outcome changes; supersede it
|
|
16
|
+
with a new ADR and link both records.
|
|
17
|
+
|
|
18
|
+
## Index
|
|
19
|
+
|
|
20
|
+
- [ADR-0001 — Self-contained plugin with a flattened container response](0001-flatten-container-response-and-prefer-single-request-summary.md) — Accepted, 2026-09-23
|
|
21
|
+
|
|
22
|
+
Add new entries as ADRs are accepted. Keep this list in numeric order.
|
|
23
|
+
|
|
24
|
+
Each ADR should state its context, decision, alternatives, consequences, and
|
|
25
|
+
the condition that would cause the team to revisit it. Record the deciders,
|
|
26
|
+
any superseded decision, and the constraint future changes must preserve.
|