@convai/web-sdk 1.8.0-beta.8 → 1.8.0

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 (113) hide show
  1. package/README.md +45 -213
  2. package/dist/core/ConvaiClient.d.ts +1 -190
  3. package/dist/core/ConvaiClient.d.ts.map +1 -1
  4. package/dist/core/ConvaiClient.js +286 -1306
  5. package/dist/core/ConvaiClient.js.map +1 -1
  6. package/dist/core/MessageHandler.d.ts +1 -19
  7. package/dist/core/MessageHandler.d.ts.map +1 -1
  8. package/dist/core/MessageHandler.js +27 -378
  9. package/dist/core/MessageHandler.js.map +1 -1
  10. package/dist/core/connectRequest.d.ts +4 -17
  11. package/dist/core/connectRequest.d.ts.map +1 -1
  12. package/dist/core/connectRequest.js +17 -28
  13. package/dist/core/connectRequest.js.map +1 -1
  14. package/dist/core/index.d.ts +1 -8
  15. package/dist/core/index.d.ts.map +1 -1
  16. package/dist/core/index.js +1 -13
  17. package/dist/core/index.js.map +1 -1
  18. package/dist/core/logicalTurn.d.ts +6 -4
  19. package/dist/core/logicalTurn.d.ts.map +1 -1
  20. package/dist/core/logicalTurn.js +4 -29
  21. package/dist/core/logicalTurn.js.map +1 -1
  22. package/dist/core/modelOutput.d.ts.map +1 -1
  23. package/dist/core/modelOutput.js +2 -2
  24. package/dist/core/modelOutput.js.map +1 -1
  25. package/dist/core/types.d.ts +22 -860
  26. package/dist/core/types.d.ts.map +1 -1
  27. package/dist/core/types.js.map +1 -1
  28. package/dist/embed/ConvaiChatElement.d.ts +1 -77
  29. package/dist/embed/ConvaiChatElement.d.ts.map +1 -1
  30. package/dist/embed/ConvaiChatElement.js +54 -433
  31. package/dist/embed/ConvaiChatElement.js.map +1 -1
  32. package/dist/embed/chat-embed-v1.js +35 -136
  33. package/dist/embed/chat-embed-v1.js.map +4 -4
  34. package/dist/react/components/ConvaiWidget.d.ts.map +1 -1
  35. package/dist/react/components/ConvaiWidget.js +1 -6
  36. package/dist/react/components/ConvaiWidget.js.map +1 -1
  37. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +1 -1
  38. package/dist/react/components/rtc-widget/components/AudioVisualizer.js +1 -28
  39. package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +1 -1
  40. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +0 -7
  41. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +1 -1
  42. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +46 -135
  43. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -1
  44. package/dist/react/components/rtc-widget/components/UserMessage.js +1 -1
  45. package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -1
  46. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +1 -1
  47. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +49 -93
  48. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +1 -1
  49. package/dist/react/hooks/useConvaiClient.d.ts.map +1 -1
  50. package/dist/react/hooks/useConvaiClient.js +2 -17
  51. package/dist/react/hooks/useConvaiClient.js.map +1 -1
  52. package/dist/react/index.d.ts +1 -4
  53. package/dist/react/index.d.ts.map +1 -1
  54. package/dist/react/index.js +1 -8
  55. package/dist/react/index.js.map +1 -1
  56. package/dist/vanilla/AudioRenderer.d.ts +1 -3
  57. package/dist/vanilla/AudioRenderer.d.ts.map +1 -1
  58. package/dist/vanilla/AudioRenderer.js +2 -8
  59. package/dist/vanilla/AudioRenderer.js.map +1 -1
  60. package/dist/vanilla/ConvaiWidget.d.ts.map +1 -1
  61. package/dist/vanilla/ConvaiWidget.js +302 -1122
  62. package/dist/vanilla/ConvaiWidget.js.map +1 -1
  63. package/dist/vanilla/WidgetEventSubscriptions.d.ts +1 -1
  64. package/dist/vanilla/WidgetEventSubscriptions.d.ts.map +1 -1
  65. package/dist/vanilla/WidgetEventSubscriptions.js +0 -5
  66. package/dist/vanilla/WidgetEventSubscriptions.js.map +1 -1
  67. package/dist/vanilla/icons.d.ts.map +1 -1
  68. package/dist/vanilla/icons.js +15 -62
  69. package/dist/vanilla/icons.js.map +1 -1
  70. package/dist/vanilla/index.d.ts +2 -6
  71. package/dist/vanilla/index.d.ts.map +1 -1
  72. package/dist/vanilla/index.js +1 -5
  73. package/dist/vanilla/index.js.map +1 -1
  74. package/dist/vanilla/styles.d.ts +1 -18
  75. package/dist/vanilla/styles.d.ts.map +1 -1
  76. package/dist/vanilla/styles.js +29 -141
  77. package/dist/vanilla/styles.js.map +1 -1
  78. package/dist/vanilla/types.d.ts +0 -74
  79. package/dist/vanilla/types.d.ts.map +1 -1
  80. package/dist/vanilla/types.js.map +1 -1
  81. package/dist/version.d.ts +1 -1
  82. package/dist/version.d.ts.map +1 -1
  83. package/dist/version.js +1 -1
  84. package/dist/version.js.map +1 -1
  85. package/package.json +17 -44
  86. package/dist/core/CharacterRoster.d.ts +0 -84
  87. package/dist/core/CharacterRoster.d.ts.map +0 -1
  88. package/dist/core/CharacterRoster.js +0 -348
  89. package/dist/core/CharacterRoster.js.map +0 -1
  90. package/dist/core/CharacterVersionManager.d.ts +0 -100
  91. package/dist/core/CharacterVersionManager.d.ts.map +0 -1
  92. package/dist/core/CharacterVersionManager.js +0 -227
  93. package/dist/core/CharacterVersionManager.js.map +0 -1
  94. package/dist/core/ConvaiRoomError.d.ts +0 -48
  95. package/dist/core/ConvaiRoomError.d.ts.map +0 -1
  96. package/dist/core/ConvaiRoomError.js +0 -111
  97. package/dist/core/ConvaiRoomError.js.map +0 -1
  98. package/dist/core/SSESession.d.ts +0 -59
  99. package/dist/core/SSESession.d.ts.map +0 -1
  100. package/dist/core/SSESession.js +0 -289
  101. package/dist/core/SSESession.js.map +0 -1
  102. package/dist/core/characterReference.d.ts +0 -40
  103. package/dist/core/characterReference.d.ts.map +0 -1
  104. package/dist/core/characterReference.js +0 -72
  105. package/dist/core/characterReference.js.map +0 -1
  106. package/dist/core/rosterRequest.d.ts +0 -57
  107. package/dist/core/rosterRequest.d.ts.map +0 -1
  108. package/dist/core/rosterRequest.js +0 -210
  109. package/dist/core/rosterRequest.js.map +0 -1
  110. package/dist/utils/inlineMarkdown.d.ts +0 -60
  111. package/dist/utils/inlineMarkdown.d.ts.map +0 -1
  112. package/dist/utils/inlineMarkdown.js +0 -183
  113. package/dist/utils/inlineMarkdown.js.map +0 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Real-time conversational AI characters for the web.**
