@webex/contact-center 3.13.0-next.1 → 3.13.0-next.11

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.
Files changed (84) hide show
  1. package/.repo-context.json +704 -0
  2. package/.sdd/manifest.json +1065 -339
  3. package/AGENTS.md +935 -60
  4. package/dist/webex.js +1 -1
  5. package/docs/adr/0001-spec-source-policy.md +97 -0
  6. package/{ai-docs/features/consult-transfer-list-policy/spec/feature-spec.md → docs/adr/0002-consult-transfer-list-policy.md} +227 -244
  7. package/docs/adr/0003-repo-standards-migration.md +104 -0
  8. package/docs/adr/index.md +35 -0
  9. package/docs/architecture.md +460 -0
  10. package/docs/getting-started.md +142 -0
  11. package/docs/index.md +53 -0
  12. package/docs/specs/README.md +98 -0
  13. package/package.json +10 -9
  14. package/schemas/repo-context.schema.json +796 -0
  15. package/src/docs/README.md +727 -0
  16. package/src/metrics/docs/README.md +710 -0
  17. package/src/services/agent/docs/README.md +673 -0
  18. package/src/services/config/docs/README.md +530 -0
  19. package/src/services/core/docs/README.md +993 -0
  20. package/src/services/docs/README.md +765 -0
  21. package/src/services/task/docs/README.md +1569 -0
  22. package/src/services/task/state-machine/docs/README.md +1388 -0
  23. package/src/utils/AGENTS.md +6 -4
  24. package/src/utils/docs/README.md +413 -0
  25. package/umd/contact-center.min.js +2 -2
  26. package/umd/contact-center.min.js.map +1 -1
  27. package/ai-docs/ARCHITECTURE.md +0 -168
  28. package/ai-docs/CONTRACTS.md +0 -64
  29. package/ai-docs/GETTING_STARTED.md +0 -168
  30. package/ai-docs/GLOSSARY.md +0 -43
  31. package/ai-docs/README.md +0 -138
  32. package/ai-docs/REVIEW_CHECKLIST.md +0 -41
  33. package/ai-docs/RULES.md +0 -444
  34. package/ai-docs/SECURITY.md +0 -52
  35. package/ai-docs/SERVICE_STATE.md +0 -52
  36. package/ai-docs/SPEC_INDEX.md +0 -65
  37. package/ai-docs/adr/0001-spec-source-policy.md +0 -55
  38. package/ai-docs/adr/README.md +0 -8
  39. package/ai-docs/adr/_adr-template.md +0 -31
  40. package/ai-docs/contact-center-spec.md +0 -388
  41. package/ai-docs/features/contact-owner-change-refactor.md +0 -78
  42. package/ai-docs/features/generated-spec-conformance-fidelity-remediation/spec/feature-spec.md +0 -117
  43. package/ai-docs/features/residual-warning-coverage-completion/spec/feature-spec.md +0 -203
  44. package/ai-docs/features/validator-code-fidelity-drift-fix/spec/feature-spec.md +0 -315
  45. package/ai-docs/patterns/event-driven-patterns.md +0 -485
  46. package/ai-docs/patterns/testing-patterns.md +0 -480
  47. package/ai-docs/patterns/typescript-patterns.md +0 -365
  48. package/ai-docs/templates/README.md +0 -102
  49. package/ai-docs/templates/documentation/create-agents-md.md +0 -240
  50. package/ai-docs/templates/documentation/create-architecture-md.md +0 -295
  51. package/ai-docs/templates/existing-service/bug-fix.md +0 -254
  52. package/ai-docs/templates/existing-service/feature-enhancement.md +0 -450
  53. package/ai-docs/templates/new-method/00-master.md +0 -80
  54. package/ai-docs/templates/new-method/01-requirements.md +0 -232
  55. package/ai-docs/templates/new-method/02-implementation.md +0 -295
  56. package/ai-docs/templates/new-method/03-tests.md +0 -201
  57. package/ai-docs/templates/new-method/04-validation.md +0 -141
  58. package/ai-docs/templates/new-service/00-master.md +0 -109
  59. package/ai-docs/templates/new-service/01-pre-questions.md +0 -159
  60. package/ai-docs/templates/new-service/02-code-generation.md +0 -346
  61. package/ai-docs/templates/new-service/03-integration.md +0 -178
  62. package/ai-docs/templates/new-service/04-test-generation.md +0 -205
  63. package/ai-docs/templates/new-service/05-validation.md +0 -145
  64. package/src/metrics/ai-docs/AGENTS.md +0 -350
  65. package/src/metrics/ai-docs/ARCHITECTURE.md +0 -338
  66. package/src/metrics/ai-docs/metrics-spec.md +0 -971
  67. package/src/services/agent/ai-docs/AGENTS.md +0 -240
  68. package/src/services/agent/ai-docs/ARCHITECTURE.md +0 -304
  69. package/src/services/agent/ai-docs/agent-spec.md +0 -505
  70. package/src/services/ai-docs/AGENTS.md +0 -386
  71. package/src/services/ai-docs/services-spec.md +0 -512
  72. package/src/services/config/ai-docs/AGENTS.md +0 -250
  73. package/src/services/config/ai-docs/ARCHITECTURE.md +0 -413
  74. package/src/services/config/ai-docs/config-spec.md +0 -669
  75. package/src/services/core/ai-docs/AGENTS.md +0 -381
  76. package/src/services/core/ai-docs/ARCHITECTURE.md +0 -698
  77. package/src/services/core/ai-docs/core-spec.md +0 -797
  78. package/src/services/task/ai-docs/AGENTS.md +0 -457
  79. package/src/services/task/ai-docs/ARCHITECTURE.md +0 -595
  80. package/src/services/task/ai-docs/task-spec.md +0 -1501
  81. package/src/services/task/state-machine/ai-docs/AGENTS.md +0 -460
  82. package/src/services/task/state-machine/ai-docs/ARCHITECTURE.md +0 -1156
  83. package/src/services/task/state-machine/ai-docs/task-state-machine-spec.md +0 -2247
  84. package/src/utils/ai-docs/utils-spec.md +0 -391
