@webex/internal-plugin-llm 3.12.0-next.65 → 3.12.0-next.66
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 +416 -0
- package/.sdd/manifest.json +355 -0
- package/AGENTS.md +198 -0
- package/docs/adr/0001-retain-product-readme.md +94 -0
- package/docs/adr/index.md +22 -0
- package/docs/architecture.md +279 -0
- package/docs/getting-started.md +104 -0
- package/docs/index.md +47 -0
- package/docs/specs/README.md +73 -0
- package/package.json +1 -1
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +522 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./schemas/repo-context.schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"repository": {
|
|
5
|
+
"name": "@webex/internal-plugin-llm",
|
|
6
|
+
"purpose": "Internal Webex JS SDK plugin that manages LLM data-channel connections for meetings. It registers webex.internal.llm, a Mercury subclass that registers each session with the data-channel service over HTTP, connects the returned WebSocket through Mercury, and keeps per-session URLs, binding, owner meeting, and token-refresh handler, plus a session-keyed data-channel token cache guarded by owner-meeting checks."
|
|
7
|
+
},
|
|
8
|
+
"commands": {
|
|
9
|
+
"install": "yarn install",
|
|
10
|
+
"compile": "yarn workspace @webex/internal-plugin-llm build:src",
|
|
11
|
+
"build": "yarn workspace @webex/internal-plugin-llm build",
|
|
12
|
+
"unit-test": "yarn workspace @webex/internal-plugin-llm test:unit",
|
|
13
|
+
"browser-test": "yarn workspace @webex/internal-plugin-llm test:browser",
|
|
14
|
+
"lint": "yarn workspace @webex/internal-plugin-llm test:style",
|
|
15
|
+
"deploy": "yarn workspace @webex/internal-plugin-llm deploy:npm"
|
|
16
|
+
},
|
|
17
|
+
"public_interfaces": [
|
|
18
|
+
{
|
|
19
|
+
"name": "@webex/internal-plugin-llm package barrel",
|
|
20
|
+
"kind": "package_export",
|
|
21
|
+
"source": "src/index.ts",
|
|
22
|
+
"entrypoints": [
|
|
23
|
+
"import LLMChannel, {DataChannelTokenType, LLM_DEFAULT_SESSION, LLM_PRACTICE_SESSION} from '@webex/internal-plugin-llm'",
|
|
24
|
+
"import type {RegisterAndConnectTiming} from '@webex/internal-plugin-llm'"
|
|
25
|
+
],
|
|
26
|
+
"audience": "plugin-meetings and internal-plugin-voicea in the webex-js-sdk workspace",
|
|
27
|
+
"notes": "Importing the package also registers LLMChannel as internal plugin 'llm' with config.llm. No onBeforeLogout hook is registered."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "webex.internal.llm runtime methods and events",
|
|
31
|
+
"kind": "plugin_api",
|
|
32
|
+
"source": "src/llm.ts",
|
|
33
|
+
"entrypoints": [
|
|
34
|
+
"webex.internal.llm.registerAndConnect()",
|
|
35
|
+
"webex.internal.llm.disconnectLLM()",
|
|
36
|
+
"webex.internal.llm.disconnectAllLLM()",
|
|
37
|
+
"webex.internal.llm.setDatachannelToken()",
|
|
38
|
+
"webex.internal.llm.getDatachannelToken()",
|
|
39
|
+
"webex.internal.llm.setRefreshHandler()",
|
|
40
|
+
"webex.internal.llm.refreshDataChannelToken()",
|
|
41
|
+
"webex.internal.llm.getSessionIdByDatachannelUrl()",
|
|
42
|
+
"webex.internal.llm.on('online')"
|
|
43
|
+
],
|
|
44
|
+
"audience": "plugin-meetings meeting, webinar, and data-channel auth-token interceptor",
|
|
45
|
+
"notes": "LLMChannel extends Mercury. Events for a non-default session end with a colon and that session id, for example online:llm-practice-session. Config keys under config.llm: pingInterval, pongTimeout, backoffTimeMax, backoffTimeReset, forceCloseDelay."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "package scripts",
|
|
49
|
+
"kind": "npm_scripts",
|
|
50
|
+
"source": "package.json",
|
|
51
|
+
"entrypoints": [
|
|
52
|
+
"build",
|
|
53
|
+
"build:src",
|
|
54
|
+
"test:style",
|
|
55
|
+
"test:unit",
|
|
56
|
+
"test:browser",
|
|
57
|
+
"deploy:npm"
|
|
58
|
+
],
|
|
59
|
+
"audience": "contributors and CI",
|
|
60
|
+
"notes": "Do not run the aggregate test script: it chains test:integration, which is not defined. test:browser passes only --integration and collects no files because test/integration/spec does not exist."
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"source_of_truth": [
|
|
64
|
+
{
|
|
65
|
+
"surface": "LLM channel plugin implementation",
|
|
66
|
+
"paths": [
|
|
67
|
+
"src/index.ts",
|
|
68
|
+
"src/llm.ts",
|
|
69
|
+
"src/llm.types.ts",
|
|
70
|
+
"src/constants.ts"
|
|
71
|
+
],
|
|
72
|
+
"generated_artifacts": [
|
|
73
|
+
"dist"
|
|
74
|
+
],
|
|
75
|
+
"refresh_with": [
|
|
76
|
+
"yarn workspace @webex/internal-plugin-llm build:src"
|
|
77
|
+
],
|
|
78
|
+
"validate_with": [
|
|
79
|
+
"yarn workspace @webex/internal-plugin-llm test:unit",
|
|
80
|
+
"yarn workspace @webex/internal-plugin-llm test:style"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"surface": "module specification",
|
|
85
|
+
"paths": [
|
|
86
|
+
"src/docs/README.md"
|
|
87
|
+
],
|
|
88
|
+
"generated_artifacts": [],
|
|
89
|
+
"refresh_with": [
|
|
90
|
+
"update alongside the behavior change in the same commit"
|
|
91
|
+
],
|
|
92
|
+
"validate_with": [
|
|
93
|
+
"spec-validator on an independent runtime"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"generated_artifacts": [
|
|
98
|
+
{
|
|
99
|
+
"path": "dist",
|
|
100
|
+
"generated_from": "src",
|
|
101
|
+
"refresh_with": "yarn workspace @webex/internal-plugin-llm build:src"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"path": ".sdd/templates/repo-standards/template-map.json",
|
|
105
|
+
"generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
106
|
+
"refresh_with": "Package symlink .sdd/templates/repo-standards points to the JS SDK root .sdd/templates/repo-standards snapshot (PR 5246); no package copy. Refresh the root snapshot, not the link."
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"validation_matrix": [
|
|
110
|
+
{
|
|
111
|
+
"paths": [
|
|
112
|
+
"src/**"
|
|
113
|
+
],
|
|
114
|
+
"minimum": [
|
|
115
|
+
"yarn workspace @webex/internal-plugin-llm test:unit"
|
|
116
|
+
],
|
|
117
|
+
"recommended": [
|
|
118
|
+
"yarn workspace @webex/internal-plugin-llm test:style",
|
|
119
|
+
"yarn workspace @webex/internal-plugin-llm build:src"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"paths": [
|
|
124
|
+
"src/llm.ts",
|
|
125
|
+
"src/constants.ts",
|
|
126
|
+
"src/llm.types.ts"
|
|
127
|
+
],
|
|
128
|
+
"minimum": [
|
|
129
|
+
"yarn workspace @webex/internal-plugin-llm test:unit"
|
|
130
|
+
],
|
|
131
|
+
"recommended": [
|
|
132
|
+
"review the sibling package plugin-meetings files src/meeting/index.ts, src/webinar/index.ts, and src/interceptors/dataChannelAuthToken.ts when method signatures, session ids, or token keys change"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"change_impact": [
|
|
137
|
+
{
|
|
138
|
+
"paths": [
|
|
139
|
+
"src/llm.ts"
|
|
140
|
+
],
|
|
141
|
+
"affects": [
|
|
142
|
+
"plugin-meetings registration, ownership, token, and refresh-handler calls",
|
|
143
|
+
"listeners on webex.internal.llm events"
|
|
144
|
+
],
|
|
145
|
+
"refresh_with": [
|
|
146
|
+
"yarn workspace @webex/internal-plugin-llm build:src"
|
|
147
|
+
],
|
|
148
|
+
"validate_with": [
|
|
149
|
+
"yarn workspace @webex/internal-plugin-llm test:unit"
|
|
150
|
+
],
|
|
151
|
+
"avoid_direct_edits": [
|
|
152
|
+
"dist"
|
|
153
|
+
],
|
|
154
|
+
"notes": "Ownership rules, the auth header, the feature toggle, and the subchannel query are relied on by plugin-meetings and the data-channel service."
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"paths": [
|
|
158
|
+
"src/constants.ts",
|
|
159
|
+
"src/llm.types.ts"
|
|
160
|
+
],
|
|
161
|
+
"affects": [
|
|
162
|
+
"session ids and token keys used by plugin-meetings",
|
|
163
|
+
"LLM_PRACTICE_SESSION re-exported by internal-plugin-voicea"
|
|
164
|
+
],
|
|
165
|
+
"refresh_with": [
|
|
166
|
+
"yarn workspace @webex/internal-plugin-llm build:src"
|
|
167
|
+
],
|
|
168
|
+
"validate_with": [
|
|
169
|
+
"yarn workspace @webex/internal-plugin-llm test:unit"
|
|
170
|
+
],
|
|
171
|
+
"avoid_direct_edits": [
|
|
172
|
+
"dist"
|
|
173
|
+
],
|
|
174
|
+
"notes": "The built-in token keys equal the built-in session ids; change them together."
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"evidence_rules": [
|
|
178
|
+
{
|
|
179
|
+
"claim_category": "command_name",
|
|
180
|
+
"sources": [
|
|
181
|
+
"package.json"
|
|
182
|
+
],
|
|
183
|
+
"requirement": "The script must exist in package.json scripts. test:integration is referenced by test but undefined.",
|
|
184
|
+
"notes": "Never cite the aggregate test script as runnable."
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"claim_category": "import_path",
|
|
188
|
+
"sources": [
|
|
189
|
+
"src/index.ts"
|
|
190
|
+
],
|
|
191
|
+
"requirement": "A binding is public only if exported from src/index.ts.",
|
|
192
|
+
"notes": "config and a named LLMChannel export are not exported from the barrel; tests use the deep path src/llm."
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"claim_category": "behavior_claim",
|
|
196
|
+
"sources": [
|
|
197
|
+
"src",
|
|
198
|
+
"test/unit/spec"
|
|
199
|
+
],
|
|
200
|
+
"requirement": "Ground every behavioral claim in source or test evidence.",
|
|
201
|
+
"notes": "Commit history is not an evidence source for this package. README.md is retained product documentation, not the behavioral authority. Socket behavior is owned by the sibling package internal-plugin-mercury."
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"negative_guidance": [
|
|
205
|
+
{
|
|
206
|
+
"rule": "Do not store data-channel tokens in the connections map.",
|
|
207
|
+
"why": "Tokens must survive disconnects; the separate datachannelTokens record exists for that."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"rule": "Do not log or put a data-channel token in a URL.",
|
|
211
|
+
"why": "The token is meant to travel only in the registration request header."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"rule": "Do not skip resolveSessionOwnership on a write a non-owner must not make.",
|
|
215
|
+
"why": "Several meeting objects share one plugin instance."
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"rule": "Do not reimplement socket lifecycle, retries, or event emission here.",
|
|
219
|
+
"why": "They are inherited from Mercury and shared with every Mercury-based plugin."
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"rule": "Do not treat README.md as the list of methods or config keys.",
|
|
223
|
+
"why": "It omits ownership checks, clearDatachannelToken, timing results, and config defaults. See docs/adr/0001-retain-product-readme.md."
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"rule": "Do not infer a coverage threshold for this package.",
|
|
227
|
+
"why": "The developer confirmed no coverage gate applies; the legacy Jest config disables coverage collection."
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"confidence_policy": {
|
|
231
|
+
"high": {
|
|
232
|
+
"action": "update",
|
|
233
|
+
"expectation": "Source and unit test evidence both support the change, and the behavior has a case in test/unit/spec/llm.js."
|
|
234
|
+
},
|
|
235
|
+
"medium": {
|
|
236
|
+
"action": "narrow-scope",
|
|
237
|
+
"expectation": "Only source evidence exists, for example clearDatachannelToken, refused-owner paths, token persistence across disconnect, or config defaults. Pin current behavior with a characterization test before modifying."
|
|
238
|
+
},
|
|
239
|
+
"low": {
|
|
240
|
+
"action": "noop",
|
|
241
|
+
"expectation": "Neither source nor tests settle the question. Stop and report the gap."
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"repository_topology": {
|
|
245
|
+
"main_entrypoints": [
|
|
246
|
+
{
|
|
247
|
+
"name": "package barrel",
|
|
248
|
+
"path": "src/index.ts",
|
|
249
|
+
"purpose": "Registers the plugin and re-exports the class, token enum, session constants, and timing type",
|
|
250
|
+
"notes": "No subpath exports."
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"workspace_packages": [
|
|
254
|
+
{
|
|
255
|
+
"name": "@webex/internal-plugin-llm",
|
|
256
|
+
"paths": [
|
|
257
|
+
"src",
|
|
258
|
+
"test"
|
|
259
|
+
],
|
|
260
|
+
"notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"source_surfaces": [
|
|
264
|
+
{
|
|
265
|
+
"name": "LLM channel plugin",
|
|
266
|
+
"paths": [
|
|
267
|
+
"src"
|
|
268
|
+
],
|
|
269
|
+
"notes": "index.ts, llm.ts, llm.types.ts, constants.ts. Specified at src/docs/README.md."
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "tests",
|
|
273
|
+
"paths": [
|
|
274
|
+
"test/unit/spec"
|
|
275
|
+
],
|
|
276
|
+
"notes": "One unit spec run by Jest through webex-legacy-tools."
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"generated_surfaces": [
|
|
280
|
+
{
|
|
281
|
+
"name": "build output",
|
|
282
|
+
"paths": [
|
|
283
|
+
"dist"
|
|
284
|
+
],
|
|
285
|
+
"generated_from": "src",
|
|
286
|
+
"refresh_with": "yarn workspace @webex/internal-plugin-llm build:src",
|
|
287
|
+
"notes": "Produced by webex-legacy-tools. Do not edit by hand."
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "repo-standards template map",
|
|
291
|
+
"paths": [
|
|
292
|
+
".sdd/templates/repo-standards"
|
|
293
|
+
],
|
|
294
|
+
"generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
295
|
+
"refresh_with": "Package symlink .sdd/templates/repo-standards points to the JS SDK root .sdd/templates/repo-standards snapshot (PR 5246); no package copy. Refresh the root snapshot, not the link.",
|
|
296
|
+
"notes": "Package symlink .sdd/templates/repo-standards points to the JS SDK root .sdd/templates/repo-standards snapshot (PR 5246); no package copy. Refresh the root snapshot, not the link."
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"validation_entrypoints": [
|
|
300
|
+
{
|
|
301
|
+
"name": "unit tests",
|
|
302
|
+
"command": "yarn workspace @webex/internal-plugin-llm test:unit",
|
|
303
|
+
"scope": "test/unit/spec",
|
|
304
|
+
"notes": "jest via webex-legacy-tools --runner jest."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "browser tests",
|
|
308
|
+
"command": "yarn workspace @webex/internal-plugin-llm test:browser",
|
|
309
|
+
"scope": "test/integration/spec (absent)",
|
|
310
|
+
"notes": "karma via webex-legacy-tools --integration; collects no files today."
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "lint",
|
|
314
|
+
"command": "yarn workspace @webex/internal-plugin-llm test:style",
|
|
315
|
+
"scope": "src",
|
|
316
|
+
"notes": "eslint via the local root .eslintrc.js."
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"sync_paths": [
|
|
320
|
+
{
|
|
321
|
+
"source": "src/llm.types.ts",
|
|
322
|
+
"targets": [
|
|
323
|
+
"src/llm.ts"
|
|
324
|
+
],
|
|
325
|
+
"mechanism": "Manual; LLMChannel implements ILLMChannel and repeats the connections entry shape.",
|
|
326
|
+
"notes": "Update ILLMChannel, the private connections type, and the getAllConnections return type together."
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
330
|
+
"targets": [
|
|
331
|
+
".sdd/templates/repo-standards"
|
|
332
|
+
],
|
|
333
|
+
"mechanism": "Package symlink .sdd/templates/repo-standards points to the JS SDK root .sdd/templates/repo-standards snapshot (PR 5246); no package copy. Refresh the root snapshot, not the link.",
|
|
334
|
+
"notes": "Package symlink .sdd/templates/repo-standards points to the JS SDK root .sdd/templates/repo-standards snapshot (PR 5246); no package copy. Refresh the root snapshot, not the link."
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
"folder_readme_contract": {
|
|
339
|
+
"required_sections": [
|
|
340
|
+
"purpose",
|
|
341
|
+
"boundaries",
|
|
342
|
+
"key-files",
|
|
343
|
+
"common-tasks"
|
|
344
|
+
],
|
|
345
|
+
"rules": [
|
|
346
|
+
"Orient the reader before describing detail.",
|
|
347
|
+
"Link to the module specification rather than duplicating it."
|
|
348
|
+
],
|
|
349
|
+
"example_policy": "Examples are allowed only when verified against src/ or test/.",
|
|
350
|
+
"fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
|
|
351
|
+
},
|
|
352
|
+
"regression_feedback_rules": [
|
|
353
|
+
{
|
|
354
|
+
"trigger": "A meeting reads, overwrites, or tears down another meeting's LLM session or token.",
|
|
355
|
+
"required_followups": [
|
|
356
|
+
"Add a refused-owner case to test/unit/spec/llm.js",
|
|
357
|
+
"Update the ownership invariant in src/docs/README.md"
|
|
358
|
+
],
|
|
359
|
+
"notes": "Includes calls that omit ownerMeetingId and disconnectAllLLM."
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"trigger": "A registration or connect failure is reported with missing or wrong latency.",
|
|
363
|
+
"required_followups": [
|
|
364
|
+
"Add a timing case to the #registerAndConnect suite",
|
|
365
|
+
"Update the caller-visible failure modes in src/docs/README.md"
|
|
366
|
+
],
|
|
367
|
+
"notes": "Errors thrown before the connect timer carry no timing."
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
"surface_owners": [
|
|
371
|
+
{
|
|
372
|
+
"surface": "module implementation and specifications",
|
|
373
|
+
"owner": "@webex/web-client, @webex/web-sdk",
|
|
374
|
+
"edit_boundary": "Owners per the monorepo .github/CODEOWNERS entry for packages/@webex/internal-plugin-llm."
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"do_not_edit": [
|
|
378
|
+
"dist",
|
|
379
|
+
".sdd/templates/repo-standards"
|
|
380
|
+
],
|
|
381
|
+
"marker_scopes": {
|
|
382
|
+
"sdd": [
|
|
383
|
+
".sdd/manifest.json",
|
|
384
|
+
"src/docs/README.md",
|
|
385
|
+
"docs"
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
"fallback_rules": [
|
|
389
|
+
"When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
|
|
390
|
+
"When neither source nor tests settle a question, report it as a gap instead of inferring.",
|
|
391
|
+
"Commit history is not a valid rationale source for this package."
|
|
392
|
+
],
|
|
393
|
+
"downstream_context_pack": {
|
|
394
|
+
"required_human_surfaces": [
|
|
395
|
+
"README.md",
|
|
396
|
+
"docs/index.md",
|
|
397
|
+
"docs/architecture.md",
|
|
398
|
+
"src/docs/README.md"
|
|
399
|
+
],
|
|
400
|
+
"required_agent_operational_surfaces": [
|
|
401
|
+
"AGENTS.md",
|
|
402
|
+
"docs/specs/README.md"
|
|
403
|
+
],
|
|
404
|
+
"required_machine_readable_surface": ".sdd/manifest.json",
|
|
405
|
+
"recommended_machine_readable_sections": [
|
|
406
|
+
"public_interfaces",
|
|
407
|
+
"change_impact",
|
|
408
|
+
"evidence_rules",
|
|
409
|
+
"negative_guidance",
|
|
410
|
+
"confidence_policy",
|
|
411
|
+
"repository_topology",
|
|
412
|
+
"folder_readme_contract",
|
|
413
|
+
"regression_feedback_rules"
|
|
414
|
+
]
|
|
415
|
+
}
|
|
416
|
+
}
|