4
4
 
5
- [![npm](https://img.shields.io/badge/npm-1.8.0--beta.7-blue)](https://www.npmjs.com/package/@convai/web-sdk)
5
+ [![npm](https://img.shields.io/npm/v/@convai/web-sdk/latest?label=npm&color=blue)](https://www.npmjs.com/package/@convai/web-sdk)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-first-3178C6)](https://www.typescriptlang.org/)
7
7
  [![License](https://img.shields.io/badge/license-Apache--2.0-green)](./LICENSE)
8
8
 
@@ -10,19 +10,29 @@ TypeScript-first SDK for embedding Convai AI characters into React and vanilla J
10
10
 
11
11
  ---
12
12
 
13
- ## What's new in 1.8.0 (beta)
14
-
15
- Install the beta with `npm install @convai/web-sdk@beta`.
16
-
17
- - **Multi-character rooms** — connect a roster of characters with the `characters` config option (two copies of one character are two independent members), switch who answers with `setInteractionTarget()`, add or remove members live with `updateCharacterRoster()`, and let other participants join the same room with `joinRoom()`. Every transcript line, audio track and readiness event is attributed to a `membershipId`. [Usage below.](#multi-character-rooms-beta)
18
- - **Agentic actions and canonical model output (v2)** — opt in with `capabilities`, declare client-executed tools in `actionConfig.tools`, consume typed `modelOutput` envelopes, return results with `sendActionResultAndWait()` for a correlated server acknowledgement, and read the raw provider stream through `botLlmTextRaw`. `visionPromptMode: "disabled"` keeps scene context without advertising visual perception. [Usage below.](#agentic-actions-and-canonical-model-output-v2)
19
- - **Published text chat** — a credential-free, text-only connection for public chat pages: `connectWithPublicationGrant()`, `connectionType: "text"`, and the self-contained `<convai-chat>` browser bundle. [Usage below.](#published-text-chat)
20
- - **Typed events** — `client.on(event, callback)` infers each callback's payload from the exported `ConvaiEventMap`, so `botReady`, `modelOutput`, `characterStatus` and the rest are checked at compile time. See the [events reference](docs/convai_events.md).
21
- - **Local transcript lines and usage updates** `appendMessage()` inserts a line into the transcript without sending anything, and `toggleUsageUpdates(true)` opts into per-turn `usageUpdate` cost breakdowns.
22
- - **Character versioning** — connect to a character's editable draft, its promoted latest release, or an immutable tag with the `characterVersion` config option, and list, compare, release, promote, fork and discard versions through `client.characterVersions`. [Usage below.](#character-versioning-beta)
23
- - **SSE interaction transport** text-only streamed interactions through the interaction API, selected by `interactionApiUrl`; the one transport that runs under Node. [Usage below.](#sse-interaction-transport-beta)
24
- - **Embeddable vanilla widget** — the vanilla widget runs inside a shadow root, with a character header and a connecting overlay, so it can be dropped into any page.
25
- - **Node-importable dist** `@convai/web-sdk/core`, `/vanilla`, `/vanilla/websocket` and `/lipsync-helpers` load in plain Node, SSR and Next.js server components.
13
+ ## What's new in 1.8.0
14
+
15
+ - **Protocol capabilities, opted into one at a time** — `capabilities`
16
+ selects v2 correlated client tool calls, the canonical Core-validated
17
+ `modelOutput` envelope, and raw `bot-llm-text` streaming, each independent
18
+ of the others. Core must confirm a v2 capability or the SDK refuses the
19
+ connection, so a half-upgraded backend fails at connect rather than
20
+ mid-conversation. Omit the block entirely and nothing changes: existing
21
+ connections and one-argument text messages stay on the v1 wire contract.
22
+ [Options table.](./docs/convai_configuration.md#protocol-capabilities)
23
+ - **Correlated action results and logical turns** action results carry the
24
+ call they answer, and turn correlation holds across multi-envelope and
25
+ voice turns, so a response can be tied to its cause without guessing from
26
+ arrival order.
27
+ - **Extension renderer registry** — render custom model-output extensions
28
+ without the SDK knowing your UI framework.
29
+ - **Published chat without a credential** — a text-only connection method for
30
+ published-chat launch grants, plus a native custom-element browser bundle
31
+ at `dist/embed/chat-embed-v1.js` for iframe-free embeds. The embed never
32
+ receives a publisher API key. [Usage below.](#published-text-chat)
33
+ - **Loads in Node without a bundler** — emitted ESM carries explicit relative
34
+ extensions, so the published package and the Chat Publish client resolve
35
+ under plain Node resolution.
26
36
 
27
37
  ### Previously in 1.7.0
28
38
 
@@ -31,7 +41,7 @@ Install the beta with `npm install @convai/web-sdk@beta`.
31
41
  - **Lipsync naturalness pipeline** — modular naturalness processing with a tuned MetaHuman profile.
32
42
  - **Adaptive glass widget styling** — `ConvaiWidget` adapts to light and dark backgrounds.
33
43
 
34
- ### 1.6.0
44
+ #### Previously in 1.6.0
35
45
 
36
46
  - **Narrative Design template keys** — personalize one narrative graph per session: seed values at connect with the `narrativeTemplateKeys` config option, replace them mid-session with `updateTemplateKeys()`. [Usage below.](#narrative-design-template-keys)
37
47
  - **Typed parameterized actions** — `actionResponse` is now typed via the exported `ConvaiAction` / `ActionResponseEvent`, including the `target` of parameterized actions. [Usage below.](#actions)
@@ -48,11 +58,6 @@ Install the beta with `npm install @convai/web-sdk@beta`.
48
58
  - **Dynamic context & vision** — inject text state, scene metadata, and LiveKit video frames mid-session
49
59
  - **Actions & Narrative Design** — typed action decisions with parameterized targets, named triggers, and per-session template keys
50
60
  - **Long-term memory** — persistent cross-session memories scoped to each end user
51
- - **Multi-character rooms** — a roster of characters in one room, per-member attribution, live roster changes
52
- - **Agentic actions (v2)** — client-executed tools, canonical model output, acknowledged action results, raw provider stream
53
- - **Published text chat** — grant-based, credential-free text sessions and a drop-in `<convai-chat>` element
54
- - **Typed events** — every `client.on` payload typed through `ConvaiEventMap`
55
- - **Character versioning** — connect to a draft, latest, or tagged version, and manage releases from the client
56
61
  - **File upload** — send images to the character during a live session
57
62
  - **WebSocket transport** — opt-in alternative to WebRTC for constrained networks
58
63
  - **Auth tokens** — server-side token exchange for production deployments
@@ -112,10 +117,6 @@ window.addEventListener("beforeunload", () => {
112
117
 
113
118
  ### Published text chat
114
119
 
115
- See the [Published text chat guide](./docs/convai_published_chat.md) for
116
- React and vanilla integrations, lifecycle behavior, and the complete API
117
- reference.
118
-
119
120
  Published chat pages use a short-lived launch grant instead of the publisher's
120
121
  API key. Native Web SDK integration is the recommended embed path; an iframe is
121
122
  not required. Obtain the grant from the public Character API and pass it to the
@@ -178,17 +179,14 @@ custom element:
178
179
  ```html
179
180
  <script
180
181
  type="module"
181
- src="https://cdn.jsdelivr.net/npm/@convai/web-sdk@<SDK_VERSION>/dist/embed/chat-embed-v1.js"
182
+ src="https://cdn.jsdelivr.net/npm/@convai/web-sdk@latest/dist/embed/chat-embed-v1.js"
182
183
  ></script>
183
184
  <convai-chat publication-id="PUBLICATION_UUID"></convai-chat>
184
185
  ```
185
186
 
186
187
  The element renders directly in the host page with Shadow DOM style isolation,
187
188
  automatically mints a fresh grant per connection, and emits `convai-ready`,
188
- `convai-disconnect`, `convai-error`, `convai-copy`, and `convai-session-reset`
189
- DOM events. It accepts `full-window`, `display-name` and `image-url` alongside
190
- the endpoint attributes, and is themed through `--convai-chat-*` custom
191
- properties — see [the published chat guide](docs/convai_published_chat.md#the-convai-chat-element). The production bundle uses
189
+ `convai-disconnect`, and `convai-error` DOM events. The production bundle uses
192
190
  `https://api.convai.com` and `https://realtime-api.convai.com` only as defaults
193
191
  for a hand-written SaaS integration. Platform-generated snippets always emit
194
192
  the deployment's public Character API and Core endpoints explicitly, so an
@@ -203,10 +201,6 @@ still requires no credential:
203
201
  ></convai-chat>
204
202
  ```
205
203
 
206
- Replace `<SDK_VERSION>` with the exact published package version. Do not use
207
- `latest`: generated embed snippets must stay bound to the SDK version validated
208
- for their target environment.
209
-
210
204
  Descriptor and grant endpoints must allow credential-free cross-origin `GET`
211
205
  and `POST` requests. The embed never receives a publisher API key, character
212
206
  configuration, or reusable launch token.
@@ -243,12 +237,6 @@ Full documentation is at **<a href="https://docs.convai.com/api-docs/plugins-and
243
237
  | <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/error-handling" target="_blank" rel="noopener noreferrer">Error Handling</a> | `error`, `disconnect`, `serverResponse`, retry patterns |
244
238
  | <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/auth-tokens" target="_blank" rel="noopener noreferrer">Auth Tokens</a> | Server-side token exchange for production |
245
239
  | <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/websocket-transport-layer" target="_blank" rel="noopener noreferrer">WebSocket Transport</a> | Alternative transport for WebRTC-constrained environments |
246
- | <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">SSE Transport</a> | Text-only interaction transport; the one that runs under Node |
247
- | [Character Versioning](docs/convai_character_versioning.md) | Connect to a draft, latest, or tagged version; list, compare, release and promote versions |
248
- | [Multi-Character Rooms](docs/convai_multi_character.md) | Rosters, `joinRoom`, interaction targets, live roster updates, per-member attribution |
249
- | [Published Text Chat](docs/convai_published_chat.md) | Grant-based text-only sessions, `<convai-chat>`, lifecycle and API reference |
250
- | [Link Previews](docs/convai_link_previews.md) | Rendering links the character sends: previews, custom chat UIs, the scheme allowlist |
251
- | [Events Reference (local)](docs/convai_events.md) | Every event with its typed payload, including the v2 and multi-character events |
252
240
 
253
241
  ---
254
242
 
@@ -265,20 +253,6 @@ Full documentation is at **<a href="https://docs.convai.com/api-docs/plugins-and
265
253
  | `@convai/web-sdk/lipsync-helpers` | Blendshape format utilities and queue helpers |
266
254
  | `@convai/web-sdk/vanilla/websocket` | **Opt-in.** Registers the WebSocket transport. Import alongside `/vanilla` when using `transport: "websocket"`. |
267
255
 
268
- ### Module format
269
-
270
- The package is ESM. Every entry point above also resolves through the `require`
271
- and `default` conditions, so CommonJS tooling — Jest, ts-node, CJS bundlers —
272
- can resolve and mock it:
273
-
274
- ```js
275
- const { ConvaiClient } = require('@convai/web-sdk/core')
276
- ```
277
-
278
- There is no separate CommonJS build; `require()` loads the ESM files directly,
279
- which Node supports from **22.12** onward. On older Node, `import` it or let
280
- your bundler handle the ESM.
281
-
282
256
  ---
283
257
 
284
258
  ## WebSocket transport
@@ -303,134 +277,6 @@ See the <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-p
303
277
 
304
278
  ---
305
279
 
306
- ## SSE interaction transport (beta)
307
-
308
- Use the interaction API for text-only integrations that need a streamed response:
309
-
310
- ```ts
311
- const client = new ConvaiClient({
312
- apiKey: "...",
313
- characterId: "...",
314
- interactionApiUrl: "https://interaction-api-stg.convai.com/v1/interactions",
315
- });
316
-
317
- await client.connect();
318
- client.sendUserTextMessage("Hello!");
319
- ```
320
-
321
- This sends each message as an SSE `POST` with `Authorization: Bearer ...`. Set `transport: "sse"`
322
- explicitly if preferred. SSE carries text only — no voice, video, or lipsync — and it never calls
323
- `/connect`, so `connect()` makes no network request and the session id arrives on the first
324
- interaction via the `characterSessionId` event.
325
-
326
- Because it needs neither WebRTC nor a DOM, this is the only transport that runs outside a browser.
327
- Import `@convai/web-sdk/core` from Node, SSR, or a serverless function — not the root or `/react`
328
- entry points, which pull in browser-only dependencies.
329
-
330
- The interaction API is currently reachable at staging only; a production host is planned.
331
- Full guide: [SSE Interaction Transport](docs/convai_sse_transport.md).
332
-
333
- ---
334
-
335
- ## Character versioning (beta)
336
-
337
- Every character has an editable **draft** and, once released, immutable **tagged versions**
338
- (`1.0`, `1.1`, …). A movable `latest` pointer names the release the runtime uses when a client
339
- connects without a selector. Pick the version to run with `characterVersion`:
340
-
341
- | `characterVersion` | Runs |
342
- | ------------------ | ----------------------------------------------------------------- |
343
- | *(omitted)* | The effective latest — how characters that predate versioning behave |
344
- | `"draft"` | The editable draft, for testing unreleased changes |
345
- | `"latest"` | The promoted latest release, explicitly |
346
- | `"1.2"` / `"1.2.3"` | An immutable tagged version |
347
-
348
- ```tsx
349
- const client = useConvaiClient({
350
- apiKey: "...",
351
- characterId: "...",
352
- characterVersion: "draft",
353
- });
354
- ```
355
-
356
- On the wire the selector is joined to the id as `<uuid>-draft`; `client.characterId` keeps
357
- returning the bare UUID, and `client.characterReference` returns the joined form.
358
-
359
- Manage versions from the same client — `client.characterVersions` is available as soon as the
360
- config has an `apiKey`, before connecting:
361
-
362
- ```ts
363
- const versions = client.characterVersions!;
364
-
365
- const { has_unpublished_changes, draft_revision_id } = await versions.list();
366
- const diff = await versions.diff("latest", "draft", { view: "semantic" });
367
-
368
- await versions.create("1.1", { makeLatest: true }); // release the draft as a tag
369
- await versions.promote("1.0"); // roll back: latest → 1.0
370
- await versions.discardDraft(draft_revision_id!); // throw away unreleased edits
371
- ```
372
-
373
- `CharacterVersionManager` can also be constructed standalone with an `apiKey` or a Convai
374
- personal access token; every method rejects with `CharacterApiError` (`status`, `detail`) on a
375
- non-2xx answer. Point `characterApiUrl` at `https://api2-stg.convai.com` to author against
376
- staging.
377
-
378
- Explicit selectors are resolved by the runtime through the Character REST platform. Staging has
379
- this today; production answers explicit selectors with `503` until it is promoted there.
380
- Full guide: [Character Versioning](docs/convai_character_versioning.md).
381
-
382
- ---
383
-
384
-
385
- ## Multi-character rooms (beta)
386
-
387
- Pass `characters` instead of `characterId` to open a room with several members.
388
- `characters[0]` answers first; the same character id may appear more than once
389
- and each entry is an independent member with its own `membershipId`. Roster
390
- rooms need the LiveKit transport and a nonblank `endUserId`.
391
-
392
- ```ts
393
- const client = new ConvaiClient({
394
- apiKey: "YOUR_API_KEY",
395
- endUserId: "player-42",
396
- characters: [
397
- { characterId: GUIDE }, // initial active member
398
- { characterId: ASSESSOR },
399
- { characterId: GUIDE }, // a second, independent copy of the guide
400
- ],
401
- maxNumParticipants: 2,
402
- });
403
-
404
- client.on("characterReady", (member) => console.log("ready", member.membershipId));
405
- client.on("characterStatus", ({ membershipId, status, failureCode }) => {
406
- if (status === "failed") console.warn(membershipId, failureCode);
407
- });
408
-
409
- await client.connect();
410
-
411
- // Route the next user turns to another member; null closes every gate.
412
- await client.setInteractionTarget(client.characters[1].membershipId);
413
-
414
- // Change the roster on a live room.
415
- await client.updateCharacterRoster({ add: [{ characterId: GUIDE }] });
416
- await client.updateCharacterRoster({ remove: [client.characters[0].membershipId] });
417
-
418
- // Another participant joins the same room without sending any topology.
419
- await other.joinRoom({ roomSessionId: client.roomSession!.roomSessionId, endUserId: "player-7" });
420
- ```
421
-
422
- Key points:
423
-
424
- - `characters` and `characterId` are mutually exclusive, and roster entries take a bare character UUID (no `-draft` / `-1.2` selectors).
425
- - `provisioningStatus` describes dispatch only; a member is usable when its own `characterReady` arrives.
426
- - Transcript rows, `characterAudioTrack` events and `botReady` payloads carry `membershipId`, so two copies of one character never merge.
427
- - Room-topology failures throw `ConvaiRoomError` with `status`, `code`, `requestTraceId` and `isRetryable`; the SDK retries `ROSTER_PROVISIONING_IN_PROGRESS` for you (`rosterProvisioningRetry`).
428
- - Action protocol v2 and `actionConfig.tools` are single-character only and cannot be combined with a roster.
429
-
430
- Full reference: [docs/convai_multi_character.md](docs/convai_multi_character.md).
431
-
432
- ---
433
-
434
280
  ## Vision dynamic context beta
435
281
 
436
282
  Vision dynamic context is the default WebRTC/LiveKit vision path when `enableVideo: true`. Camera, screen, canvas, and custom video tracks can feed unified vision context; set `visionInputConfig.enabled: false` only when you need to keep the video channel while opting out.
@@ -506,7 +352,7 @@ dispatches only Core-validated `items`, and returns one correlated terminal
506
352
  result for every `tool_call`.
507
353
 
508
354
  ```ts
509
- import { ConvaiClient, type ActionResult } from "@convai/web-sdk/core";
355
+ import { ConvaiClient } from "@convai/web-sdk/core";
510
356
 
511
357
  const client = new ConvaiClient({
512
358
  apiKey: "...",
@@ -538,63 +384,49 @@ client.on("modelOutput", async (output) => {
538
384
  if (item.type === "message") renderAssistantText(item.content);
539
385
  if (item.type !== "tool_call") continue;
540
386
 
541
- let terminalResult: ActionResult;
542
387
  try {
543
388
  const result = await executeApprovedTool(item.name, item.arguments);
544
- terminalResult = {
389
+ client.sendActionResult({
545
390
  id: item.id,
546
391
  status: "completed",
547
392
  output: result,
548
- };
393
+ });
549
394
  } catch (error) {
550
- terminalResult = {
395
+ client.sendActionResult({
551
396
  id: item.id,
552
397
  status: "error",
553
398
  error: { message: String(error) },
554
- };
555
- }
556
-
557
- try {
558
- const ack = await client.sendActionResultAndWait(terminalResult, {
559
- timeoutMs: 10_000,
560
399
  });
561
- markResultReported(item.id, ack.idempotent);
562
- } catch (deliveryError) {
563
- markResultDeliveryUncertain(item.id, deliveryError);
564
- // If appropriate for your session lifecycle, retry `terminalResult`
565
- // unchanged. Never execute the tool again merely because its ACK was lost.
566
400
  }
567
401
  }
568
402
  });
569
403
  ```
570
404
 
571
- ### Parallel raw provider output (v2)
405
+ ### Raw provider output in the existing text stream
572
406
 
573
- Model output v2 may provide a separate diagnostics-only raw stream alongside
574
- the unchanged `bot-llm-text` chat stream. Each chunk carries Core's stable
575
- logical-turn correlation id and, on newer Core versions, an invocation id:
407
+ To display every user-visible provider output chunk before Core parses actions
408
+ or display markup, explicitly select raw `bot-llm-text` mode:
576
409
 
577
410
  ```ts
578
411
  const client = new ConvaiClient({
579
412
  apiKey: "...",
580
413
  characterId: "...",
581
- capabilities: { modelOutputVersion: 2 },
414
+ capabilities: { botLlmTextMode: "raw" },
582
415
  });
583
416
 
584
- client.on("botLlmTextRaw", ({ text, logical_turn_id, output_id }) => {
585
- appendRawDiagnostics(output_id ?? logical_turn_id, text);
417
+ client.on("message", (message) => {
418
+ // The existing streaming message event now carries the raw bot-llm-text
419
+ // chunks in provider order. Keep this display stream separate from speech.
420
+ renderChat(message);
586
421
  });
587
422
  ```
588
423
 
589
- The SDK ignores this channel unless Core negotiated `modelOutputVersion: 2`.
590
- Raw chunks never enter `chatMessages`, bot output, TTS, speech, or response
591
- lifecycle state. They are retained for diagnostics and must never be executed
592
- or reparsed. The ordinary `bot-llm-text` text and cadence remain unchanged. On
593
- v2 connections, `ChatMessage.outputId` matches the raw event's optional
594
- `output_id` and the final `modelOutput.output_id`; `logicalTurnId`/
595
- `logical_turn_id` still groups every invocation in the user turn. Older v2 Core
596
- omits the invocation id, so applications can fall back to one turn-level raw
597
- aggregate. Never correlate by arrival order. When v2 is selected, the SDK suppresses the legacy `actionResponse` compatibility
424
+ Omitting `botLlmTextMode` preserves the legacy request and filtered text
425
+ behavior. This capability is independent of `actionProtocolVersion` and
426
+ `modelOutputVersion`.
427
+
428
+ `raw` is retained for diagnostics and must never be executed or reparsed. When
429
+ v2 is selected, the SDK suppresses the legacy `actionResponse` compatibility
598
430
  projection so an application cannot execute the same operation twice.
599
431
 
600
432
  Developer-defined visual output uses data-only `extension` items. Applications
@@ -1,28 +1,8 @@
1
1
  import { Room } from "livekit-client";
2
- import { ConvaiConfig, ConvaiClientState, ChatMessage, IConvaiClient, PublishedChatConnectOptions, AudioControls, VideoControls, ScreenShareControls, DynamicInfo, ContextUpdateOptions, UploadFileOptions, ServerResponse, WebSocketSessionFactory, RespondModeUpdateOptions, UpdateSceneMetadataOptions, VisionStatusOptions, VisionTriggerOptions, ConnectionData, SendUserTextMessageOptions, ConvaiCharacterInstance, ConvaiRoomSession, JoinRoomOptions, ActiveCharacterChange, CharacterRosterChange, UpdateCharacterRosterOptions, AppendMessageOptions, ConvaiEventMap, ActionResult, ActionResultAck, ActionResultAckFailureReason, ActionResultAckOptions } from "./types.js";
2
+ import { ConvaiConfig, ConvaiClientState, ChatMessage, IConvaiClient, PublishedChatConnectOptions, AudioControls, VideoControls, ScreenShareControls, DynamicInfo, ContextUpdateOptions, UploadFileOptions, WebSocketSessionFactory, RespondModeUpdateOptions, UpdateSceneMetadataOptions, VisionStatusOptions, VisionTriggerOptions, ActionResult, SendUserTextMessageOptions } from "./types.js";
3
3
  import { EventEmitter } from "./EventEmitter.js";
4
4
  import { BlendshapeQueue } from "./BlendshapeQueue.js";
5
5
  import { MemoryManager } from "./MemoryManager.js";
6
- import { CharacterVersionManager } from "./CharacterVersionManager.js";
7
- import { type CharacterVersionSelector } from "./characterReference.js";
8
- /**
9
- * Rejection from {@link ConvaiClient.sendActionResultAndWait} after local
10
- * validation succeeds. Inspect `reason` rather than parsing the message.
11
- */
12
- export declare class ActionResultAckError extends Error {
13
- readonly reason: ActionResultAckFailureReason;
14
- readonly toolCallId: string;
15
- readonly errorCode?: string;
16
- readonly response?: ServerResponse;
17
- readonly cause?: unknown;
18
- constructor(message: string, options: {
19
- reason: ActionResultAckFailureReason;
20
- toolCallId: string;
21
- errorCode?: string;
22
- response?: ServerResponse;
23
- cause?: unknown;
24
- });
25
- }
26
6
  /**
27
7
  * Main Convai client class for managing AI voice assistant connections
28
8
  * Provides complete interface for connecting to Convai's voice assistants,
@@ -66,16 +46,7 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
66
46
  private _apiKey;
67
47
  private _authToken;
68
48
  private _characterId;
69
- private _characterVersion;
70
- private _characterReference;
71
- private _characterVersionManager;
72
- private _characterVersionManagerKey;
73
49
  private _characterSessionId;
74
- /** Roster state for multi-character rooms. Empty for single-character sessions. */
75
- private _roster;
76
- /** Roster commands awaiting their ack, keyed by command id. */
77
- private _pendingRosterCommands;
78
- private _rosterCommandSeq;
79
50
  private _requestTraceId;
80
51
  private _isBotReady;
81
52
  private _participantSid;
@@ -90,17 +61,14 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
90
61
  private _endUserMetadata;
91
62
  private _wsSession;
92
63
  private _activeTransport;
93
- private _sseSession;
94
64
  private _logRtviMessages;
95
65
  private _isDisconnecting;
96
66
  private _isPublishedChatSession;
97
67
  private _clientReadyRetryTimer;
98
68
  private _clientReadyTimeoutTimer;
99
69
  private _clientReadyMsgId;
100
- private _pendingActionResultAcks;
101
70
  private static readonly CLIENT_READY_RETRY_MS;
102
71
  private static readonly CLIENT_READY_TIMEOUT_MS;
103
- private static readonly ACTION_RESULT_ACK_TIMEOUT_MS;
104
72
  /**
105
73
  * Register the WebSocket transport factory. Called automatically as a side-effect
106
74
  * when you import `@convai/web-sdk/vanilla/websocket` (or the react equivalent).
@@ -122,48 +90,10 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
122
90
  get apiKey(): string | null;
123
91
  get authToken(): string | null;
124
92
  get characterId(): string | null;
125
- get characterVersion(): CharacterVersionSelector | null;
126
- get characterReference(): string | null;
127
- /**
128
- * Character version manager for the configured character. Built from the
129
- * live connection when there is one, otherwise from the stored config, so
130
- * versions can be listed and released before connecting. Null without an
131
- * API key (the Character REST platform does not accept realtime auth tokens).
132
- */
133
- get characterVersions(): CharacterVersionManager | null;
134
93
  get room(): Room;
135
94
  get chatMessages(): ChatMessage[];
136
95
  get userTranscription(): string;
137
96
  get characterSessionId(): string | null;
138
- /**
139
- * Subscribe to a client event. Typed against {@link ConvaiEventMap}, so a
140
- * listener for a known event gets its payload inferred instead of `any`.
141
- * The plain-string form is kept so existing callers and dynamic event names
142
- * still build -- which also means a misspelt literal is not a compile error.
143
- */
144
- on<E extends keyof ConvaiEventMap>(event: E, callback: (...args: ConvaiEventMap[E]) => void): () => void;
145
- on(event: string, callback: (...args: any[]) => void): () => void;
146
- /**
147
- * Server-owned snapshot of a multi-character room, or null for a
148
- * single-character session. Carries the room id, epochs and roster.
149
- */
150
- get roomSession(): ConvaiRoomSession | null;
151
- /**
152
- * Character instances in a multi-character room, in roster order. Empty for a
153
- * single-character session, so `length` distinguishes the two.
154
- */
155
- get characters(): ConvaiCharacterInstance[];
156
- /** Membership currently receiving user turns, or null. */
157
- get activeMembershipId(): string | null;
158
- /**
159
- * Start or stop the server streaming per-turn usage/cost breakdowns as
160
- * `usageUpdate` events. Informational only; server-side usage tracking and
161
- * billing are unaffected either way.
162
- */
163
- toggleUsageUpdates(enabled: boolean): void;
164
- /** Insert a transcript line locally. Nothing is sent; nothing is billed. */
165
- appendMessage(message: AppendMessageOptions): ChatMessage;
166
- /** Trace id of the /connect that produced this session; quote it to backend support. */
167
97
  get requestTraceId(): string | null;
168
98
  get isBotReady(): boolean;
169
99
  get audioControls(): AudioControls;
@@ -192,11 +122,6 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
192
122
  * For WebSocket: sends via PipecatClient.sendClientMessage (wrapped in {t,d} envelope).
193
123
  */
194
124
  private publishMessage;
195
- /**
196
- * Publish exactly one message while retaining the transport's local completion
197
- * signal. Server acceptance is still proved separately by `serverResponse`.
198
- */
199
- private publishMessageAndWaitForLocalPublication;
200
125
  /**
201
126
  * Returns true when a message can be sent on the active transport.
202
127
  */
@@ -205,113 +130,6 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
205
130
  * Connect to a Convai character
206
131
  */
207
132
  connect(config?: ConvaiConfig): Promise<void>;
208
- /**
209
- * Complete a connection from an already-fetched /connect response body.
210
- *
211
- * `connect()` fetches /connect and then calls this internally. Call it
212
- * directly when the response was obtained elsewhere — a server-side session
213
- * manager, or the embed's connect-proxy flow, where the API key must never
214
- * reach the browser.
215
- *
216
- * @example
217
- * // Server (customer's backend): holds the API key, calls Convai's
218
- * // /connect, and relays the response body verbatim.
219
- * // Browser: never sees the API key, only the relayed response.
220
- * const data = await fetch('/api/convai-connect', {
221
- * method: 'POST',
222
- * headers: { 'Content-Type': 'application/json' },
223
- * body: JSON.stringify({ characterId: 'your-character-id' }),
224
- * }).then(r => r.json())
225
- * await client.connectWithConnectionData(data)
226
- */
227
- connectWithConnectionData(data: ConnectionData, config?: ConvaiConfig): Promise<void>;
228
- /**
229
- * How long to wait for a roster command's ack.
230
- *
231
- * A timeout is *not* a failure. Every character participant observes the
232
- * broadcast and duplicate forwards are response-suppressed after one actor
233
- * answers, so a lost ack is an expected outcome. The contract's rule is to
234
- * treat it as unknown and reconcile from the next authoritative snapshot,
235
- * which is what the rejection below tells the caller to do.
236
- */
237
- private static readonly ROSTER_COMMAND_TIMEOUT_MS;
238
- /** Correlate roster acks back to the promise that issued the command. */
239
- private _handleRosterServerResponse;
240
- /**
241
- * Settle every in-flight roster command.
242
- *
243
- * Without this a caller who disconnects mid-command keeps a live 10s timer
244
- * and gets a rejection long after the session ended -- an unhandled rejection
245
- * if they stopped awaiting when they tore the client down. The roster is
246
- * reset alongside, so the command could not be applied meaningfully anyway.
247
- */
248
- private _failPendingRosterCommands;
249
- private _pushRosterState;
250
- /** Publish a roster command and settle when its ack arrives. */
251
- private _sendRosterCommand;
252
- /**
253
- * Route subsequent user turns to a different character instance.
254
- *
255
- * Pass null to close every gate, so no member consumes the user until a
256
- * target is set again.
257
- */
258
- setInteractionTarget(membershipId: string | null): Promise<ActiveCharacterChange>;
259
- /** Add or remove character instances on a live room, without reconnecting. */
260
- updateCharacterRoster(options: UpdateCharacterRosterOptions): Promise<CharacterRosterChange>;
261
- /** Default bounded retry while a roster room is still provisioning. */
262
- private static readonly ROSTER_RETRY_ATTEMPTS;
263
- private static readonly ROSTER_RETRY_INITIAL_MS;
264
- /**
265
- * Run a room request, retrying only the conflicts that mean "still working".
266
- *
267
- * The runtime answers a create that collides with an in-flight identical
268
- * create with 409 `ROSTER_PROVISIONING_IN_PROGRESS`, and the documented
269
- * recovery is to retry the same key with bounded backoff. Left to callers,
270
- * every integration reimplements that, usually without a cap. The payload is
271
- * replayed verbatim -- changing it would turn the retry into a fingerprint
272
- * mismatch.
273
- */
274
- private _withProvisioningRetry;
275
- /**
276
- * Join a multi-character room that already exists.
277
- *
278
- * A join supplies a locator and the joining human, and nothing else: the
279
- * roster is server-owned, so resending topology is rejected. It never spawns,
280
- * removes or repairs a character -- only room creation does that.
281
- *
282
- * Capacity counts distinct speakers derived from `endUserId`, and defaults to
283
- * one, so raise `maxNumParticipants` at creation before expecting a second
284
- * human to get in.
285
- *
286
- * @example
287
- * ```ts
288
- * const client = new ConvaiClient({ apiKey: 'YOUR_API_KEY' })
289
- * await client.joinRoom({
290
- * roomSessionId: 'the-room-session-id',
291
- * endUserId: 'player-99',
292
- * })
293
- * ```
294
- */
295
- joinRoom(options: JoinRoomOptions): Promise<void>;
296
- /**
297
- * Add default URL, apply RTVI-logging config, and validate that either an
298
- * API key or auth token plus a character ID are present.
299
- * Shared by connect() and connectWithConnectionData() so both derive
300
- * `configWithDefaults` identically.
301
- *
302
- * `connect()` performs its own /connect fetch and always needs a credential
303
- * to do so, so it uses the default `requireCredential: true`.
304
- * `connectWithConnectionData()` consumes a response obtained elsewhere (e.g.
305
- * a proxy that holds the credential server-side) and passes
306
- * `requireCredential: false` — a character ID is still required either way.
307
- */
308
- private applyConfigDefaults;
309
- /**
310
- * Consume a /connect response and bring up the transport.
311
- * `connect()` calls this after its own fetch; external callers use it
312
- * when the response came from a proxy.
313
- */
314
- private consumeConnectionData;
315
133
  private cleanupWebSocketSessionAfterConnectFailure;
316
134
  /**
317
135
  * Connect to a published text-chat revision without publisher credentials.
@@ -353,13 +171,6 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
353
171
  * Return a correlated terminal result for a client-executed tool call.
354
172
  */
355
173
  sendActionResult(result: ActionResult): void;
356
- /**
357
- * Publish one correlated terminal result and wait for Core's exact
358
- * `server-response` acknowledgement. This method performs one publication;
359
- * callers own any idempotent retry policy.
360
- */
361
- sendActionResultAndWait(result: ActionResult, options?: ActionResultAckOptions): Promise<ActionResultAck>;
362
- private buildActionResultPayload;
363
174
  /**
364
175
  * Send a trigger message to invoke specific character actions
365
176
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ConvaiClient.d.ts","sourceRoot":"","sources":["../../src/core/ConvaiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAML,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,WAAW,EAEX,aAAa,EACb,2BAA2B,EAC3B,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EAGd,uBAAuB,EACvB,wBAAwB,EAExB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EAGpB,cAAc,EACd,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EAEf,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAE5B,oBAAoB,EAEpB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EAKvB,MAAM,SAAS,CAAC;AAgBjB,OAAO,EAAE,YAAY,EAAsB,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