@convai/web-sdk 1.8.0-beta.6 → 1.8.0-beta.8
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/README.md +303 -1
- package/dist/core/ConvaiClient.d.ts +59 -2
- package/dist/core/ConvaiClient.d.ts.map +1 -1
- package/dist/core/ConvaiClient.js +457 -6
- package/dist/core/ConvaiClient.js.map +1 -1
- package/dist/core/MessageHandler.d.ts +11 -0
- package/dist/core/MessageHandler.d.ts.map +1 -1
- package/dist/core/MessageHandler.js +325 -30
- package/dist/core/MessageHandler.js.map +1 -1
- package/dist/core/SSESession.js +2 -2
- package/dist/core/SSESession.js.map +1 -1
- package/dist/core/connectRequest.d.ts +38 -3
- package/dist/core/connectRequest.d.ts.map +1 -1
- package/dist/core/connectRequest.js +57 -11
- package/dist/core/connectRequest.js.map +1 -1
- package/dist/core/index.d.ts +5 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +8 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/logicalTurn.d.ts +4 -1
- package/dist/core/logicalTurn.d.ts.map +1 -1
- package/dist/core/logicalTurn.js +35 -4
- package/dist/core/logicalTurn.js.map +1 -1
- package/dist/core/modelOutput.d.ts +40 -0
- package/dist/core/modelOutput.d.ts.map +1 -0
- package/dist/core/modelOutput.js +187 -0
- package/dist/core/modelOutput.js.map +1 -0
- package/dist/core/publishedChat.d.ts +9 -0
- package/dist/core/publishedChat.d.ts.map +1 -0
- package/dist/core/publishedChat.js +13 -0
- package/dist/core/publishedChat.js.map +1 -0
- package/dist/core/types.d.ts +225 -25
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/embed/ConvaiChatElement.d.ts +103 -0
- package/dist/embed/ConvaiChatElement.d.ts.map +1 -0
- package/dist/embed/ConvaiChatElement.js +679 -0
- package/dist/embed/ConvaiChatElement.js.map +1 -0
- package/dist/embed/browser.d.ts +3 -0
- package/dist/embed/browser.d.ts.map +1 -0
- package/dist/embed/browser.js +5 -0
- package/dist/embed/browser.js.map +1 -0
- package/dist/embed/chat-embed-v1.js +200 -0
- package/dist/embed/chat-embed-v1.js.map +7 -0
- package/dist/embed/index.d.ts +9 -0
- package/dist/embed/index.d.ts.map +1 -0
- package/dist/embed/index.js +9 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/embed/publicationApi.d.ts +23 -0
- package/dist/embed/publicationApi.d.ts.map +1 -0
- package/dist/embed/publicationApi.js +141 -0
- package/dist/embed/publicationApi.js.map +1 -0
- package/dist/react/components/ConvaiWidget.d.ts +11 -1
- package/dist/react/components/ConvaiWidget.d.ts.map +1 -1
- package/dist/react/components/ConvaiWidget.js +67 -11
- package/dist/react/components/ConvaiWidget.js.map +1 -1
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +7 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +1 -1
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +111 -17
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -1
- package/dist/react/components/rtc-widget/components/UserMessage.js +1 -1
- package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +2 -2
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +1 -1
- package/dist/react/hooks/useConvaiClient.d.ts +2 -0
- package/dist/react/hooks/useConvaiClient.d.ts.map +1 -1
- package/dist/react/hooks/useConvaiClient.js +8 -0
- package/dist/react/hooks/useConvaiClient.js.map +1 -1
- package/dist/react/index.d.ts +4 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +8 -1
- package/dist/react/index.js.map +1 -1
- package/dist/utils/inlineMarkdown.d.ts +22 -0
- package/dist/utils/inlineMarkdown.d.ts.map +1 -1
- package/dist/utils/inlineMarkdown.js +84 -7
- package/dist/utils/inlineMarkdown.js.map +1 -1
- package/dist/vanilla/ConvaiWidget.d.ts.map +1 -1
- package/dist/vanilla/ConvaiWidget.js +290 -43
- package/dist/vanilla/ConvaiWidget.js.map +1 -1
- package/dist/vanilla/WidgetEventSubscriptions.d.ts +15 -0
- package/dist/vanilla/WidgetEventSubscriptions.d.ts.map +1 -0
- package/dist/vanilla/WidgetEventSubscriptions.js +37 -0
- package/dist/vanilla/WidgetEventSubscriptions.js.map +1 -0
- package/dist/vanilla/index.d.ts +3 -1
- package/dist/vanilla/index.d.ts.map +1 -1
- package/dist/vanilla/index.js +3 -1
- package/dist/vanilla/index.js.map +1 -1
- package/dist/vanilla/styles.d.ts.map +1 -1
- package/dist/vanilla/styles.js +12 -0
- package/dist/vanilla/styles.js.map +1 -1
- package/dist/vanilla/types.d.ts +8 -1
- package/dist/vanilla/types.d.ts.map +1 -1
- package/dist/vanilla/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +48 -13
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Real-time conversational AI characters for the web.**
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@convai/web-sdk)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
|
|
@@ -14,6 +14,11 @@ TypeScript-first SDK for embedding Convai AI characters into React and vanilla J
|
|
|
14
14
|
|
|
15
15
|
Install the beta with `npm install @convai/web-sdk@beta`.
|
|
16
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.
|
|
17
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)
|
|
18
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)
|
|
19
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.
|
|
@@ -43,6 +48,10 @@ Install the beta with `npm install @convai/web-sdk@beta`.
|
|
|
43
48
|
- **Dynamic context & vision** — inject text state, scene metadata, and LiveKit video frames mid-session
|
|
44
49
|
- **Actions & Narrative Design** — typed action decisions with parameterized targets, named triggers, and per-session template keys
|
|
45
50
|
- **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`
|
|
46
55
|
- **Character versioning** — connect to a draft, latest, or tagged version, and manage releases from the client
|
|
47
56
|
- **File upload** — send images to the character during a live session
|
|
48
57
|
- **WebSocket transport** — opt-in alternative to WebRTC for constrained networks
|
|
@@ -101,6 +110,117 @@ window.addEventListener("beforeunload", () => {
|
|
|
101
110
|
});
|
|
102
111
|
```
|
|
103
112
|
|
|
113
|
+
### Published text chat
|
|
114
|
+
|
|
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
|
+
Published chat pages use a short-lived launch grant instead of the publisher's
|
|
120
|
+
API key. Native Web SDK integration is the recommended embed path; an iframe is
|
|
121
|
+
not required. Obtain the grant from the public Character API and pass it to the
|
|
122
|
+
core client:
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
import { ConvaiClient } from '@convai/web-sdk/core';
|
|
126
|
+
import { requestPublishedChatGrant } from '@convai/web-sdk/embed';
|
|
127
|
+
|
|
128
|
+
const launchToken = await requestPublishedChatGrant(
|
|
129
|
+
`${characterApiUrl}/chat-publications/${publicationId}/launch-grants`,
|
|
130
|
+
);
|
|
131
|
+
const client = new ConvaiClient();
|
|
132
|
+
const unsubscribe = client.on('botReady', () => {
|
|
133
|
+
unsubscribe();
|
|
134
|
+
client.sendUserTextMessage('Hello!');
|
|
135
|
+
});
|
|
136
|
+
await client.connectWithPublicationGrant(launchToken);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The grant is single-use and is not retained for reconnect. Request a new grant
|
|
140
|
+
for each new session. The SDK attaches a browser-generated logical attempt ID
|
|
141
|
+
and retries one transient grant exchange with that same ID, so a response lost
|
|
142
|
+
after server-side consumption does not strand the token or create a duplicate
|
|
143
|
+
session. An application performing its own retry may pass the same
|
|
144
|
+
`connectAttemptId` option with the same launch token. Published chat is
|
|
145
|
+
text-only; the server-issued room token does not permit publishing microphone
|
|
146
|
+
or camera tracks.
|
|
147
|
+
|
|
148
|
+
The `@convai/web-sdk/embed` browser element creates its own per-browser
|
|
149
|
+
requester identifier. If a server or SSR integration calls its published-chat
|
|
150
|
+
grant helpers directly, it must pass a caller-scoped requester identifier; do
|
|
151
|
+
not reuse a process-wide identifier across visitors.
|
|
152
|
+
|
|
153
|
+
When using `ConvaiWidget`, provide `requestPublicationGrant` so Reset,
|
|
154
|
+
Disconnect, and later reopen operations mint a new grant instead of attempting
|
|
155
|
+
to reuse the consumed token:
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
<ConvaiWidget
|
|
159
|
+
convaiClient={client}
|
|
160
|
+
publishedChatDescriptor={{
|
|
161
|
+
display_name: publication.display_name,
|
|
162
|
+
image_url: publication.image_url,
|
|
163
|
+
}}
|
|
164
|
+
requestPublicationGrant={async () => {
|
|
165
|
+
const response = await fetch(`/api/chat/${publicationId}/grant`, {
|
|
166
|
+
method: 'POST',
|
|
167
|
+
});
|
|
168
|
+
if (!response.ok) throw new Error('Unable to relaunch published chat');
|
|
169
|
+
return (await response.json()).launch_token;
|
|
170
|
+
}}
|
|
171
|
+
/>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
For copy/paste installation without an application build step, deploy the
|
|
175
|
+
versioned browser artifact at `dist/embed/chat-embed-v1.js` and use its native
|
|
176
|
+
custom element:
|
|
177
|
+
|
|
178
|
+
```html
|
|
179
|
+
<script
|
|
180
|
+
type="module"
|
|
181
|
+
src="https://cdn.jsdelivr.net/npm/@convai/web-sdk@<SDK_VERSION>/dist/embed/chat-embed-v1.js"
|
|
182
|
+
></script>
|
|
183
|
+
<convai-chat publication-id="PUBLICATION_UUID"></convai-chat>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The element renders directly in the host page with Shadow DOM style isolation,
|
|
187
|
+
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
|
|
192
|
+
`https://api.convai.com` and `https://realtime-api.convai.com` only as defaults
|
|
193
|
+
for a hand-written SaaS integration. Platform-generated snippets always emit
|
|
194
|
+
the deployment's public Character API and Core endpoints explicitly, so an
|
|
195
|
+
on-prem or non-production embed never falls through to another deployment and
|
|
196
|
+
still requires no credential:
|
|
197
|
+
|
|
198
|
+
```html
|
|
199
|
+
<convai-chat
|
|
200
|
+
publication-id="PUBLICATION_UUID"
|
|
201
|
+
publication-api-url="https://character-api.example.com"
|
|
202
|
+
core-url="https://realtime.example.com"
|
|
203
|
+
></convai-chat>
|
|
204
|
+
```
|
|
205
|
+
|
|
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
|
+
Descriptor and grant endpoints must allow credential-free cross-origin `GET`
|
|
211
|
+
and `POST` requests. The embed never receives a publisher API key, character
|
|
212
|
+
configuration, or reusable launch token.
|
|
213
|
+
|
|
214
|
+
For customer-managed and GovCloud deployments, the repository also builds a
|
|
215
|
+
browser-only image from `deploy/published-chat/Dockerfile`. It serves the exact
|
|
216
|
+
released bundle at `/sdk/chat-embed-v1.js` on port `8080`, plus `/healthz`, and
|
|
217
|
+
contains no API key or cloud identity. The manual `build-onprem` workflow
|
|
218
|
+
requires an immutable semver tag matching `package.json`, refuses to overwrite
|
|
219
|
+
an existing Docker Hub tag, and publishes both amd64 and arm64 images. Pin the
|
|
220
|
+
resulting digest in the deployment repository; do not make an on-prem browser
|
|
221
|
+
depend on jsDelivr, npm availability, GCP workload identity, or the Experience
|
|
222
|
+
application image.
|
|
223
|
+
|
|
104
224
|
---
|
|
105
225
|
|
|
106
226
|
## Documentation
|
|
@@ -125,6 +245,10 @@ Full documentation is at **<a href="https://docs.convai.com/api-docs/plugins-and
|
|
|
125
245
|
| <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 |
|
|
126
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 |
|
|
127
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 |
|
|
128
252
|
|
|
129
253
|
---
|
|
130
254
|
|
|
@@ -136,9 +260,25 @@ Full documentation is at **<a href="https://docs.convai.com/api-docs/plugins-and
|
|
|
136
260
|
| `@convai/web-sdk/react` | Same as default (React-explicit alias) |
|
|
137
261
|
| `@convai/web-sdk/vanilla` | `ConvaiClient`, `createConvaiWidget`, `AudioRenderer` |
|
|
138
262
|
| `@convai/web-sdk/core` | Framework-agnostic `ConvaiClient`, managers, and all types |
|
|
263
|
+
| `@convai/web-sdk/embed` | Server-safe publication descriptor and grant helpers |
|
|
264
|
+
| `@convai/web-sdk/embed/browser` | Self-contained browser bundle that registers `<convai-chat>` |
|
|
139
265
|
| `@convai/web-sdk/lipsync-helpers` | Blendshape format utilities and queue helpers |
|
|
140
266
|
| `@convai/web-sdk/vanilla/websocket` | **Opt-in.** Registers the WebSocket transport. Import alongside `/vanilla` when using `transport: "websocket"`. |
|
|
141
267
|
|
|
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
|
+
|
|
142
282
|
---
|
|
143
283
|
|
|
144
284
|
## WebSocket transport
|
|
@@ -242,6 +382,55 @@ Full guide: [Character Versioning](docs/convai_character_versioning.md).
|
|
|
242
382
|
---
|
|
243
383
|
|
|
244
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
|
+
|
|
245
434
|
## Vision dynamic context beta
|
|
246
435
|
|
|
247
436
|
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.
|
|
@@ -309,6 +498,119 @@ client.on("actionResponse", ({ actions }: ActionResponseEvent) => {
|
|
|
309
498
|
});
|
|
310
499
|
```
|
|
311
500
|
|
|
501
|
+
### Agentic actions and canonical model output (v2)
|
|
502
|
+
|
|
503
|
+
The v2 protocol is an explicit opt-in. Existing connections continue to receive
|
|
504
|
+
the v1 `actionResponse` contract. A v2 client declares tools at connect time,
|
|
505
|
+
dispatches only Core-validated `items`, and returns one correlated terminal
|
|
506
|
+
result for every `tool_call`.
|
|
507
|
+
|
|
508
|
+
```ts
|
|
509
|
+
import { ConvaiClient, type ActionResult } from "@convai/web-sdk/core";
|
|
510
|
+
|
|
511
|
+
const client = new ConvaiClient({
|
|
512
|
+
apiKey: "...",
|
|
513
|
+
characterId: "...",
|
|
514
|
+
capabilities: {
|
|
515
|
+
actionProtocolVersion: 2,
|
|
516
|
+
modelOutputVersion: 2,
|
|
517
|
+
},
|
|
518
|
+
actionConfig: {
|
|
519
|
+
actions: [],
|
|
520
|
+
objects: [],
|
|
521
|
+
characters: [],
|
|
522
|
+
tools: [
|
|
523
|
+
{
|
|
524
|
+
name: "search_documents",
|
|
525
|
+
description: "Search the user's approved document collection",
|
|
526
|
+
inputSchema: {
|
|
527
|
+
type: "object",
|
|
528
|
+
properties: { query: { type: "string" } },
|
|
529
|
+
required: ["query"],
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
],
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
client.on("modelOutput", async (output) => {
|
|
537
|
+
for (const item of output.items) {
|
|
538
|
+
if (item.type === "message") renderAssistantText(item.content);
|
|
539
|
+
if (item.type !== "tool_call") continue;
|
|
540
|
+
|
|
541
|
+
let terminalResult: ActionResult;
|
|
542
|
+
try {
|
|
543
|
+
const result = await executeApprovedTool(item.name, item.arguments);
|
|
544
|
+
terminalResult = {
|
|
545
|
+
id: item.id,
|
|
546
|
+
status: "completed",
|
|
547
|
+
output: result,
|
|
548
|
+
};
|
|
549
|
+
} catch (error) {
|
|
550
|
+
terminalResult = {
|
|
551
|
+
id: item.id,
|
|
552
|
+
status: "error",
|
|
553
|
+
error: { message: String(error) },
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
try {
|
|
558
|
+
const ack = await client.sendActionResultAndWait(terminalResult, {
|
|
559
|
+
timeoutMs: 10_000,
|
|
560
|
+
});
|
|
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
|
+
}
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Parallel raw provider output (v2)
|
|
572
|
+
|
|
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:
|
|
576
|
+
|
|
577
|
+
```ts
|
|
578
|
+
const client = new ConvaiClient({
|
|
579
|
+
apiKey: "...",
|
|
580
|
+
characterId: "...",
|
|
581
|
+
capabilities: { modelOutputVersion: 2 },
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
client.on("botLlmTextRaw", ({ text, logical_turn_id, output_id }) => {
|
|
585
|
+
appendRawDiagnostics(output_id ?? logical_turn_id, text);
|
|
586
|
+
});
|
|
587
|
+
```
|
|
588
|
+
|
|
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
|
|
598
|
+
projection so an application cannot execute the same operation twice.
|
|
599
|
+
|
|
600
|
+
Developer-defined visual output uses data-only `extension` items. Applications
|
|
601
|
+
register a renderer for a specific schema and version; unknown schemas use the
|
|
602
|
+
server-provided text fallback or remain unhandled. The SDK never evaluates code
|
|
603
|
+
from a model output.
|
|
604
|
+
|
|
605
|
+
```ts
|
|
606
|
+
import { ModelOutputExtensionRegistry } from "@convai/web-sdk/core";
|
|
607
|
+
|
|
608
|
+
const extensions = new ModelOutputExtensionRegistry<HTMLElement>();
|
|
609
|
+
extensions.register("com.example/status-card", 1, ({ payload }) =>
|
|
610
|
+
renderStatusCard(payload),
|
|
611
|
+
);
|
|
612
|
+
```
|
|
613
|
+
|
|
312
614
|
---
|
|
313
615
|
|
|
314
616
|
## Narrative Design template keys
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { Room } from "livekit-client";
|
|
2
|
-
import { ConvaiConfig, ConvaiClientState, ChatMessage, IConvaiClient, AudioControls, VideoControls, ScreenShareControls, DynamicInfo, ContextUpdateOptions, UploadFileOptions, WebSocketSessionFactory, RespondModeUpdateOptions, UpdateSceneMetadataOptions, VisionStatusOptions, VisionTriggerOptions, ConnectionData, SendUserTextMessageOptions, ConvaiCharacterInstance, ConvaiRoomSession, JoinRoomOptions, ActiveCharacterChange, CharacterRosterChange, UpdateCharacterRosterOptions, AppendMessageOptions } from "./types.js";
|
|
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";
|
|
3
3
|
import { EventEmitter } from "./EventEmitter.js";
|
|
4
4
|
import { BlendshapeQueue } from "./BlendshapeQueue.js";
|
|
5
5
|
import { MemoryManager } from "./MemoryManager.js";
|
|
6
6
|
import { CharacterVersionManager } from "./CharacterVersionManager.js";
|
|
7
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
|
+
}
|
|
8
26
|
/**
|
|
9
27
|
* Main Convai client class for managing AI voice assistant connections
|
|
10
28
|
* Provides complete interface for connecting to Convai's voice assistants,
|
|
@@ -58,6 +76,7 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
58
76
|
/** Roster commands awaiting their ack, keyed by command id. */
|
|
59
77
|
private _pendingRosterCommands;
|
|
60
78
|
private _rosterCommandSeq;
|
|
79
|
+
private _requestTraceId;
|
|
61
80
|
private _isBotReady;
|
|
62
81
|
private _participantSid;
|
|
63
82
|
private _audioSettings;
|
|
@@ -74,11 +93,14 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
74
93
|
private _sseSession;
|
|
75
94
|
private _logRtviMessages;
|
|
76
95
|
private _isDisconnecting;
|
|
96
|
+
private _isPublishedChatSession;
|
|
77
97
|
private _clientReadyRetryTimer;
|
|
78
98
|
private _clientReadyTimeoutTimer;
|
|
79
99
|
private _clientReadyMsgId;
|
|
100
|
+
private _pendingActionResultAcks;
|
|
80
101
|
private static readonly CLIENT_READY_RETRY_MS;
|
|
81
102
|
private static readonly CLIENT_READY_TIMEOUT_MS;
|
|
103
|
+
private static readonly ACTION_RESULT_ACK_TIMEOUT_MS;
|
|
82
104
|
/**
|
|
83
105
|
* Register the WebSocket transport factory. Called automatically as a side-effect
|
|
84
106
|
* when you import `@convai/web-sdk/vanilla/websocket` (or the react equivalent).
|
|
@@ -95,7 +117,8 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
95
117
|
private _memoryManager;
|
|
96
118
|
constructor(config?: ConvaiConfig);
|
|
97
119
|
get state(): ConvaiClientState;
|
|
98
|
-
get connectionType(): "audio" | "video" | null;
|
|
120
|
+
get connectionType(): "audio" | "video" | "text" | null;
|
|
121
|
+
get isPublishedChatSession(): boolean;
|
|
99
122
|
get apiKey(): string | null;
|
|
100
123
|
get authToken(): string | null;
|
|
101
124
|
get characterId(): string | null;
|
|
@@ -112,6 +135,14 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
112
135
|
get chatMessages(): ChatMessage[];
|
|
113
136
|
get userTranscription(): string;
|
|
114
137
|
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;
|
|
115
146
|
/**
|
|
116
147
|
* Server-owned snapshot of a multi-character room, or null for a
|
|
117
148
|
* single-character session. Carries the room id, epochs and roster.
|
|
@@ -132,6 +163,8 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
132
163
|
toggleUsageUpdates(enabled: boolean): void;
|
|
133
164
|
/** Insert a transcript line locally. Nothing is sent; nothing is billed. */
|
|
134
165
|
appendMessage(message: AppendMessageOptions): ChatMessage;
|
|
166
|
+
/** Trace id of the /connect that produced this session; quote it to backend support. */
|
|
167
|
+
get requestTraceId(): string | null;
|
|
135
168
|
get isBotReady(): boolean;
|
|
136
169
|
get audioControls(): AudioControls;
|
|
137
170
|
get videoControls(): VideoControls;
|
|
@@ -159,6 +192,11 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
159
192
|
* For WebSocket: sends via PipecatClient.sendClientMessage (wrapped in {t,d} envelope).
|
|
160
193
|
*/
|
|
161
194
|
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;
|
|
162
200
|
/**
|
|
163
201
|
* Returns true when a message can be sent on the active transport.
|
|
164
202
|
*/
|
|
@@ -275,6 +313,14 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
275
313
|
*/
|
|
276
314
|
private consumeConnectionData;
|
|
277
315
|
private cleanupWebSocketSessionAfterConnectFailure;
|
|
316
|
+
/**
|
|
317
|
+
* Connect to a published text-chat revision without publisher credentials.
|
|
318
|
+
*
|
|
319
|
+
* The launch grant is single-use and is never retained for reconnect. This
|
|
320
|
+
* path is LiveKit data-only: it does not enable microphone, camera, TTS,
|
|
321
|
+
* video, or lipsync.
|
|
322
|
+
*/
|
|
323
|
+
connectWithPublicationGrant(launchToken: string, options?: PublishedChatConnectOptions): Promise<void>;
|
|
278
324
|
/**
|
|
279
325
|
* RTVI client-ready handshake. Server-side gates bot-ready emission on
|
|
280
326
|
* receipt of client-ready (and re-emits bot-ready on every client-ready),
|
|
@@ -303,6 +349,17 @@ export declare class ConvaiClient extends EventEmitter implements IConvaiClient
|
|
|
303
349
|
* Send a text message to the character
|
|
304
350
|
*/
|
|
305
351
|
sendUserTextMessage(text: string, options?: SendUserTextMessageOptions): void;
|
|
352
|
+
/**
|
|
353
|
+
* Return a correlated terminal result for a client-executed tool call.
|
|
354
|
+
*/
|
|
355
|
+
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;
|
|
306
363
|
/**
|
|
307
364
|
* Send a trigger message to invoke specific character actions
|
|
308
365
|
*/
|
|
@@ -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,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,iBAAiB,
|
|
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,a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