@webex/contact-center 3.12.0-next.147 → 3.12.0-next.148
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/.sdd/manifest.json +4 -2
- package/ai-docs/CONTRACTS.md +2 -0
- package/dist/cc.js +3 -1
- package/dist/cc.js.map +1 -1
- package/dist/constants.js +10 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/metrics/constants.js +9 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/ApiAiAssistant.js +87 -10
- package/dist/services/ApiAiAssistant.js.map +1 -1
- package/dist/services/config/types.js +10 -4
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/types.js.map +1 -1
- package/dist/services/task/Task.js +202 -1
- package/dist/services/task/Task.js.map +1 -1
- package/dist/services/task/TaskFactory.js +4 -4
- package/dist/services/task/TaskFactory.js.map +1 -1
- package/dist/services/task/TaskManager.js +113 -26
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +11 -1
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/constants.js +11 -2
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/digital/Digital.js +2 -2
- package/dist/services/task/digital/Digital.js.map +1 -1
- package/dist/services/task/types.js +31 -0
- package/dist/services/task/types.js.map +1 -1
- package/dist/services/task/voice/Voice.js +2 -2
- package/dist/services/task/voice/Voice.js.map +1 -1
- package/dist/services/task/voice/WebRTC.js +2 -2
- package/dist/services/task/voice/WebRTC.js.map +1 -1
- package/dist/types/constants.d.ts +9 -0
- package/dist/types/index.d.ts +4 -5
- package/dist/types/metrics/constants.d.ts +8 -0
- package/dist/types/services/ApiAiAssistant.d.ts +4 -2
- package/dist/types/services/config/types.d.ts +17 -7
- package/dist/types/services/task/Task.d.ts +15 -4
- package/dist/types/services/task/TaskFactory.d.ts +3 -2
- package/dist/types/services/task/TaskUtils.d.ts +6 -0
- package/dist/types/services/task/constants.d.ts +9 -0
- package/dist/types/services/task/digital/Digital.d.ts +3 -2
- package/dist/types/services/task/types.d.ts +109 -1
- package/dist/types/services/task/voice/Voice.d.ts +3 -2
- package/dist/types/services/task/voice/WebRTC.d.ts +3 -2
- package/dist/types/types.d.ts +10 -4
- package/dist/types.js +8 -4
- package/dist/types.js.map +1 -1
- package/dist/webex.js +1 -1
- package/package.json +2 -2
- package/src/cc.ts +4 -0
- package/src/constants.ts +12 -0
- package/src/index.ts +10 -2
- package/src/metrics/ai-docs/metrics-spec.md +12 -4
- package/src/metrics/constants.ts +10 -0
- package/src/services/ApiAiAssistant.ts +120 -12
- package/src/services/config/types.ts +10 -4
- package/src/services/core/types.ts +31 -1
- package/src/services/task/Task.ts +308 -5
- package/src/services/task/TaskFactory.ts +26 -5
- package/src/services/task/TaskManager.ts +148 -29
- package/src/services/task/TaskUtils.ts +13 -0
- package/src/services/task/ai-docs/task-spec.md +30 -5
- package/src/services/task/constants.ts +10 -0
- package/src/services/task/digital/Digital.ts +8 -3
- package/src/services/task/types.ts +139 -0
- package/src/services/task/voice/Voice.ts +8 -3
- package/src/services/task/voice/WebRTC.ts +6 -3
- package/src/types.ts +10 -4
- package/test/unit/fixtures/aiSummaryTestUtils.ts +40 -0
- package/test/unit/spec/cc.ts +1314 -32
- package/test/unit/spec/index.ts +881 -0
- package/test/unit/spec/services/ApiAiAssistant.ts +122 -6
- package/test/unit/spec/services/core/WebexRequest.ts +5 -6
- package/test/unit/spec/services/task/Task.ts +1988 -10
- package/test/unit/spec/services/task/TaskFactory.ts +17 -0
- package/test/unit/spec/services/task/TaskManager.ts +2327 -180
- package/test/unit/spec/services/task/TaskUtils.ts +72 -0
- package/test/unit/spec/services/task/voice/Voice.ts +353 -18
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
package/.sdd/manifest.json
CHANGED
|
@@ -307,11 +307,13 @@
|
|
|
307
307
|
{
|
|
308
308
|
"path": "src/services/task",
|
|
309
309
|
"coverage_status": "Partial",
|
|
310
|
-
"coverage_evidence": "Canonical spec is structurally complete with 15/15 required documentation fields and source/test evidence mapped by requirement. Independent PR #5088 remediation validation completed on claude-code (2026-07-15); coverage remains Partial until post-baseline promotion criteria are satisfied.",
|
|
310
|
+
"coverage_evidence": "Canonical spec is structurally complete with 15/15 required documentation fields and source/test evidence mapped by requirement. Independent PR #5088 remediation validation completed on claude-code (2026-07-15); AI summary method, delivery, enablement, and cleanup updates are pending independent review (2026-10-06); coverage remains Partial until post-baseline promotion criteria are satisfied.",
|
|
311
311
|
"canonical_spec": "src/services/task/ai-docs/task-spec.md",
|
|
312
312
|
"contracts": {
|
|
313
313
|
"provides": [
|
|
314
|
-
"Task/Voice/WebRTC/Digital lifecycle APIs; TaskManager lifecycle correlation, narrowly scoped backend-authoritative ContactOwnerChanged recovery, and task-event publication, including routing owner-changing ContactUpdated through the existing task:hydrate event; TaskManager/Voice stamp wrapUpRequired on wrap-up ingress so task:wrapup and profile-gated auto wrap-up can start; task events/types; ordered action-specific consult/transfer destination controls; call-control and dialer operations including acceptPreviewContact, skipPreviewContact, and removePreviewContact"
|
|
314
|
+
"Task/Voice/WebRTC/Digital lifecycle APIs; TaskManager lifecycle correlation, narrowly scoped backend-authoritative ContactOwnerChanged recovery, and task-event publication, including routing owner-changing ContactUpdated through the existing task:hydrate event; TaskManager/Voice stamp wrapUpRequired on wrap-up ingress so task:wrapup and profile-gated auto wrap-up can start; task events/types; ordered action-specific consult/transfer destination controls; call-control and dialer operations including acceptPreviewContact, skipPreviewContact, and removePreviewContact",
|
|
315
|
+
"task.ai-summary: receiving-agent summary events delivered directly to taskCollection[conversationId]; latest payload for an unavailable task retained without expiry until its collection key is registered or session cleanup; creation/merge replay follows public task publication; cleanup cancels requests and clears task flags and pending maps; ContactCenter deregistration removes the RTD listener",
|
|
316
|
+
"contact-center.task-ai-summary: four dedicated request/response methods; request methods directly check current agent configuration generated-summary flags on the shared ApiAIAssistant.aiFeature field; responses use the current task interaction ID and main interaction ID with an interaction ID fallback for conversation ID; per-task enablement survives data updates, consults, re-keying, and wrapup, then clears on task removal or session cleanup"
|
|
315
317
|
],
|
|
316
318
|
"requires": [
|
|
317
319
|
"Contact/dialer AqmReqs; WebSocket managers; @webex/calling; MetricsManager; XState task-state module"
|
package/ai-docs/CONTRACTS.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| `contact-center.routing-agent` | Agent/Core | `routingAgent` | `(routing: AqmReqs) => {stationLogin, logout, stateChange, buddyAgents, reload}`; BROWSER login payload follows `contact-center.station-login-browser-dn` | semver public export; returned methods follow backend contracts | `src/services/agent/ai-docs/agent-spec.md` | `src/index.ts`, `src/services/agent/index.ts` |
|
|
10
10
|
| `contact-center.station-login-browser-dn` | Contact Center / Agent | `cc.stationLogin` BROWSER payload on `POST /v1/agents/login` | BROWSER sends `dialNumber` and `deviceId` as `webrtc-{agentId}`; EXTENSION and AGENT_DN continue to send the caller-supplied dial number for both fields | backend contract alignment; public `stationLogin({loginOption: 'BROWSER'})` input unchanged | `src/services/agent/ai-docs/agent-spec.md` AGENT-R-006 | `src/cc.ts` |
|
|
11
11
|
| `contact-center.task` | Task | `Task`, `ITask`, task payload/control types | task instance and compatibility interface | semver public | `src/services/task/ai-docs/task-spec.md` | `src/index.ts` |
|
|
12
|
+
| `contact-center.task-ai-summary` | Task | `requestPostCallSummary`, `sendPostCallSummaryResponse`, `requestMidCallSummary`, `sendMidCallSummaryResponse` | Dedicated request and response methods; mid-call methods take `AISummaryAction`; requests directly check current agent configuration flags on the shared `ApiAIAssistant.aiFeature` field and per-task enablement. Responses use the current task's interaction ID and main interaction ID, with the interaction ID as the conversation ID fallback. Task flags survive data updates and wrapup, then clear on task removal or session cleanup. | public signatures unchanged by cleanup | `src/services/task/ai-docs/task-spec.md` AI summary APIs | `src/services/task/Task.ts`, `src/services/task/types.ts`, `src/services/ApiAiAssistant.ts`, `src/services/task/TaskManager.ts` |
|
|
12
13
|
| `contact-center.events` | Agent/Task/Config | `AGENT_EVENTS`, `TASK_EVENTS`, `CC_AGENT_EVENTS`, `CC_TASK_EVENTS`, `CC_EVENTS` | typed string event contracts | additive; removals or semantic changes are breaking | owning module specs | `src/index.ts` |
|
|
13
14
|
| `contact-center.data` | Services/Utils | `AddressBook`, `ApiAIAssistant`, SDK data response/search types | SDK data and AI-assistant access | semver public | Services/Utils specs | `src/index.ts` |
|
|
14
15
|
| `contact-center.consult-transfer-lists` | Contact Center/Services | Existing `getQueues`, `getEntryPoints`, `ContactServiceQueueSearchParams`, `EntryPointSearchParams`, `ContactServiceQueuesResponse`, `EntryPointListResponse`, `ContactServiceQueue`, and `EntryPointRecord` with optional mapped `number` | Queue telephony eligibility/profile views/`name,ASC` and entry-point desktop-profile dial-number mapping/`entryPointName,ASC` are defaults on the existing methods; compatible search/filter/sort parameters remain available and backend row order is preserved | behavioral default correction on existing public methods; no specialized methods or projected response wrappers; `EntryPointRecord.number` is additive and raw configuration-only fields are optional | `ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md` | `src/cc.ts`, `src/services/Queue.ts`, `src/services/EntryPoint.ts`, `src/types.ts` |
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
| `task.wxapp-mute.events` | Task | `task:wxapp-mute-state-updated` | publish to application/task | task spec/types | event-driven | additive | `src/services/task/types.ts`, `src/services/task/voice/Voice.ts` |
|
|
29
30
|
| `cc.events` | Config/Core | backend CC_EVENTS | consume/map | config/core specs | remote WebSocket delivery; AQM correlation where configured | backend contract | `src/services/config/types.ts` |
|
|
30
31
|
| `rtd.events` | Task | realtime transcription/suggestion | consume then publish per task | task spec | websocket best-effort according to remote service | additive payloads | `src/services/task/TaskManager.ts` |
|
|
32
|
+
| `task.ai-summary` | Task | `task:midCallSummaryReceived` | consume RTD summaries, then publish on `taskCollection[conversationId]` | task spec AI summary APIs / types | RTD conversation ID is the task collection key; latest payload for an unavailable task is retained in memory without expiry until registration or session cleanup; creation/merge replay follows public task publication; cleanup cancels requests and clears task flags and pending maps, while ContactCenter deregistration removes the RTD listener | existing event and payload; direct task lookup and no cache expiry timer | `src/services/task/TaskManager.ts`, `src/services/task/types.ts`, `src/cc.ts` |
|
|
31
33
|
| `wellness.notification.events` | Contact Center | `CC_AGENT_EVENTS.WELLNESS_BREAK` | consume validated wellness payloads from the primary data-notification socket, then publish normalized application events | Contact Center spec/types | exact current agent/org; notification session is diagnostic and is not compared with the active session; canonical optional `actionText` is normalized to public `actionText`; malformed/stale payloads are ignored | additive | `src/cc.ts`, `src/types.ts`, `src/services/config/types.ts` |
|
|
32
34
|
|
|
33
35
|
### Telemetry / Metrics Events
|
package/dist/cc.js
CHANGED
|
@@ -665,6 +665,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
665
665
|
this.updateWellnessSession();
|
|
666
666
|
try {
|
|
667
667
|
this.metricsManager.timeEvent([_constants4.METRIC_EVENT_NAMES.WEBSOCKET_DEREGISTER_SUCCESS, _constants4.METRIC_EVENT_NAMES.WEBSOCKET_DEREGISTER_FAIL]);
|
|
668
|
+
this.taskManager.clearAISummaryState();
|
|
668
669
|
this.taskManager.off(_types4.TASK_EVENTS.TASK_INCOMING, this.handleIncomingTask);
|
|
669
670
|
this.taskManager.off(_types4.TASK_EVENTS.TASK_HYDRATE, this.handleTaskHydrate);
|
|
670
671
|
this.taskManager.off(_types4.TASK_EVENTS.TASK_MULTI_LOGIN_HYDRATE, this.handleTaskMultiLoginHydrate);
|
|
@@ -850,6 +851,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
850
851
|
// TODO: Make profile a singleton to make it available throughout app/sdk so we dont need to inject info everywhere
|
|
851
852
|
this.taskManager.setWrapupData(this.agentConfig.wrapUpData);
|
|
852
853
|
this.taskManager.setAgentId(this.agentConfig.agentId);
|
|
854
|
+
this.taskManager.setAgentName(this.agentConfig.agentName);
|
|
853
855
|
this.taskManager.setWebRtcEnabled(this.agentConfig.webRtcEnabled);
|
|
854
856
|
this.apiAIAssistant.setAIFeatureFlags(this.agentConfig.aiFeature);
|
|
855
857
|
this.wellbeingBreakIdleCode = undefined;
|
|
@@ -860,7 +862,7 @@ class ContactCenter extends _webexCore.WebexPlugin {
|
|
|
860
862
|
* Extend this condition when additional AI RTD features are introduced.
|
|
861
863
|
* Wellness break notifications also arrive on this websocket.
|
|
862
864
|
*/
|
|
863
|
-
if (this.agentConfig.aiFeature?.realtimeTranscripts?.enable || this.agentConfig.aiFeature?.suggestedResponses?.enable || this.agentConfig.isWellnessBreakEnabled) {
|
|
865
|
+
if (this.agentConfig.aiFeature?.realtimeTranscripts?.enable || this.agentConfig.aiFeature?.suggestedResponses?.enable || this.agentConfig.aiFeature?.generatedSummaries?.wrapUpSummariesEnabled === true || this.agentConfig.aiFeature?.generatedSummaries?.consultTransferSummariesEnabled === true || this.agentConfig.isWellnessBreakEnabled) {
|
|
864
866
|
_loggerProxy.default.info('Connecting to RTD websocket', {
|
|
865
867
|
module: _constants.CC_FILE,
|
|
866
868
|
method: _constants.METHODS.CONNECT_WEBSOCKET
|