@@ -1,168 +0,0 @@
1
- # ARCHITECTURE — @webex/contact-center
2
-
3
- > Start here → root [`AGENTS.md`](../AGENTS.md) · router [`SPEC_INDEX.md`](SPEC_INDEX.md). Per-module detail lives in source-local specifications.
4
-
5
- ## Design Overview
6
-
7
- The package is a host-embedded SDK plugin. `ContactCenter` owns the public façade and composes services for configuration, agent requests, tasks/calling, data lookup, realtime events, transport, and metrics. Remote Webex services own durable domain data.
8
-
9
- Two interaction styles are deliberate: direct REST for immediate data/configuration responses, and AQM HTTP initiation followed by correlated WebSocket completion for event-driven agent/task operations. Typed events and XState isolate consumers from raw backend messages.
10
-
11
- ## Component Inventory & Responsibilities
12
-
13
- | Component | Responsibility (one line) | Docs |
14
- |---|---|---|
15
- | `src` | Own the published Webex Contact Center SDK plugin surface, registration lifecycle, public method delegation, and application-facing event routing. | `ai-docs/contact-center-spec.md` |
16
- | `src/metrics` | Own timing, taxonomy, queuing, payload preparation, and submission for Contact Center behavioral, operational, and business telemetry. | `src/metrics/ai-docs/metrics-spec.md` |
17
- | `src/services` | Own composition and bootstrap order for backend request, realtime, data, and WebRTC service collaborators. | `src/services/ai-docs/services-spec.md` |
18
- | `src/services/agent` | Own agent login, logout, state-change, buddy-agent, device-update, and silent-relogin request contracts. | `src/services/agent/ai-docs/agent-spec.md` |
19
- | `src/services/config` | Own retrieval and aggregation of remote organization, agent, team, profile, auxiliary-code, dial-plan, and feature configuration. | `src/services/config/ai-docs/config-spec.md` |
20
- | `src/services/core` | Own authenticated HTTP, realtime WebSocket lifecycle, AQM request correlation, reconnect/keepalive behavior, and shared error normalization. | `src/services/core/ai-docs/core-spec.md` |
21
- | `src/services/task` | Own task creation, media-specific behavior, call-control operations, lifecycle orchestration, task events, and integration with the task state machine. | `src/services/task/ai-docs/task-spec.md` |
22
- | `src/services/task/state-machine` | Own deterministic task lifecycle states, transition guards/actions, typed internal events, and state-derived UI-control availability. | `src/services/task/state-machine/ai-docs/task-state-machine-spec.md` |
23
- | `src/utils` | Own shared pagination contracts and the bounded in-memory page cache used by Contact Center data services. | `src/utils/ai-docs/utils-spec.md` |
24
-
25
- ## Component Interaction
26
-
27
- ```mermaid
28
- flowchart LR
29
- Host[Host Webex SDK] --> CC[ContactCenter]
30
- CC --> Services
31
- CC --> Task
32
- CC --> Metrics
33
- Services --> Agent
34
- Services --> Config
35
- Services --> Core
36
- Services --> Utils
37
- Task --> StateMachine[Task state machine]
38
- Services --> REST[WCC REST]
39
- Core <--> WS[WCC WebSocket]
40
- Task --> Calling[Webex Calling/WebRTC]
41
- Metrics --> Telemetry[Webex metrics]
42
- ```
43
-
44
- Public calls enter through `src/cc.ts`; direct REST returns through WebexRequest, while AQM operations resolve after matching WebSocket notifications. TaskManager converts backend events to task/state-machine events.
45
-
46
- ## Execution & Flow
47
-
48
- Registration initializes WebexRequest, Services, MetricsManager, WebCallingService, TaskManager, and data services in evidence-backed order. The plugin subscribes to realtime messages, obtains the remote agent profile, routes agent/task events, and tears down listeners/connections on deregistration.
49
-
50
- ## Dependencies
51
-
52
- | Dependency | Type (internal / external / peer) | How used | Failure / version handling |
53
- |---|---|---|---|
54
- | `@webex/webex-core` | external / peer | Runtime package dependency | Workspace/declared version; errors propagate through owning module |
55
- | `@webex/calling` | external / peer | Runtime package dependency | Workspace/declared version; errors propagate through owning module |
56
- | `@webex/internal-plugin-metrics` | external / peer | Runtime package dependency | Workspace/declared version; errors propagate through owning module |
57
- | `@webex/internal-plugin-mercury` | external / peer | Runtime package dependency | Workspace/declared version; errors propagate through owning module |
58
- | `wcc-api-gateway` | external Webex service | Service-catalog identifier resolved through the host Webex SDK; not an npm package dependency | Host service-catalog availability; routing errors propagate through the owning module |
59
-
60
- ### State Model
61
-
62
- - ContactCenter retains agent profile, task collections, WebSocket/reconnect flags, metrics queues/timers, page-cache entries, and task actors in memory.
63
- - Remote systems remain authoritative for agent/task/configuration records.
64
-
65
- ## Cross-Cutting Concerns
66
-
67
- - **Security:** host-provided credentials and service routing; no tokens/secrets in source or logs; validate public inputs.
68
- - **Observability:** LoggerProxy context/tracking ids plus MetricsManager success/failure/duration signals and diagnostic log upload.
69
-
70
- ## Non-Functional Posture
71
-
72
- Package compatibility and event-loop safety are primary: published exports/types are semver-sensitive, telemetry is non-blocking, listeners are cleaned up, and reconnect/timeouts are explicit.
73
-
74
- ## Dependency / Interaction Topology
75
-
76
- ```mermaid
77
- flowchart TD
78
- CC -->|calls| Services
79
- Services -->|REST| Core
80
- Core -->|events| CC
81
- Core -->|events| Task
82
- Task -->|typed events| StateMachine
83
- StateMachine -->|actions/UI controls| Task
84
- ```
85
-
86
- | From | To | Kind (call / event) | Purpose |
87
- |---|---|---|---|
88
- | ContactCenter | Services | call | Backend/config/agent composition |
89
- | WebSocketManager | ContactCenter/TaskManager/AqmReqs | event | Realtime routing and request completion |
90
- | Task | Task state machine | call/event | Validate lifecycle transitions and emit task events |
91
- | Data services | PageCache | call | Bounded pagination reuse |
92
-
93
- ## Object / Data Ownership
94
-
95
- | Domain object | System-of-record (owning component) | Read by |
96
- |---|---|---|
97
- | Agent/Profile | Remote WCC services; Config aggregates a local view | ContactCenter, Agent, Task |
98
- | Task/Interaction | Remote WCC services; Task owns client representation | ContactCenter consumers |
99
- | Metric event | Metrics module until submission; remote metrics backend after submit | Observability systems |
100
- | Cached page | Utils PageCache (ephemeral only) | AddressBook, Queue |
101
-
102
- ## Caching Catalog
103
-
104
- | Cache | Backend | What it holds | TTL | Invalidation trigger |
105
- |---|---|---|---|---|
106
- | PageCache | in-memory Map | simple paginated data-service pages | 5 minutes | expiry or explicit clear; parameterized queries bypass |
107
-
108
- ## Observability Patterns
109
-
110
- - **Logging:** LoggerProxy with module/method and tracking/interaction identifiers; no credentials or sensitive payloads.
111
- - **Metrics:** METRIC_EVENT_NAMES plus behavioral taxonomy and `WXCC_SDK_` operational/business names.
112
- - **Audit:** no local audit store; remote services own operational records.
113
-
114
- ## Infrastructure Matrix
115
-
116
- | Category | In use | Notes |
117
- |---|---|---|
118
- | Datastores | Remote WCC-owned stores | Package owns no durable store. |
119
- | Messaging / streaming | WebSocket notification and RTD streams | Used for realtime events and AQM completion. |
120
- | Cloud / platform services | Webex service catalog, WCC APIs, Calling/WebRTC, metrics | Host SDK supplies credentials/routing. |
121
-
122
- ## Shared / Base Libraries
123
-
124
- | Library | What every module inherits from it | Version floor |
125
- |---|---|---|
126
- | `@webex/webex-core` | plugin host, request/service routing | workspace version |
127
- | `@webex/calling` | browser calling and line/call objects | workspace version |
128
- | LoggerProxy/MetricsManager | package logging and telemetry conventions | package-local |
129
-
130
- ## Package Map & Inter-Package Dependencies
131
-
132
- - Workspace glob: root `package.json` `workspaces`; this scoped package is public and consumes internal/public sibling packages.
133
- - `@webex/contact-center` depends on core, calling, metrics, mercury, support, authorization, and logger workspace packages; releases use the repository's synchronized package tooling.
134
-
135
- ## Release & Versioning
136
-
137
- - Published through the package's npm publish script to the configured registry. Public exports and declarations follow semver; breaking changes require a major-version consumer transition and changelog entry.
138
-
139
- ## Host Integration & Theming
140
-
141
- - Registered as WebexPlugin child `cc`; the host supplies credentials, configuration, request routing, logger, internal plugins, and lifecycle. The package renders no UI or theme.
142
-
143
- ## Cross-Repo Dependency Graph
144
-
145
- - **Internal:** sibling `@webex/*` workspace packages supply host, calling, telemetry, authorization, logging, and mercury capabilities.
146
- - **External services:** WCC REST/WebSocket/RTD and Webex metrics backends.
147
- - **External read-only:** GitHub/PR history may support rationale; code/tests remain the behavioral referee.
148
-
149
- ## Security Architecture
150
-
151
- The host Webex SDK establishes identity and injects authenticated service routing. Trust boundaries occur at exported SDK input, REST request construction, WebSocket parsing/event mapping, log upload, and metrics submission. Transport security is provided by host-resolved HTTPS/WSS services; durable encryption is remote-service owned.
152
-
153
- ---
154
- → Per-module design: `SPEC_INDEX.md`.
155
-
156
- ## Architecture Reference Links
157
-
158
- | Reference | Location | When to read |
159
- |---|---|---|
160
- | Architecture decisions | `adr/` | Durable design choices and supersession |
161
- | Repo patterns | `patterns/` | Existing TypeScript, event, and testing conventions |
162
- | Enforceable rules | `RULES.md` | Constraints for every change |
163
-
164
- ## WS6 References
165
-
166
- | WS6 artifact | Relevance to this repo | Link |
167
- |---|---|---|
168
- | None routed during onboarding | No separate WS6 artifact was provided. | N/A |
@@ -1,64 +0,0 @@
1
- # Contracts Catalog — @webex/contact-center
2
-
3
- > Start here → root [`AGENTS.md`](../AGENTS.md) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Machine source: `.sdd/manifest.json`.
4
-
5
- ### Exported API & Types
6
- | Contract ID | Owner module/package | Symbol | Signature / shape | Stability / deprecation | Schema / detail link | Defined at |
7
- |---|---|---|---|---|---|---|
8
- | `contact-center.plugin` | Contact Center | `ContactCenter` / default plugin | WebexPlugin implementing `IContactCenter` | semver public | `ai-docs/contact-center-spec.md` | `src/index.ts` |
9
- | `contact-center.browser-voice-state` | Contact Center / Calling | `cc.getVoiceConnectionState()`, `voice:connectionStateChange`, `VoiceConnectionState`, and exported voice status/error enums | Snapshot distinguishes local browser line registration and Mobius socket state from the Contact Center WebSocket; only local BROWSER logins with WebRTC registration enabled require voice. Silent relogin preserves browser-line registration unless explicitly disabled. A non-BROWSER station-login notification clears stale local voice requirements. `setAgentState` rejects only transitions into `Available` while required voice is unavailable, using the standard `BROWSER_VOICE_NOT_READY` validation error. | Additive semver public API and event; state is reset on local line deregistration. | `ai-docs/contact-center-spec.md` | `src/cc.ts`, `src/types.ts`, `src/services/config/types.ts`, `src/index.ts` |
10
- | `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` |
11
- | `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` |
12
- | `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` |
13
- | `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` |
14
- | `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` |
15
- | `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` |
16
- | `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` |
17
- | `contact-center.user-preference` | Services/Config | `UserPreference`, `cc.userPreference`, `UserPreferenceData`, request/response types | `getUserPreference(params?)`, `createUserPreference(data)`, `updateUserPreference(userId, data)`, `deleteUserPreference(userId)` | semver public | `src/services/ai-docs/services-spec.md` | `src/index.ts`, `src/cc.ts`, `src/services/UserPreference.ts`, `src/services/config/types.ts` |
18
- | `contact-center.preview-campaign` | Contact Center/Task | `acceptPreviewContact`, `skipPreviewContact`, `removePreviewContact` | `(payload: PreviewContactPayload) => Promise<TaskResponse>` | semver public | `ai-docs/contact-center-spec.md`, `src/services/task/ai-docs/task-spec.md` | `src/cc.ts`, `src/services/task/dialer.ts`, `src/services/task/types.ts` |
19
- | `contact-center.state-controls` | Task state machine | `getDefaultUIControls`, `TaskUIControls` with ordered `consultTransferDestinations` arrays | Task controls include per-leg action state plus ordered `consult`/`transfer` destination categories derived from profile and interaction policy | additive semver public field; destination arrays are SDK-owned and first item is the consumer default | `src/services/task/state-machine/ai-docs/task-state-machine-spec.md` | `src/index.ts`, `src/services/task/types.ts`, `src/services/task/state-machine/uiControlsComputer.ts` |
20
- | `contact-center.conference-participant-drop` | Task | `DropConferenceParticipantPayload`, `ITask.dropConferenceParticipant` | `(payload: {participantId: string}) => Promise<TaskResponse>`; Voice resolves from correlated `ParticipantLeftConference`, while non-voice base Task rejects as unsupported. Existing participant/consult lifecycle events may resolve one unique child-keyed task by `mainInteractionId`; no new public event is introduced. | semver public | `src/services/task/ai-docs/task-spec.md`, `src/services/task/state-machine/ai-docs/task-state-machine-spec.md` | `src/index.ts`, `src/services/task/types.ts`, `src/services/task/voice/Voice.ts`, `src/services/task/contact.ts`, `src/services/task/TaskManager.ts` |
21
- | `contact-center.wxapp-answer` | Contact Center / Task | `enableWxBetterTogether`, `isWxBetterTogetherEnabled()`, `getWxAppMuted`, `syncWxAppMuteFromCallDetails`, unified task telephony (`ITask.accept`, `decline`, `toggleMute({ muted?, lineOwnerId? })`, `transmitDtmf({ dtmf, lineOwnerId? })`) | init flag ON → usersub `true` + Mercury on supported station login **and silent relogin**; init flag OFF → force usersub `false` on supported station login **and silent relogin** (clears stale suppression after refresh); **Phase 1 init-only** — change flag via re-init; multi-login supported; mute backfill via GET call details + `getWxAppMuted()` on hydrate/refresh; shared-line `lineOwnerId` defaults from participant; SDK `Voice` routes wxApp telephony when flag active | semver public | `src/services/task/ai-docs/task-spec.md`, `ai-docs/contact-center-spec.md`, `src/services/ai-docs/services-spec.md` | `src/cc.ts`, `src/services/task/voice/Voice.ts`, `src/services/task/voice/wxAppVoiceMethods.ts` |
22
- | `contact-center.desktop-login-aggregate` | Services / Config | `getOrgDesktopLoginConfig`, `getUserDesktopLoginConfig`, `OrgDesktopLoginResponse`, `UserDesktopLoginResponse`, `AgentProfile`, `OrgUrlMappings`, `MicrosoftConfig`, `WebexConfig`; retyped `Profile.teams`; changed `getListOfTeams` / `getAllTeams`; removed `DesktopProfileResponse`, `URLMapping`, `AIFeatureFlagsResponse`, `Profile.environment` | `getAgentConfig` builds `Profile` from 6 calls (5 when `agentProfile.dialPlanEnabled` is false) instead of 11: `organization/{orgId}/desktop-login` and `organization/{orgId}/v2/user/by-ci-user-id/{ciUserId}/desktop-login` replace the org-info, org-setting, tenant-configuration, org-url-mapping, ai-feature, user-by-ci-user-id and agent-profile calls. `getListOfTeams(orgId, page, pageSize, userId)` filters on `userId=={user.dbId}` (unquoted) rather than a team-id list. `multimediaProfileId` resolves team → site. Auxiliary codes return the full organization pool with no per-agent restriction, while `Profile.idleCodesAccess` / `wrapupCodesAccess` still report `ALL` / `SPECIFIC`. Dial plans are filtered on `active`. Microsoft/Webex presence config is read from org level. | **not additive — breaking.** Removal: `DesktopProfileResponse` (renamed to `AgentProfile`), `URLMapping`, `AIFeatureFlagsResponse`, `Profile.environment`, and seven service methods. Payload reinterpretation: `Profile.callVariablesSuppressed` `string` → `boolean`. Semantic break: `getListOfTeams` filter meaning; unrestricted auxiliary-code pool; `webexConfig.stateSynchronizationWebex` may flip `false` → `true`. Type correction: `Profile.teams` `Team[]` → `TeamList[]`, matching what the team API has always returned. Ships as a **major version** — the release commit carries a `BREAKING CHANGE:` body and consumer notes live in `ai-docs/features/desktop-login-aggregate-migration/migration-notes.md`. | `ai-docs/features/desktop-login-aggregate-migration/migration-notes.md`, `src/services/config/ai-docs/config-spec.md` | `src/index.ts`, `src/services/config/index.ts`, `src/services/config/types.ts`, `src/services/config/constants.ts`, `src/services/config/Util.ts` |
23
- | `contact-center.agent-wellness-break` | Contact Center / Services / Config | `Profile.isWellnessBreakEnabled`, optional `Profile.agentSessionId` after logged-in registration, `requestWellnessBreak`, `respondToWellnessBreak`, `getWellbeingBreakIdleCode`, `WELLNESS_BREAK_NOTIFICATION_ACTIONS`, `WELLNESS_BREAK_USER_ACTIONS`, `WellnessBreakEvent` | Effective gate = backend-delivered `agentWellbeing.enable` + reminders `ENABLED` + `aiAssistantQuantity > 0`; registration projects the SDK-owned active station session after silent relogin so hosts can validate refresh recovery. Action calls accept no identity or context-mutating fields, read the current organization/agent/session from a read-only provider supplied to ApiAIAssistant at construction, and POST a direct `WellnessBreakAction` custom event; current-session logout, multi-login close, relogin, and deregistration entry update or invalidate the provider's source state; system idle code lookup is exact, registration-generation cached, and rejects stale results; valid wellness notifications from either primary or RTD sockets emit the same public event. | additive semver public; no client-side Split dependency or invented rollout field—the delivered AI feature configuration is the server rollout boundary | `ai-docs/contact-center-spec.md`, `src/services/ai-docs/services-spec.md`, `src/services/config/ai-docs/config-spec.md` | `src/index.ts`, `src/types.ts`, `src/cc.ts`, `src/services/config/types.ts`, `src/services/ApiAiAssistant.ts` |
24
-
25
- ### Events
26
-
27
- | Contract ID | Owner module | Event / topic | Direction | Payload schema link | Delivery guarantees | Compatibility / deprecation | Defined at |
28
- |---|---|---|---|---|---|---|---|
29
- | `agent.events` | Agent | `agent:*` | publish to application | agent spec/types | realtime; backend ordering/correlation | additive constants | `src/services/agent/types.ts` |
30
- | `task.events` | Task | `task:*`, including existing `task:hydrate` and `task:wrapup` | consume/map backend task lifecycle events, then publish to application/task | task spec `TASK-R-010` / `TASK-R-011` / types | `ContactOwnerChanged` and owner-changing `ContactUpdated` route through `CONTACT_OWNER_CHANGED`; a complete promoted-current-Agent owner change may narrowly recover a missing task; consumers receive one `task:hydrate` and no synthetic `task:incoming`. TaskManager stamps `wrapUpRequired` once at ingress (`AGENT_WRAPUP`, conference-end/leave/transfer when this agent should wrap; HTTP `exitConference` on Voice uses the same empty-pending self-exit fallback as leave — true unless this agent is a consulted non-owner — and pending-list precedence uses the correlated response only) so consumers may receive `task:wrapup` and `task.autoWrapup` on those events. `PARTICIPANT_LEAVE` into `WRAPPING_UP` does not transition-emit; the `WRAPPING_UP` entry still emits `task:wrapup`. A nonempty `agentsPendingWrapUp` wins over transfer initiator signals (`consultingAgentId` / `transferConferenceRequested`); a named other `participantId` is never self-leave; leave wrap-up is not stamped when the actor ignores `PARTICIPANT_LEAVE` (`CONNECTED`, `HOLD_INITIATING`, `CONF_INITIATING`); leave-self with empty/absent pending stamps true unless this agent is a consulted non-owner; remaining conference agents stay unstamped. Profile-gated auto wrap-up still requires `autoWrapup !== false`, interval, and a default reason | compatible semantic extension of existing events; no new event constant; backend `interaction.owner` remains authoritative | `src/services/task/TaskManager.ts`, `src/services/task/Task.ts`, `src/services/task/voice/Voice.ts`, `src/services/task/types.ts` |
31
- | `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` |
32
- | `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` |
33
- | `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` |
34
- | `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` |
35
- | `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` |
36
- | `contact-center.browser-voice-state.events` | Contact Center / Calling | `voice:connectionStateChange` | Calling service updates emitted on the Contact Center plugin event surface | `VoiceConnectionState` | Emits only when the snapshot changes; line and Mobius transport remain separate; a keepalive `RECONNECTED` event does not clear an active Mobius disconnect cause | additive | `src/services/WebCallingService.ts`, `src/services/config/types.ts`, `src/cc.ts` |
37
-
38
- ### Telemetry / Metrics Events
39
-
40
- | Contract ID | Owner module | Event constant | Wire name | Payload schema link | Tags | Defined at |
41
- |---|---|---|---|---|---|---|
42
- | `metrics.wxapp-offer-participant-fields-missing` | Task / Metrics | `WXAPP_OFFER_PARTICIPANT_FIELDS_MISSING` | `WxApp Offer Participant Fields Missing` | `src/metrics/ai-docs/metrics-spec.md` | operational, behavioral | `src/metrics/constants.ts`, `src/services/task/voice/wxAppOfferObservability.ts` |
43
-
44
- ## Requires — what this repo depends on
45
-
46
- | Dependency | What is consumed | Schema / detail link | Availability assumption | Fallback on failure | Version floor |
47
- |---|---|---|---|---|---|
48
- | `@webex/webex-core` | plugin host, request/service routing | package declarations | required | fail operation | workspace version |
49
- | WCC REST/WebSocket | agent/task/config/realtime contracts | module specs and source constants | required for runtime operations | structured error, reconnect, or timeout | remote compatible contract |
50
- | `@webex/calling` | browser line/call lifecycle | Services/Task specs | required for BROWSER login | surface calling failure | workspace version |
51
- | internal metrics/mercury/support/auth/logger | telemetry, realtime, support, identity, logging | package declarations | host-dependent | module-specific nonblocking/error path | workspace version |
52
-
53
- ## Compatibility & Deprecation Policy
54
-
55
- - **Breaking-change rule:** no removal, rename, payload reinterpretation, or semantic break without major-version migration and consumer notes.
56
- - **Deprecation:** mark symbols/types in source/JSDoc, retain through an announced transition, and update changelog/spec/catalog together.
57
-
58
- ## Detailed Interface Docs
59
-
60
- - No OpenAPI/AsyncAPI/proto schema was found in scope; exact SDK and event contracts remain in TypeScript declarations and owning module specs.
61
-
62
- ## Maintenance
63
-
64
- - Update this catalog, the owning module spec, TypeScript declarations, and manifest in the same change as a contract.
@@ -1,168 +0,0 @@
1
- # Getting Started — @webex/contact-center
2
-
3
- > Start here → root [`AGENTS.md`](../AGENTS.md) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md).
4
-
5
- ## Prerequisites
6
- - Node.js 22.14 for workspace development; the published package engine floor remains Node >=20.x. Use Yarn 3.4.1 from the workspace.
7
- - Access to the workspace's npm registries and Webex backend environments is required for integration use.
8
-
9
- The `@webex/contact-center` package is a Webex SDK plugin that provides a TypeScript/JavaScript API for building Contact Center agent applications. It enables:
10
-
11
- - **Agent Session Management**: Register, login, logout, state changes
12
-
13
- - **Task Handling**: Inbound/outbound calls, chat, transfers, conferences
14
-
15
- - **Real-time Events**: WebSocket-based notifications for agent and task events
16
-
17
- - **Browser-based Calling**: WebRTC integration for browser softphone
18
-
19
- - **Metrics & Diagnostics**: Built-in telemetry and log upload
20
-
21
- | Technology | Purpose |
22
- |---|---|
23
- | **TypeScript** | Primary language with strict mode |
24
-
25
- | Technology | Purpose |
26
- |---|---|
27
- | **WebexPlugin** | Base class from `@webex/webex-core` |
28
-
29
- | Technology | Purpose |
30
- |---|---|
31
- | **EventEmitter** | Event handling for real-time updates |
32
-
33
- | Technology | Purpose |
34
- |---|---|
35
- | **WebSocket** | Real-time communication with Contact Center |
36
-
37
- | Technology | Purpose |
38
- |---|---|
39
- | **WebRTC** | Browser-based calling (via WebCalling) |
40
-
41
- | Technology | Purpose |
42
- |---|---|
43
- | **Jest** | Unit testing framework |
44
-
45
- ## Clone & Install
46
- ```bash
47
- git clone https://github.com/webex/webex-js-sdk.git
48
- cd webex-js-sdk
49
- yarn install
50
- ```
51
-
52
- ## Build / Run / Test
53
- | Task | Command |
54
- |---|---|
55
- | Build | `yarn workspace @webex/contact-center build:src` |
56
- | Run locally | Consume through a Webex SDK host/application; this package has no standalone server. |
57
- | Test | `yarn workspace @webex/contact-center test:unit` |
58
- | Lint / format | `yarn workspace @webex/contact-center test:style` |
59
-
60
- ```bash
61
- yarn workspace @webex/contact-center build:src
62
-
63
- yarn workspace @webex/contact-center test:unit
64
-
65
- yarn workspace @webex/contact-center test:unit -- test/unit/spec/cc.ts
66
-
67
- yarn workspace @webex/contact-center test:style
68
- ```
69
-
70
- ## First-Run Verification
71
- - Run the unit suite and confirm Jest enforces the package's 85% global thresholds from `jest.config.js`.
72
-
73
- > AI-focused documentation for the `@webex/contact-center` package to enable LLM agents to effectively create, modify, and fix SDK code.
74
-
75
- Each service folder contains its own `ai-docs/` with:
76
-
77
- - `AGENTS.md` - Usage examples, API reference, quick start
78
-
79
- - `ARCHITECTURE.md` - Technical details, sequence diagrams, data flow
80
-
81
- | Service | AGENTS.md | ARCHITECTURE.md |
82
- |---|---|---|
83
- | Agent | [`src/services/agent/ai-docs/agent-spec.md`](../src/services/agent/ai-docs/agent-spec.md) | [`src/services/agent/ai-docs/agent-spec.md`](../src/services/agent/ai-docs/agent-spec.md) |
84
-
85
- | Service | AGENTS.md | ARCHITECTURE.md |
86
- |---|---|---|
87
- | Task | [`src/services/task/ai-docs/task-spec.md`](../src/services/task/ai-docs/task-spec.md) | [`src/services/task/ai-docs/task-spec.md`](../src/services/task/ai-docs/task-spec.md) |
88
-
89
- | Service | AGENTS.md | ARCHITECTURE.md |
90
- |---|---|---|
91
- | Config | [`src/services/config/ai-docs/config-spec.md`](../src/services/config/ai-docs/config-spec.md) | [`src/services/config/ai-docs/config-spec.md`](../src/services/config/ai-docs/config-spec.md) |
92
-
93
- | Service | AGENTS.md | ARCHITECTURE.md |
94
- |---|---|---|
95
- | Core | [`src/services/core/ai-docs/core-spec.md`](../src/services/core/ai-docs/core-spec.md) | [`src/services/core/ai-docs/core-spec.md`](../src/services/core/ai-docs/core-spec.md) |
96
-
97
- ## Configuration & Secrets
98
- - Runtime credentials and service routing come from the host Webex SDK and its environment configuration. Never hardcode or log tokens.
99
-
100
- ## Dev Environment
101
- - The package builds inside the Yarn workspace and consumes sibling `@webex/*` packages through workspace dependencies.
102
-
103
- ```text
104
- packages/@webex/contact-center/
105
- ├── AGENTS.md # Main orchestrator (start here — at package root)
106
- └── ai-docs/
107
- ├── README.md # This file
108
- ├── RULES.md # Coding standards
109
- ├── patterns/ # Pattern documentation
110
- │ ├── typescript-patterns.md
111
- │ ├── testing-patterns.md
112
- │ └── event-driven-patterns.md
113
- └── templates/ # Code generation templates
114
- ├── README.md
115
- ├── new-service/ # Creating new services
116
- ├── new-method/ # Adding methods
117
- ├── existing-service/ # Bug fixes, features
118
- └── documentation/ # Doc generation
119
- ```
120
-
121
- ```text
122
- ContactCenter (cc.ts)
123
- └── Services (singleton)
124
- ├── agent/ → Agent operations (login, logout, state)
125
- ├── task/ → Task operations (hold, transfer, wrapup)
126
- │ └── TaskManager → Task lifecycle
127
- ├── config/ → Configuration fetching
128
- ├── core/ → WebSocket, HTTP, utilities
129
- ├── AddressBook → Address book entries
130
- ├── EntryPoint → Entry points
131
- └── Queue → Queues
132
- ```
133
-
134
- ## Where to Go Next
135
- - Agent entry: `../AGENTS.md` · System shape: `ARCHITECTURE.md` · Routing: `SPEC_INDEX.md`
136
- - Conventions: `patterns/`, `RULES.md`, and the manifest-routed module specification for the target capability.
137
-
138
- | Document | Purpose |
139
- |---|---|
140
- | [AGENTS.md](../AGENTS.md) | **Start here** - Main AI agent orchestrator (at package root) |
141
-
142
- | Document | Purpose |
143
- |---|---|
144
- | [RULES.md](RULES.md) | Coding standards and conventions |
145
-
146
- | Document | Purpose |
147
- |---|---|
148
- | [patterns/](patterns/) | Pattern documentation |
149
-
150
- | Document | Purpose |
151
- |---|---|
152
- | [templates/](templates/) | Code generation templates |
153
-
154
- Start with the root [`AGENTS.md`](../AGENTS.md) for critical repository rules and the developer workflow, then use [`SPEC_INDEX.md`](SPEC_INDEX.md) to classify the task by owning module and open its canonical `*-spec.md`.
155
-
156
- When adding new features:
157
-
158
- 1. Update the relevant service's docs (use the table above to find the right file):
159
-
160
- - Service `AGENTS.md` — if usage/API surface changed
161
-
162
- - Service `ARCHITECTURE.md` — if data flow or architecture changed
163
-
164
- 2. Add new patterns to [`patterns/`](patterns/) if introducing new patterns
165
-
166
- 3. Update [`templates/`](templates/) if the workflow changes
167
-
168
- 4. Update the root [`AGENTS.md`](../AGENTS.md) if task routing or critical rules changed
@@ -1,43 +0,0 @@
1
- # Glossary — @webex/contact-center
2
-
3
- > Start here → root [`AGENTS.md`](../AGENTS.md) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md).
4
-
5
- ## Domain Terms
6
-
7
- | Term | Definition (one or two sentences) | Authoritative location (file/type) | Notes / synonyms to avoid |
8
- |---|---|---|---|
9
- | ContactCenter | Host-embedded Webex plugin exposing the package API. | `src/cc.ts` | Registered as `cc`. |
10
- | Agent Profile | Aggregated remote configuration used during an agent session. | `src/services/config/types.ts` | Do not call it durable local state. |
11
- | Task | Client representation of a contact-center interaction and its operations. | `src/services/task/Task.ts` | Backed by remote interaction data. |
12
- | AQM request | HTTP initiation whose success/failure may be delivered by correlated WebSocket notification. | `src/services/core/aqm-reqs.ts` | Not request-over-WebSocket. |
13
- | TaskEvent | Typed internal state-machine event mapped from API calls or backend events. | `src/services/task/state-machine/constants.ts` | Distinct from raw CC_EVENTS. |
14
- | PageCache | Five-minute in-memory cache for simple paginated data-service requests. | `src/utils/PageCache.ts` | Parameterized searches bypass it. |
15
-
16
- ## Abbreviations & Acronyms
17
-
18
- | Abbreviation | Expansion | Meaning in this repo |
19
- |---|---|---|
20
- | WCC | Webex Contact Center | Remote Contact Center service family. |
21
- | AQM | Agent Queue Manager | Backend operation/correlation pattern. |
22
- | RTD | Realtime data/transcription | Secondary realtime WebSocket stream. |
23
- | RONA | Ring On No Answer | Offered-task failure state/event. |
24
- | ANI | Automatic Number Identification | Outbound caller-id selection data. |
25
-
26
- ## Context-Specific Meanings
27
-
28
- | Term | Context / module | Meaning here |
29
- |---|---|---|
30
- | Event | Config/Core | Raw backend WebSocket event. |
31
- | Event | Task state machine | Typed TaskEvent after mapping. |
32
- | State | Agent | Backend agent availability/substatus. |
33
- | State | Task | XState task lifecycle state. |
34
-
35
- ## Deprecated / Renamed Terms
36
-
37
- | Old term | Current term | Why renamed | Still appears in |
38
- |---|---|---|---|
39
- | plugin-cc | contact-center | Package rename recorded in history. | Older history and integrations. |
40
-
41
- ## Maintenance
42
-
43
- - Add new entities, events, states, or renamed concepts here in the same change.
package/ai-docs/README.md DELETED
@@ -1,138 +0,0 @@
1
- # Contact Center SDK - AI Documentation
2
-
3
- > AI-focused documentation for the `@webex/contact-center` package to enable LLM agents to effectively create, modify, and fix SDK code.
4
-
5
- ---
6
-
7
- ## Package Overview
8
-
9
- The `@webex/contact-center` package is a Webex SDK plugin that provides a TypeScript/JavaScript API for building Contact Center agent applications. It enables:
10
-
11
- - **Agent Session Management**: Register, login, logout, state changes
12
- - **Task Handling**: Inbound/outbound calls, chat, transfers, conferences
13
- - **Real-time Events**: WebSocket-based notifications for agent and task events
14
- - **Browser-based Calling**: WebRTC integration for browser softphone
15
- - **Metrics & Diagnostics**: Built-in telemetry and log upload
16
-
17
- ---
18
-
19
- ## Technologies
20
-
21
- | Technology | Purpose |
22
- |------------|---------|
23
- | **TypeScript** | Primary language with strict mode |
24
- | **WebexPlugin** | Base class from `@webex/webex-core` |
25
- | **EventEmitter** | Event handling for real-time updates |
26
- | **WebSocket** | Real-time communication with Contact Center |
27
- | **WebRTC** | Browser-based calling (via WebCalling) |
28
- | **Jest** | Unit testing framework |
29
-
30
- ---
31
-
32
- ## Quick Links
33
-
34
- | Document | Purpose |
35
- |----------|---------|
36
- | [AGENTS.md](../AGENTS.md) | **Start here** - Main AI agent orchestrator (at package root) |
37
- | [SPEC_INDEX.md](SPEC_INDEX.md) | Route work to the owning canonical module specification |
38
- | [RULES.md](RULES.md) | Coding standards and conventions |
39
- | [patterns/](patterns/) | Pattern documentation |
40
- | [templates/](templates/) | Code generation templates |
41
-
42
- ---
43
-
44
- ## For AI Agents
45
-
46
- ### Starting a Task
47
-
48
- Start with the root [`AGENTS.md`](../AGENTS.md) for critical repository rules and the developer workflow, then use [`SPEC_INDEX.md`](SPEC_INDEX.md) to classify the task by owning module and open its canonical `*-spec.md`.
49
-
50
- ---
51
-
52
- ## Directory Structure
53
-
54
- ```
55
- packages/@webex/contact-center/
56
- ├── AGENTS.md # Main orchestrator (start here — at package root)
57
- └── ai-docs/
58
- ├── README.md # This file
59
- ├── SPEC_INDEX.md # Canonical module router
60
- ├── contact-center-spec.md # Canonical public plugin specification
61
- ├── CONTRACTS.md # Public contract catalog
62
- ├── adr/ # Durable architecture decisions
63
- ├── RULES.md # Coding standards
64
- ├── patterns/ # Pattern documentation
65
- │ ├── typescript-patterns.md
66
- │ ├── testing-patterns.md
67
- │ └── event-driven-patterns.md
68
- └── templates/ # Code generation templates
69
- ├── README.md
70
- ├── new-service/ # Creating new services
71
- ├── new-method/ # Adding methods
72
- ├── existing-service/ # Bug fixes, features
73
- └── documentation/ # Doc generation
74
- ```
75
-
76
- ---
77
-
78
- ## Package Commands
79
-
80
- ```bash
81
- # Build
82
- yarn workspace @webex/contact-center build:src
83
-
84
- # Test unit tests
85
- yarn workspace @webex/contact-center test:unit
86
-
87
- # Test specific file
88
- yarn workspace @webex/contact-center test:unit -- <path_of_test_file>
89
-
90
- # Lint
91
- yarn workspace @webex/contact-center test:style
92
- ```
93
-
94
- ---
95
-
96
- ## Service Architecture
97
-
98
- ```
99
- ContactCenter (cc.ts)
100
- └── Services (singleton)
101
- ├── agent/ → Agent operations (login, logout, state)
102
- ├── task/ → Task operations (hold, transfer, wrapup)
103
- │ └── TaskManager → Task lifecycle
104
- ├── config/ → Configuration fetching
105
- ├── core/ → WebSocket, HTTP, utilities
106
- ├── AddressBook → Address book entries
107
- ├── EntryPoint → Entry points
108
- └── Queue → Queues
109
- ```
110
-
111
- ---
112
-
113
- ## Canonical Module Specifications
114
-
115
- Use [`SPEC_INDEX.md`](SPEC_INDEX.md) to select the owning module. Each manifest-routed module has one canonical `*-spec.md`; retained module-level `AGENTS.md` and `ARCHITECTURE.md` files are legacy/reference-only migration sources, as recorded in [`ADR-0001`](adr/0001-spec-source-policy.md).
116
-
117
- | Module | Canonical specification |
118
- |---|---|
119
- | Contact Center public plugin | [`contact-center-spec.md`](contact-center-spec.md) |
120
- | Metrics | [`metrics-spec.md`](../src/metrics/ai-docs/metrics-spec.md) |
121
- | Services composition | [`services-spec.md`](../src/services/ai-docs/services-spec.md) |
122
- | Agent | [`agent-spec.md`](../src/services/agent/ai-docs/agent-spec.md) |
123
- | Config | [`config-spec.md`](../src/services/config/ai-docs/config-spec.md) |
124
- | Core | [`core-spec.md`](../src/services/core/ai-docs/core-spec.md) |
125
- | Task | [`task-spec.md`](../src/services/task/ai-docs/task-spec.md) |
126
- | Task state machine | [`task-state-machine-spec.md`](../src/services/task/state-machine/ai-docs/task-state-machine-spec.md) |
127
- | Utils | [`utils-spec.md`](../src/utils/ai-docs/utils-spec.md) |
128
-
129
- ---
130
-
131
- ## Contributing to AI Docs
132
-
133
- When adding new features:
134
- 1. Use [`SPEC_INDEX.md`](SPEC_INDEX.md) to select the owning canonical module specification.
135
- 2. Update that `*-spec.md` with the behavior, source evidence, test evidence, and known gaps.
136
- 3. For exported API, event, or type changes, also update [`CONTRACTS.md`](CONTRACTS.md), the Contact Center specification, and `.sdd/manifest.json` when its routing, coverage, or validation evidence changes.
137
- 4. Add or update [`patterns/`](patterns/) and [`templates/`](templates/) only when their reusable guidance changes.
138
- 5. Update the root [`AGENTS.md`](../AGENTS.md) when task routing or critical rules change. Do not update retained service `AGENTS.md` or `ARCHITECTURE.md` as an independent source of truth.
@@ -1,41 +0,0 @@
1
- # Review-Check Catalog — @webex/contact-center
2
-
3
- > Run by a runtime different from the generator. Findings remain drafts until explicitly published.
4
-
5
- ## Core checks (always run)
6
-
7
- | # | Check | What it verifies | Severity if it fails |
8
- |---|---|---|---|
9
- | C1 | Spec-currency + WHAT/WHY | Specs/docs and code land together; every requirement states WHAT and WHY | Blocking |
10
- | C2 | Contract correctness | Provides/Requires and public API/event/type deltas are complete | Blocking |
11
- | C3 | Code-vs-spec match | Signatures, flows, states, timeouts, and architecture match code | Blocking |
12
- | C4 | Test adequacy | Positive/negative cases and 85% package threshold | Important |
13
- | C5 | Error handling/input validation | Structured failures, tracking ids, validation, no swallowed errors | Important |
14
- | C6 | Security baseline | Host auth, no secrets/sensitive logs, safe transport mapping | Blocking |
15
-
16
- ## Coverage-conditional checks (run by the touched module's manifest coverage state)
17
-
18
- | # | Check | When it applies | What it verifies | Severity |
19
- |---|---|---|---|---|
20
- | K1 | Regression guard | Partial module or modified/removed guarantee | Characterization and invariants | Blocking |
21
- | K2 | Grounding | Partial module | Stable file-path evidence; code cross-check | Important |
22
- | K3 | Drift threshold | Any tracked module | Drift remains within policy | Important |
23
- | K4 | Coverage-state accuracy | Promotion/demotion | Status matches evidence | Medium |
24
-
25
- ## Cross-cutting checks
26
-
27
- | # | Check | What it verifies | Severity |
28
- |---|---|---|---|
29
- | X1 | Cross-runtime review | Validator differs from Codex generator | Blocking |
30
- | X2 | Observability | LoggerProxy/metrics adequate; no sensitive logging | Medium |
31
- | X3 | Rollout safety | Defaults, compatibility, rollback/recovery safe | Important |
32
-
33
- ## How the set is selected
34
-
35
- 1. Run all six core checks.
36
- 2. Add K1–K4 for current Partial modules.
37
- 3. Add X1–X3 for high-risk, contract, security, state, transport, or autonomous changes.
38
-
39
- ## Output
40
-
41
- - Compliance matrix, severity-sorted findings, and Pass / Pass-with-warnings / Blocked verdict. Draft only.