@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
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/internal-plugin-call-ai-summary",
|
|
5
|
+
"purpose": "A Webex internal plugin for AI-generated call summary retrieval. Resolves a Pragya container for a call, fetches AI Bridge summary, notes, action-item, and transcript content, and returns it decrypted through the Webex KMS encryption plugin.",
|
|
6
|
+
"category": "cat1-legacy",
|
|
7
|
+
"primary_languages": [
|
|
8
|
+
"typescript"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"topology": "Single-repo",
|
|
12
|
+
"commands": {
|
|
13
|
+
"install": {
|
|
14
|
+
"command": "yarn install",
|
|
15
|
+
"source_file": "package.json",
|
|
16
|
+
"role": "install"
|
|
17
|
+
},
|
|
18
|
+
"build": {
|
|
19
|
+
"command": "yarn build",
|
|
20
|
+
"source_file": "package.json",
|
|
21
|
+
"role": "build"
|
|
22
|
+
},
|
|
23
|
+
"compile": {
|
|
24
|
+
"command": "yarn build:src",
|
|
25
|
+
"source_file": "package.json",
|
|
26
|
+
"role": "compile"
|
|
27
|
+
},
|
|
28
|
+
"lint": {
|
|
29
|
+
"command": "yarn test:style",
|
|
30
|
+
"source_file": "package.json",
|
|
31
|
+
"role": "lint"
|
|
32
|
+
},
|
|
33
|
+
"unit-test": {
|
|
34
|
+
"command": "yarn test:unit",
|
|
35
|
+
"source_file": "package.json",
|
|
36
|
+
"role": "unit-test"
|
|
37
|
+
},
|
|
38
|
+
"test-all": {
|
|
39
|
+
"command": "yarn test",
|
|
40
|
+
"source_file": "package.json",
|
|
41
|
+
"role": "other"
|
|
42
|
+
},
|
|
43
|
+
"deploy": {
|
|
44
|
+
"command": "yarn deploy:npm",
|
|
45
|
+
"source_file": "package.json",
|
|
46
|
+
"role": "deploy"
|
|
47
|
+
},
|
|
48
|
+
"manual-pragya-check": {
|
|
49
|
+
"command": "node src/manual-pragya-api-test.js",
|
|
50
|
+
"source_file": "src/manual-pragya-api-test.js",
|
|
51
|
+
"role": "other"
|
|
52
|
+
},
|
|
53
|
+
"manual-integration-check": {
|
|
54
|
+
"command": "node src/manual-integration-test.js",
|
|
55
|
+
"source_file": "src/manual-integration-test.js",
|
|
56
|
+
"role": "other"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"toolchain": [
|
|
60
|
+
{
|
|
61
|
+
"name": "node",
|
|
62
|
+
"version": ">=16",
|
|
63
|
+
"origin": "repo-config",
|
|
64
|
+
"source_file": "package.json"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "yarn",
|
|
68
|
+
"version": "berry (workspace protocol)",
|
|
69
|
+
"origin": "repo-config",
|
|
70
|
+
"source_file": "package.json"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"quality_gates": {
|
|
74
|
+
"code_coverage": {
|
|
75
|
+
"origin": "none",
|
|
76
|
+
"declared_by": "@riag (repository owner; verified in the 2026-09-23 bootstrap questionnaire that no repo-specific coverage gate applies to this package)"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"coverage_status_definitions": {
|
|
80
|
+
"specced": ">=80% public surface specced, drift <5% \u2014 spec is authoritative",
|
|
81
|
+
"partial": "40-80% specced \u2014 spec is a hint, cross-check code",
|
|
82
|
+
"untracked": "<40% specced \u2014 code is the source of truth"
|
|
83
|
+
},
|
|
84
|
+
"template_migration": {
|
|
85
|
+
"status": "validated",
|
|
86
|
+
"target_source": "repo-standards",
|
|
87
|
+
"target_source_commit": "d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
88
|
+
"detected_footprints": [
|
|
89
|
+
"ai-docs"
|
|
90
|
+
],
|
|
91
|
+
"old_template_disposition": "retain",
|
|
92
|
+
"decided_by": "@riag",
|
|
93
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
94
|
+
},
|
|
95
|
+
"spec_source_policy": {
|
|
96
|
+
"mode": "reconcile",
|
|
97
|
+
"migrated_source_disposition": "delete-after-validation",
|
|
98
|
+
"disposition_decided_by": "@riag",
|
|
99
|
+
"disposition_decided_at": "2026-09-23T15:20:00Z",
|
|
100
|
+
"decided_by": "@riag",
|
|
101
|
+
"decided_at": "2026-09-23T05:24:48Z",
|
|
102
|
+
"decision_record": ".generated/sdd/spec-source-policy/decision.md"
|
|
103
|
+
},
|
|
104
|
+
"spec_sources": [
|
|
105
|
+
{
|
|
106
|
+
"path": "ai-docs/ARCHITECTURE.md",
|
|
107
|
+
"scope": "repo",
|
|
108
|
+
"role": "superseded",
|
|
109
|
+
"canonical": false,
|
|
110
|
+
"use_by_agents": "source-for-reconciliation",
|
|
111
|
+
"canonical_target": "docs/architecture.md",
|
|
112
|
+
"post_migration_action": "delete-after-validation",
|
|
113
|
+
"deletion_status": "deleted",
|
|
114
|
+
"notes": "1189-line pre-implementation design/intent document. This entry routes its repo-scope half: sections 1-3, 8, 10 and 13 reconcile into docs/architecture.md, and section 1.2 Key Design Decisions reconciles into docs/adr/. Its module-scope half is routed by the separate src/ entry below. Section 6.4 pseudo-code and section 11.1 test-suite block are executable-contract units routed under the Migrated Executable Contract Gate and are not copied into canonical documents. Retained permanently as the audit trail; never a deletion candidate. DELETED 2026-09-23 after independent validation passed (codex, 0 blocking): content reconciled into the canonical docs, the drafted unit-test suite salvaged into test/unit/spec/ai-summary.ts, and the upstream wire samples salvaged into test/unit/fixture/responses.ts. Recoverable from commit 3db31e87c7."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"path": "ai-docs/ARCHITECTURE.md",
|
|
118
|
+
"scope": "module",
|
|
119
|
+
"module": "src/",
|
|
120
|
+
"role": "superseded",
|
|
121
|
+
"canonical": false,
|
|
122
|
+
"use_by_agents": "source-for-reconciliation",
|
|
123
|
+
"canonical_target": "src/docs/README.md",
|
|
124
|
+
"post_migration_action": "delete-after-validation",
|
|
125
|
+
"deletion_status": "deleted",
|
|
126
|
+
"notes": "Module-scope half of the same design document. Sections 4-7, 9, 11 and 12 (SDK method interfaces, DTOs, low-level design, wire-level request/response detail, error handling, testing strategy, package structure) reconcile into the module spec. Per-unit routing across both halves is authoritative in the source-fidelity inventories, not in this single primary route. DELETED 2026-09-23 after independent validation passed (codex, 0 blocking): content reconciled into the canonical docs, the drafted unit-test suite salvaged into test/unit/spec/ai-summary.ts, and the upstream wire samples salvaged into test/unit/fixture/responses.ts. Recoverable from commit 3db31e87c7."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"path": "ai-docs/AGENTS.md",
|
|
130
|
+
"scope": "repo",
|
|
131
|
+
"role": "superseded",
|
|
132
|
+
"canonical": false,
|
|
133
|
+
"use_by_agents": "source-for-reconciliation",
|
|
134
|
+
"canonical_target": "AGENTS.md",
|
|
135
|
+
"post_migration_action": "delete-after-validation",
|
|
136
|
+
"deletion_status": "deleted",
|
|
137
|
+
"notes": "Human-authored agent guidance plus API reference. Not a canonical overlap: it sits at ai-docs/AGENTS.md while the canonical agent entry is the package-root AGENTS.md, which does not currently exist. Documents only 5 public methods and omits getTranscript, which is corrected from src/ai-summary.ts. Retained permanently. DELETED 2026-09-23 after independent validation passed (codex, 0 blocking): content reconciled into the canonical docs, the drafted unit-test suite salvaged into test/unit/spec/ai-summary.ts, and the upstream wire samples salvaged into test/unit/fixture/responses.ts. Recoverable from commit 3db31e87c7."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"path": "README.md",
|
|
141
|
+
"scope": "repo",
|
|
142
|
+
"role": "source-material",
|
|
143
|
+
"canonical": false,
|
|
144
|
+
"use_by_agents": "source-for-reconciliation",
|
|
145
|
+
"canonical_target": "docs/getting-started.md",
|
|
146
|
+
"post_migration_action": "retain",
|
|
147
|
+
"deletion_status": "not-applicable",
|
|
148
|
+
"notes": "Native npm-facing package documentation and the only source documenting getTranscript, the error Cause/Recovery columns, the keyUrl-over-encryptionKeyUrl fallback rule, and the end-to-end Janus-to-Pragya usage example. Install/Prerequisites/Development/Manual Testing reconcile into docs/getting-started.md; Overview into docs/index.md; the API section is contract evidence for the module spec. Remains the authoritative npm readme in place and is never a deletion candidate. Its stale Package Structure block was corrected in place at publication on 2026-09-23: pre-correction sha256 6346708224c1d3ad8371e15190f6125571e70a85d64d00a50f4cad04a14908e7, post-correction sha256 981b206a902652e389cca97e74f8012ab919fc22ac63d7aa6d2d92147a821dce. The source-fidelity inventories record the pre-correction source state, which is the migration basis; unit SF-0050 is the stale record of the removed claim."
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"modules": [
|
|
152
|
+
{
|
|
153
|
+
"path": "src/",
|
|
154
|
+
"coverage_status": "Specced",
|
|
155
|
+
"coverage_evidence": "Public surface 100% specced at src/docs/README.md: all six public methods and all ten exported types are documented, and independent validation (codex, 2026-09-23) reported B1 signature match and B4 type match PASS with no drift. Behavior is verified by 38 unit tests in test/unit/spec/ai-summary.ts covering plugin registration, every public method, the summaryData.data flattening transform, the keyUrl precedence rule, all validation branches and each normalized error mapping. No requirement is without unit evidence.",
|
|
156
|
+
"canonical_spec": "src/docs/README.md",
|
|
157
|
+
"contracts": {
|
|
158
|
+
"provides": [
|
|
159
|
+
"aisummary-sdk",
|
|
160
|
+
"aisummary-package-entry",
|
|
161
|
+
"aisummary-types"
|
|
162
|
+
],
|
|
163
|
+
"requires": [
|
|
164
|
+
"pragya-containers-http",
|
|
165
|
+
"ai-bridge-content-http",
|
|
166
|
+
"webex-encryption-sdk"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"last_assessed": "2026-09-23",
|
|
170
|
+
"section_profile": {
|
|
171
|
+
"has_ui": false,
|
|
172
|
+
"crosses_service_boundaries": true,
|
|
173
|
+
"enforces_domain_rules": false,
|
|
174
|
+
"is_concurrent_async": true,
|
|
175
|
+
"owns_persistence": false,
|
|
176
|
+
"returns_caller_errors": true,
|
|
177
|
+
"has_design_tradeoff": true,
|
|
178
|
+
"stateful_transitions": false,
|
|
179
|
+
"exposes_wire_protocol": false,
|
|
180
|
+
"ui_multi_screen": false,
|
|
181
|
+
"large_data_model": false,
|
|
182
|
+
"has_tiers": false,
|
|
183
|
+
"module_specific_conventions": false,
|
|
184
|
+
"published_package": true,
|
|
185
|
+
"embedded_in_host": false,
|
|
186
|
+
"holds_client_state": false,
|
|
187
|
+
"has_submodules": false,
|
|
188
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
189
|
+
"has_submodules_computed_at": "2026-09-23T05:24:48Z",
|
|
190
|
+
"resolved_by": "claude-code/claude-opus-5[1m] (host metadata; code-grounded from src/ai-summary.ts, src/types.ts, src/index.ts and package.json)",
|
|
191
|
+
"resolved_at": "2026-09-23T05:24:48Z"
|
|
192
|
+
},
|
|
193
|
+
"source_policy": {
|
|
194
|
+
"mode": "reconcile",
|
|
195
|
+
"existing_sources": [
|
|
196
|
+
"ai-docs/ARCHITECTURE.md",
|
|
197
|
+
"ai-docs/AGENTS.md",
|
|
198
|
+
"README.md"
|
|
199
|
+
],
|
|
200
|
+
"conflict_status": "resolved",
|
|
201
|
+
"decision_record": ".generated/sdd/spec-source-policy/decision.md"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"contract_catalog": {
|
|
206
|
+
"index_path": "docs/architecture.md",
|
|
207
|
+
"definitions": {
|
|
208
|
+
"aisummary-sdk": {
|
|
209
|
+
"kind": "sdk",
|
|
210
|
+
"publication": "internal",
|
|
211
|
+
"source_kind": "repository-path",
|
|
212
|
+
"source": "src/ai-summary.ts",
|
|
213
|
+
"summary": "Internal Webex SDK plugin surface reached as webex.internal.aisummary, registered by registerInternalPlugin('aisummary', ...) in src/index.ts. Six public methods declared here: getContainer, getSummary, getNotes, getActionItems, getTranscriptUrl (synchronous) and getTranscript."
|
|
214
|
+
},
|
|
215
|
+
"aisummary-package-entry": {
|
|
216
|
+
"kind": "sdk",
|
|
217
|
+
"publication": "internal",
|
|
218
|
+
"source_kind": "repository-path",
|
|
219
|
+
"source": "src/index.ts",
|
|
220
|
+
"summary": "Package entry point. Calls registerInternalPlugin('aisummary', AISummary, {config}), imports @webex/internal-plugin-encryption for its side effects, and re-exports the plugin as the package default. Importing the package is what makes webex.internal.aisummary available."
|
|
221
|
+
},
|
|
222
|
+
"aisummary-types": {
|
|
223
|
+
"kind": "sdk",
|
|
224
|
+
"publication": "internal",
|
|
225
|
+
"source_kind": "repository-path",
|
|
226
|
+
"source": "src/types.ts",
|
|
227
|
+
"summary": "Ten exported TypeScript interfaces forming the typed request/response surface: PragyaSummaryData, PragyaContainerResponse, GetContainerOptions, GetSummaryContentOptions, SummaryContent, SummaryNotes, ActionItemSnippet, SummaryActionItems, TranscriptSnippet, TranscriptContent."
|
|
228
|
+
},
|
|
229
|
+
"pragya-containers-http": {
|
|
230
|
+
"kind": "http",
|
|
231
|
+
"publication": "published",
|
|
232
|
+
"source_kind": "external",
|
|
233
|
+
"source": "Webex service-catalog service 'pragya', resource 'containers/{containerId}' (AI_SUMMARY_SERVICE and AI_SUMMARY_CONTAINERS_RESOURCE in src/constants.ts)",
|
|
234
|
+
"summary": "Upstream Pragya container-lookup API consumed by getContainer. Owned by the Pragya service, not by this repository. The response nests summary URLs under summaryData.data, which getContainer flattens onto summaryData."
|
|
235
|
+
},
|
|
236
|
+
"ai-bridge-content-http": {
|
|
237
|
+
"kind": "http",
|
|
238
|
+
"publication": "published",
|
|
239
|
+
"source_kind": "external",
|
|
240
|
+
"source": "AI Bridge absolute URLs supplied at runtime by PragyaSummaryData: summaryUrl, notesUrl, actionItemsUrl and transcriptUrl",
|
|
241
|
+
"summary": "Upstream AI Bridge content endpoints consumed by getSummary, getNotes, getActionItems and getTranscript. Owned by AI Bridge, not by this repository. Returns KMS-encrypted content plus an optional per-response keyUrl that takes precedence over containerInfo.encryptionKeyUrl."
|
|
242
|
+
},
|
|
243
|
+
"webex-encryption-sdk": {
|
|
244
|
+
"kind": "sdk",
|
|
245
|
+
"publication": "internal",
|
|
246
|
+
"source_kind": "external",
|
|
247
|
+
"source": "@webex/internal-plugin-encryption (workspace package; webex.internal.encryption.decryptText)",
|
|
248
|
+
"summary": "Sibling workspace plugin providing KMS/JWE decryption. Consumed by the private _decryptContent helper for every content field returned by this module. Declared as a workspace dependency in package.json and imported for side effects in src/index.ts."
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"spec_policy": {
|
|
253
|
+
"require_what_and_why": true,
|
|
254
|
+
"require_provenance": true,
|
|
255
|
+
"protected_specs": [
|
|
256
|
+
"src/docs/README.md"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"validation": {
|
|
260
|
+
"generator_runtime": "claude-code",
|
|
261
|
+
"generator_model": "claude-opus-5[1m]",
|
|
262
|
+
"generator_runtime_source": "host-metadata",
|
|
263
|
+
"validator_runtime": "codex",
|
|
264
|
+
"validator_runtime_source": "invocation-input",
|
|
265
|
+
"validator_run_id": "01a0cd0c-f017-7f92-9179-5c6f54d46814",
|
|
266
|
+
"minimum_independence": "different-runtime",
|
|
267
|
+
"runtime_fallback_tier": "different-runtime",
|
|
268
|
+
"blocking_severities": [
|
|
269
|
+
"Blocking"
|
|
270
|
+
],
|
|
271
|
+
"generator_run_id": "call-ai-summary-migration-20260923-052025",
|
|
272
|
+
"source_commit": "bc61c78ba5",
|
|
273
|
+
"base_ref": "main",
|
|
274
|
+
"head_ref": "ai-summary"
|
|
275
|
+
},
|
|
276
|
+
"layout": {
|
|
277
|
+
"sdd_root": ".sdd",
|
|
278
|
+
"docs_root": "docs",
|
|
279
|
+
"agent_entry_path": "AGENTS.md",
|
|
280
|
+
"standing_docs_root": "docs",
|
|
281
|
+
"spec_index_path": "docs/specs/README.md",
|
|
282
|
+
"module_docs_strategy": "source-local",
|
|
283
|
+
"module_docs_relative_path": "docs/README.md",
|
|
284
|
+
"module_docs_decision": {
|
|
285
|
+
"basis": "repo-standards-default",
|
|
286
|
+
"reason": "The package has no pre-existing module-local documentation convention. ai-docs/ holds repo-scope design documents rather than module specs, and it cannot serve as the standing docs root: the filesystem is case-insensitive, so the canonical lowercase docs/architecture.md would collide with the existing ai-docs/ARCHITECTURE.md, which the policy refuses as a case-variant pair rather than an overlap. standing_docs_root is additionally enum-locked to docs by the manifest schema. The source-local default src/docs/README.md therefore applies unchanged.",
|
|
287
|
+
"decided_by": "@riag",
|
|
288
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
289
|
+
},
|
|
290
|
+
"repo_context_decision": {
|
|
291
|
+
"path": ".repo-context.json",
|
|
292
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
293
|
+
"action": "create",
|
|
294
|
+
"schema_action": "create",
|
|
295
|
+
"reason": "No repository operational-context manifest or schema exists in this package; both are created from verified repository evidence.",
|
|
296
|
+
"decided_by": "@riag",
|
|
297
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
298
|
+
},
|
|
299
|
+
"artifact_decisions": [
|
|
300
|
+
{
|
|
301
|
+
"path": "docs/service.md",
|
|
302
|
+
"action": "omit",
|
|
303
|
+
"reason": "This package is a published SDK plugin library, not a deployable service. It has no deployment surface, no runtime of its own, and no infrastructure configuration.",
|
|
304
|
+
"decided_by": "@riag",
|
|
305
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"path": "api-specs/openapi.yaml",
|
|
309
|
+
"action": "omit",
|
|
310
|
+
"reason": "No repository-owned HTTP API exists. The package is a consumer of two upstream services (Pragya, AI Bridge) and publishes a JS/TS SDK surface, so contracts stay on ecosystem-native artifacts. An empty paths scaffold is an explicit blocker.",
|
|
311
|
+
"decided_by": "@riag",
|
|
312
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"path": "mkdocs.yml",
|
|
316
|
+
"action": "omit",
|
|
317
|
+
"reason": "No MkDocs publishing workflow exists for this package or the surrounding monorepo.",
|
|
318
|
+
"decided_by": "@riag",
|
|
319
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"path": "SECURITY.md",
|
|
323
|
+
"action": "omit",
|
|
324
|
+
"reason": "Security policy is owned at the webex-js-sdk repository root, not per package.",
|
|
325
|
+
"decided_by": "@riag",
|
|
326
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"path": "CONTRIBUTING.md",
|
|
330
|
+
"action": "omit",
|
|
331
|
+
"reason": "Contribution guidance is owned at the webex-js-sdk repository root, not per package.",
|
|
332
|
+
"decided_by": "@riag",
|
|
333
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"path": "CHANGELOG.md",
|
|
337
|
+
"action": "omit",
|
|
338
|
+
"reason": "The monorepo generates changelogs centrally through its release tooling; a package-level changelog would diverge from it.",
|
|
339
|
+
"decided_by": "@riag",
|
|
340
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"path": "CTO_CHECKLIST.yml",
|
|
344
|
+
"action": "omit",
|
|
345
|
+
"reason": "No deployable service, so the package does not participate in the CTO readiness workflow.",
|
|
346
|
+
"decided_by": "@riag",
|
|
347
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
351
|
+
"action": "omit",
|
|
352
|
+
"reason": "No CTO checklist is selected, so its matching schema is not required.",
|
|
353
|
+
"decided_by": "@riag",
|
|
354
|
+
"decided_at": "2026-09-23T05:24:48Z"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"template_roots": {
|
|
358
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
359
|
+
},
|
|
360
|
+
"repo_skills_root": ".sdd/skills",
|
|
361
|
+
"contract_index_path": "docs/architecture.md"
|
|
362
|
+
},
|
|
363
|
+
"tooling": {
|
|
364
|
+
"sdlc_skills": {
|
|
365
|
+
"install_mode": "copy",
|
|
366
|
+
"installed_at": "2026-09-23T05:24:48Z",
|
|
367
|
+
"plugins": [
|
|
368
|
+
"repo-annotation@2.0.3"
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"substrate": {
|
|
373
|
+
"source": "the org repo-readiness standards (the repo-standards substrate)",
|
|
374
|
+
"consumed": [
|
|
375
|
+
"lint/format configs",
|
|
376
|
+
"base AGENTS.md"
|
|
377
|
+
],
|
|
378
|
+
"compliance_tier": "baseline"
|
|
379
|
+
},
|
|
380
|
+
"section_profiles": {
|
|
381
|
+
"repo": {
|
|
382
|
+
"owns_datastore": false,
|
|
383
|
+
"holds_client_state": false,
|
|
384
|
+
"components_interact": false,
|
|
385
|
+
"domain_data_across_components": false,
|
|
386
|
+
"caches_data": false,
|
|
387
|
+
"observability_convention": true,
|
|
388
|
+
"deploys_to_infra": false,
|
|
389
|
+
"shared_base_libs": true,
|
|
390
|
+
"is_monorepo": false,
|
|
391
|
+
"multi_platform": false,
|
|
392
|
+
"published_package": true,
|
|
393
|
+
"embedded_in_host": true,
|
|
394
|
+
"cross_repo_deps_material": true,
|
|
395
|
+
"security_arch_warranted": true,
|
|
396
|
+
"exposes_commands_or_artifacts": true
|
|
397
|
+
},
|
|
398
|
+
"resolved_by": "claude-code/claude-opus-5[1m] (host metadata; code-grounded from package.json, src/ and the routed source documents)",
|
|
399
|
+
"resolved_at": "2026-09-23T05:24:48Z"
|
|
400
|
+
},
|
|
401
|
+
"tests": {
|
|
402
|
+
"unit": {
|
|
403
|
+
"command_ref": "unit-test",
|
|
404
|
+
"dir": "test/unit/spec",
|
|
405
|
+
"framework": "jest"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: agent-entry
|
|
3
|
+
generated_from: agents@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
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
This is an internal Cisco Webex plugin. As such, it does not strictly adhere to semantic versioning. Use at your own risk. If you're not working on one of our first party clients, please look at our developer api and stick to our public plugins.
|
|
13
|
+
|
|
14
|
+
Internal Webex JS SDK plugin for retrieving AI-generated call summaries, notes, action items, and transcript URLs from the Pragya and AI Bridge services.
|
|
15
|
+
|
|
16
|
+
## Scope of this file
|
|
17
|
+
|
|
18
|
+
This file covers **only** `@webex/internal-plugin-call-ai-summary`. The repository-root
|
|
19
|
+
`AGENTS.md` owns monorepo-wide rules — Node toolchain, workspace command forms, cross-plugin
|
|
20
|
+
search and refactoring guidance — and stays authoritative for them. Read the root file first; this
|
|
21
|
+
file adds package-specific facts and records the two places where this package differs from the
|
|
22
|
+
repository-wide generalization.
|
|
23
|
+
|
|
24
|
+
Package-level agent entries are the established convention here: `packages/calling/AGENTS.md` and
|
|
25
|
+
`packages/@webex/contact-center/AGENTS.md` sit at the same position.
|
|
26
|
+
|
|
27
|
+
## Working Method
|
|
28
|
+
|
|
29
|
+
- Read the relevant repository files before editing. Do not edit blind.
|
|
30
|
+
- Understand the task and affected surfaces before writing code.
|
|
31
|
+
- Prefer focused edits over rewriting whole files.
|
|
32
|
+
- Do not invent commands, paths, exports, or behavior. Verify them from repository-local source.
|
|
33
|
+
- Test or validate before declaring done.
|
|
34
|
+
- Keep output concise. If something is uncertain, say so instead of guessing.
|
|
35
|
+
|
|
36
|
+
## Canonical Repository Documentation
|
|
37
|
+
|
|
38
|
+
Before changing code or documentation, start with:
|
|
39
|
+
|
|
40
|
+
- `docs/index.md` for repository documentation navigation;
|
|
41
|
+
- `docs/architecture.md` for repository boundaries and interactions;
|
|
42
|
+
- `docs/specs/README.md` for the manifest-backed module and contract registry;
|
|
43
|
+
- the affected module's manifest-routed `src/docs/README.md`; and
|
|
44
|
+
- `docs/adr/index.md` plus applicable concrete ADRs for durable decisions.
|
|
45
|
+
|
|
46
|
+
Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
|
|
47
|
+
owns no HTTP API: it consumes the externally owned Pragya and AI Bridge surfaces and publishes an
|
|
48
|
+
SDK surface, so contracts stay on ecosystem-native artifacts and no OpenAPI document is selected.
|
|
49
|
+
The manifest remains authoritative for canonical paths and artifact decisions.
|
|
50
|
+
|
|
51
|
+
## 1. Commands (Run First)
|
|
52
|
+
|
|
53
|
+
Use only documented commands. Do not invent alternatives when a command is missing.
|
|
54
|
+
|
|
55
|
+
Command forms follow the root `AGENTS.md` workspace convention.
|
|
56
|
+
|
|
57
|
+
| Task | Command |
|
|
58
|
+
| ---------------------- | ------------------- |
|
|
59
|
+
| Install dependencies | `yarn install` (from the monorepo root) |
|
|
60
|
+
| Start dev environment | Not applicable — this is a library, not a runnable app |
|
|
61
|
+
| Run tests | `yarn workspace @webex/internal-plugin-call-ai-summary test:unit` |
|
|
62
|
+
| Run linters | `yarn workspace @webex/internal-plugin-call-ai-summary test:style` |
|
|
63
|
+
| Build/release artifact | `yarn workspace @webex/internal-plugin-call-ai-summary build:src` |
|
|
64
|
+
| Format code | `prettier` via the repository configuration |
|
|
65
|
+
|
|
66
|
+
Running `yarn build`, `yarn test:style` or `yarn test:unit` from inside the package directory is
|
|
67
|
+
equivalent.
|
|
68
|
+
|
|
69
|
+
If a required command is unknown, stop and ask for the exact command.
|
|
70
|
+
|
|
71
|
+
## 2. Agent Persona and Scope
|
|
72
|
+
|
|
73
|
+
You are the Webex JS SDK engineering assistant for `@webex/internal-plugin-call-ai-summary`.
|
|
74
|
+
|
|
75
|
+
Primary outcomes:
|
|
76
|
+
|
|
77
|
+
- Deliver production-safe changes with passing tests.
|
|
78
|
+
- Preserve existing behavior unless a change request explicitly requires a behavior change.
|
|
79
|
+
- Keep docs and configuration aligned with code changes.
|
|
80
|
+
|
|
81
|
+
Definition of done:
|
|
82
|
+
|
|
83
|
+
1. Requested change is implemented.
|
|
84
|
+
2. Relevant tests/lint/build checks pass locally.
|
|
85
|
+
3. Updated docs/config cover new behavior.
|
|
86
|
+
4. PR summary includes risks and rollback notes.
|
|
87
|
+
|
|
88
|
+
## 3. Repository Knowledge
|
|
89
|
+
|
|
90
|
+
The plugin resolves a **Pragya container** by ID, then fetches and decrypts AI-generated summaries,
|
|
91
|
+
notes, action items, and transcripts from the URLs that container supplies. All AI-generated content is **JWE-encrypted** and decrypted via the KMS (Key Management Service) using `@webex/internal-plugin-encryption`.
|
|
92
|
+
|
|
93
|
+
The plugin registers itself as `aisummary` on the internal namespace, so importing the package is
|
|
94
|
+
what makes `webex.internal.aisummary` available.
|
|
95
|
+
|
|
96
|
+
**Note:** The Pragya API returns summary URLs nested under `summaryData.data`. The `getContainer()` method normalizes this automatically, flattening those URLs onto `summaryData` so consumers can read `summaryData.summaryUrl` directly.
|
|
97
|
+
|
|
98
|
+
### Tech Stack
|
|
99
|
+
|
|
100
|
+
| Area | Tooling | Version |
|
|
101
|
+
| ---------------- | ----------- | ----------- |
|
|
102
|
+
| Language runtime | Node.js | Develop on **22.14** per the root `AGENTS.md` and `.nvmrc`. `package.json` declares `engines.node >=16`, which is the consumer floor, not the development version. |
|
|
103
|
+
| Build tool | `webex-legacy-tools` | workspace |
|
|
104
|
+
| Test framework | Jest via `@webex/jest-config-legacy` | workspace |
|
|
105
|
+
| Lint/format | ESLint `^8.24.0`, Prettier `^2.7.1` | see `package.json` |
|
|
106
|
+
|
|
107
|
+
### Project Map
|
|
108
|
+
|
|
109
|
+
- `src/index.ts`: Entry point. Registers the plugin via `registerInternalPlugin('aisummary', ...)`.
|
|
110
|
+
- `src/ai-summary.ts`: Main plugin class extending `WebexPlugin`. Contains all public and private methods.
|
|
111
|
+
- `src/types.ts`: TypeScript interfaces for request/response DTOs.
|
|
112
|
+
- `src/constants.ts`: Service name, resource path, and error message constants.
|
|
113
|
+
- `src/config.ts`: Plugin configuration (currently empty).
|
|
114
|
+
- `src/manual-*.js`: Manual verification scripts requiring a live token.
|
|
115
|
+
- `src/docs/README.md`: The canonical module specification.
|
|
116
|
+
|
|
117
|
+
### Critical Constraints
|
|
118
|
+
|
|
119
|
+
- `@webex/webex-core` provides the base plugin class, request handling, and auth interceptor; `@webex/internal-plugin-encryption` provides KMS decryption. Both are workspace dependencies.
|
|
120
|
+
- The plugin is fully self-contained: it must not modify `UserSession`, the `packages/webex` bundle, or the encryption plugin.
|
|
121
|
+
- Content URLs come from Pragya and are already region-correct; do not add service discovery for them.
|
|
122
|
+
- Never log decrypted AI-generated call content.
|
|
123
|
+
|
|
124
|
+
## 4. Testing Workflow
|
|
125
|
+
|
|
126
|
+
Run checks in this order:
|
|
127
|
+
|
|
128
|
+
1. `yarn test:unit`
|
|
129
|
+
2. `yarn test:style`
|
|
130
|
+
3. No integration or e2e tier exists; `src/manual-integration-test.js` is a manual script requiring a live token.
|
|
131
|
+
|
|
132
|
+
Testing rules:
|
|
133
|
+
|
|
134
|
+
- Add or update tests for every behavior change.
|
|
135
|
+
- Cover failure paths and edge cases, not only happy paths.
|
|
136
|
+
- Do not remove tests to make CI pass.
|
|
137
|
+
|
|
138
|
+
**Current state.** `test/unit/spec/ai-summary.ts` holds 38 unit tests covering plugin registration, all six public
|
|
139
|
+
methods, the `summaryData.data` flattening transform, the `keyUrl` precedence rule, every validation
|
|
140
|
+
branch, and each normalized error mapping. Upstream wire fixtures are in
|
|
141
|
+
`test/unit/fixture/responses.ts`. Note that Jest collects any `test/unit/**` subdirectory that is not
|
|
142
|
+
named `lib` or `fixture`, so put new fixtures under `fixture/`, never `data/`.
|
|
143
|
+
|
|
144
|
+
Do not construct a live `WebexCore` in a unit test. It boots the service catalog and fires
|
|
145
|
+
asynchronous U2C requests that outlive the test, so Jest reports "Cannot log after tests are done"
|
|
146
|
+
and the runner exits nonzero even when every assertion passes. Use `MockWebex` for behaviour, and
|
|
147
|
+
the internal-core plugin registry for registration assertions.
|
|
148
|
+
|
|
149
|
+
## 5. Code Style and Patterns
|
|
150
|
+
|
|
151
|
+
Coding expectations:
|
|
152
|
+
|
|
153
|
+
- Follow repository style rules and static analysis output.
|
|
154
|
+
- Prefer small, composable functions over large procedural blocks.
|
|
155
|
+
- Make error handling explicit at system boundaries.
|
|
156
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
157
|
+
- Before adding a literal path, filename, command, workflow identifier, status,
|
|
158
|
+
or other policy value, search the repository for exact and semantically
|
|
159
|
+
equivalent uses. When repeated production values represent one shared
|
|
160
|
+
contract, move them to the narrowest owning shared module or catalog as one
|
|
161
|
+
canonical named constant, enum, or type and update consumers. Keep incidental
|
|
162
|
+
similarities, one-off implementation details, and independent test fixtures
|
|
163
|
+
local.
|
|
164
|
+
- Do not import a default, named, object, or namespace binding and immediately
|
|
165
|
+
re-export it. Consumers should import from the owning module; package barrels
|
|
166
|
+
should use direct named re-exports.
|
|
167
|
+
- Do not write inline runtime `typeof` checks outside descriptively named guard
|
|
168
|
+
implementations. Import and reuse the owning guard instead; TypeScript
|
|
169
|
+
type-position `typeof` queries remain allowed.
|
|
170
|
+
|
|
171
|
+
Pattern example:
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
Preferred:
|
|
175
|
+
- Validate external input close to the boundary.
|
|
176
|
+
- Return typed/structured results.
|
|
177
|
+
- Include actionable error messages.
|
|
178
|
+
|
|
179
|
+
Avoid:
|
|
180
|
+
- Passing unvalidated payloads deep into the system.
|
|
181
|
+
- Swallowing exceptions or returning ambiguous null values.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## 6. Git Workflow
|
|
185
|
+
|
|
186
|
+
- Branch naming: `[feature|fix|chore]/[short-description]`
|
|
187
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`)
|
|
188
|
+
- Keep commits focused and reversible.
|
|
189
|
+
- Rebase on the target branch before opening PR.
|
|
190
|
+
|
|
191
|
+
PR checklist:
|
|
192
|
+
|
|
193
|
+
- What changed and why.
|
|
194
|
+
- Tests run and results.
|
|
195
|
+
- Risk/impact areas.
|
|
196
|
+
- Rollback approach.
|
|
197
|
+
|
|
198
|
+
## 7. Boundaries and Escalation
|
|
199
|
+
|
|
200
|
+
### Always
|
|
201
|
+
|
|
202
|
+
- Prefer existing patterns over introducing new architecture.
|
|
203
|
+
- Keep changes minimal for the requested scope.
|
|
204
|
+
- Call out assumptions and unknowns explicitly.
|
|
205
|
+
|
|
206
|
+
### Ask First
|
|
207
|
+
|
|
208
|
+
- Adding new dependencies or external services.
|
|
209
|
+
- Large refactors or schema migrations.
|
|
210
|
+
- Security-sensitive changes (auth, encryption, secrets handling).
|
|
211
|
+
- Any destructive data or infrastructure operation.
|
|
212
|
+
|
|
213
|
+
### Never
|
|
214
|
+
|
|
215
|
+
- Commit secrets, keys, or credentials.
|
|
216
|
+
- Bypass required checks by disabling tests or linters.
|
|
217
|
+
- Rewrite history on shared branches.
|
|
218
|
+
- Change unrelated files "while here" without clear need.
|
package/README.md
CHANGED
|
@@ -230,21 +230,26 @@ yarn test
|
|
|
230
230
|
|
|
231
231
|
```
|
|
232
232
|
src/
|
|
233
|
-
index.ts
|
|
234
|
-
ai-summary.ts
|
|
235
|
-
config.ts
|
|
236
|
-
constants.ts
|
|
237
|
-
types.ts
|
|
233
|
+
index.ts # Self-registration via registerInternalPlugin('aisummary', ...)
|
|
234
|
+
ai-summary.ts # Plugin implementation (WebexPlugin.extend)
|
|
235
|
+
config.ts # Plugin config
|
|
236
|
+
constants.ts # Service name, error messages
|
|
237
|
+
types.ts # TypeScript interfaces
|
|
238
|
+
manual-pragya-api-test.js # Manual Pragya response-structure script
|
|
239
|
+
manual-integration-test.js # Manual end-to-end script
|
|
240
|
+
docs/README.md # Canonical module specification
|
|
238
241
|
test/
|
|
239
242
|
unit/
|
|
240
|
-
spec/
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
ai-docs/
|
|
245
|
-
ARCHITECTURE.md # Detailed architecture document
|
|
243
|
+
spec/ai-summary.ts # Unit tests (35 tests)
|
|
244
|
+
fixture/responses.ts # Pragya / AI Bridge wire fixtures
|
|
245
|
+
docs/ # Repository-level SDD specifications
|
|
246
|
+
AGENTS.md # Agent instructions for this package
|
|
246
247
|
```
|
|
247
248
|
|
|
249
|
+
> **Note:** fixtures must live under `test/unit/fixture/`. Jest collects every `test/unit/**`
|
|
250
|
+
> subdirectory except `lib` and `fixture`, so a `data/` directory would be picked up as a test
|
|
251
|
+
> suite and fail.
|
|
252
|
+
|
|
248
253
|
## Dependencies
|
|
249
254
|
|
|
250
255
|
| Package | Purpose |
|
|
@@ -254,4 +259,4 @@ ai-docs/
|
|
|
254
259
|
|
|
255
260
|
## Architecture
|
|
256
261
|
|
|
257
|
-
See [
|
|
262
|
+
See [docs/architecture.md](docs/architecture.md) for repository-wide architecture and [src/docs/README.md](src/docs/README.md) for the module specification covering data flows, API request/response details, encryption and error handling.
|