@convai/embody 0.5.0 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @convai/embody
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b9b1e4c: **embody is the 3D character only.** `@convai/embody/react` no longer re-exports `ConvaiWidget`, `AudioRenderer` or `AudioContext`: `@convai/web-sdk` 2.0 moved its chat UI to `@convai/web-widget`, so import them from `@convai/web-widget/react` and install it next to embody. `useWidgetClient` stays: hand its result to the widget so the chat and the character share one connection.
8
+
9
+ ```diff
10
+ - import { ConvaiCharacter, ConvaiWidget, useWidgetClient } from '@convai/embody/react'
11
+ + import { ConvaiCharacter, useWidgetClient } from '@convai/embody/react'
12
+ + import { ConvaiWidget } from '@convai/web-widget/react'
13
+ ```
14
+
15
+ The `@convai/web-sdk` peer range now also admits the 2.0 prereleases (`>=1.8.0-beta.4 || >=2.0.0-beta.0`); `>=1.8.0-beta.4` alone made npm refuse `2.0.0-beta.x` with ERESOLVE.
16
+
3
17
  ## 0.5.0
4
18
 
5
19
  ### Minor Changes
package/README.md CHANGED
@@ -85,9 +85,8 @@ a second one. Lift it out with `onReady`; chat UI is DOM, so it lives outside
85
85
  the canvas:
86
86
 
87
87
  ```tsx
88
- import {
89
- ConvaiCharacter, ConvaiWidget, useWidgetClient, type ConvaiClient,
90
- } from '@convai/embody/react'
88
+ import { ConvaiCharacter, useWidgetClient, type ConvaiClient } from '@convai/embody/react'
89
+ import { ConvaiWidget } from '@convai/web-widget/react'
91
90
 
92
91
  function App() {
93
92
  const [client, setClient] = useState<ConvaiClient | null>(null)
@@ -105,8 +104,9 @@ function App() {
105
104
  }
106
105
  ```
107
106
 
108
- `ConvaiWidget` and `ConvaiClient` are re-exported from `@convai/web-sdk`, so
109
- `@convai/embody` is the only import your app needs. `useWidgetClient` adapts
107
+ embody is the 3D character only; the chat panel is
108
+ [`@convai/web-widget`](https://www.npmjs.com/package/@convai/web-widget)
109
+ (`npm install @convai/web-widget`). `useWidgetClient` adapts
110
110
  embody's client to the widget's props — the SDK's own `useConvaiClient` would
111
111
  *construct a second client*, and so open a second connection, which is exactly
112
112
  what embody exists to avoid.
@@ -280,4 +280,4 @@ feature and adding its test are the same commit.
280
280
 
281
281
  ## License
282
282
 
283
- Apache-2.0. See [LICENSE](./LICENSE).
283
+ Licensed under the [Apache License 2.0](./LICENSE). Copyright 2026 Convai.
@@ -9,20 +9,23 @@
9
9
  * </Canvas>
10
10
  * ```
11
11
  *
12
- * The SDK's own React surface is re-exported so an app can build chat UI
13
- * without adding a second dependency — or a second connection. `ConvaiWidget`
14
- * takes a client, and `character.client` is one.
12
+ * embody is the 3D character only. For a chat panel, install
13
+ * `@convai/web-widget` and hand it the character's own client — one session,
14
+ * not two. `useWidgetClient` adapts that client to the widget's props.
15
15
  *
16
16
  * Chat UI is DOM and the character is a `<Canvas>` child, so lift the client
17
17
  * out rather than rendering the widget from inside the scene:
18
18
  *
19
19
  * ```tsx
20
+ * import { ConvaiWidget } from '@convai/web-widget/react'
21
+ *
20
22
  * const [client, setClient] = useState<ConvaiClient | null>(null)
23
+ * const widgetClient = useWidgetClient(client)
21
24
  * <Canvas>
22
25
  * <ConvaiCharacter apiKey={apiKey} characterId={characterId}
23
26
  * onReady={(c) => setClient(c.client)} />
24
27
  * </Canvas>
25
- * {client && <ConvaiWidget convaiClient={client} />}
28
+ * {widgetClient && <ConvaiWidget convaiClient={widgetClient} />}
26
29
  * ```
27
30
  */
28
31
  export { useCharacter } from './useCharacter.js';
@@ -35,6 +38,6 @@ export { OrbitRig } from './OrbitRig.js';
35
38
  export type { OrbitOptions, OrbitRigProps } from './OrbitRig.js';
36
39
  export { useWidgetClient } from './useWidgetClient.js';
37
40
  export type { WidgetClient } from './useWidgetClient.js';
38
- export { ConvaiWidget, useConvaiClient, AudioRenderer, AudioContext } from '@convai/web-sdk/react';
41
+ export { useConvaiClient } from '@convai/web-sdk/react';
39
42
  export { ConvaiClient } from '@convai/web-sdk/core';
40
43
  export type { ConvaiConfig } from '@convai/web-sdk/core';
@@ -9,20 +9,23 @@
9
9
  * </Canvas>
10
10
  * ```
11
11
  *
12
- * The SDK's own React surface is re-exported so an app can build chat UI
13
- * without adding a second dependency — or a second connection. `ConvaiWidget`
14
- * takes a client, and `character.client` is one.
12
+ * embody is the 3D character only. For a chat panel, install
13
+ * `@convai/web-widget` and hand it the character's own client — one session,
14
+ * not two. `useWidgetClient` adapts that client to the widget's props.
15
15
  *
16
16
  * Chat UI is DOM and the character is a `<Canvas>` child, so lift the client
17
17
  * out rather than rendering the widget from inside the scene:
18
18
  *
19
19
  * ```tsx
20
+ * import { ConvaiWidget } from '@convai/web-widget/react'
21
+ *
20
22
  * const [client, setClient] = useState<ConvaiClient | null>(null)
23
+ * const widgetClient = useWidgetClient(client)
21
24
  * <Canvas>
22
25
  * <ConvaiCharacter apiKey={apiKey} characterId={characterId}
23
26
  * onReady={(c) => setClient(c.client)} />
24
27
  * </Canvas>
25
- * {client && <ConvaiWidget convaiClient={client} />}
28
+ * {widgetClient && <ConvaiWidget convaiClient={widgetClient} />}
26
29
  * ```
27
30
  */
28
31
  export { useCharacter } from './useCharacter.js';
@@ -32,6 +35,7 @@ export { CharacterModel } from './CharacterModel.js';
32
35
  // still want the orbit behaviour ConvaiCharacter gives for free.
33
36
  export { OrbitRig } from './OrbitRig.js';
34
37
  export { useWidgetClient } from './useWidgetClient.js';
35
- // ── Chat / conversation surface, re-exported from @convai/web-sdk/react ────
36
- export { ConvaiWidget, useConvaiClient, AudioRenderer, AudioContext } from '@convai/web-sdk/react';
38
+ // ── The client, re-exported from @convai/web-sdk ──────────────────────────
39
+ // No UI: ConvaiWidget, AudioRenderer and AudioContext are @convai/web-widget's.
40
+ export { useConvaiClient } from '@convai/web-sdk/react';
37
41
  export { ConvaiClient } from '@convai/web-sdk/core';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Makes embody's client usable by the SDK's `<ConvaiWidget/>`.
2
+ * Makes embody's client usable by `<ConvaiWidget/>` from `@convai/web-widget`.
3
3
  *
4
4
  * The widget wants `IConvaiClient` plus four pieces of reactive UI state
5
5
  * (`activity`, `isAudioMuted`, `isVideoEnabled`, `isScreenShareActive`). The
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@convai/embody",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Give a Convai character a body: resolve 3D characters by characterId and drive them with lipsync and animation. Layered on @convai/web-sdk.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Convai <support@convai.com>",
@@ -58,7 +58,7 @@
58
58
  "access": "public"
59
59
  },
60
60
  "peerDependencies": {
61
- "@convai/web-sdk": ">=1.8.0-beta.4",
61
+ "@convai/web-sdk": ">=1.8.0-beta.4 || >=2.0.0-beta.0",
62
62
  "@react-three/fiber": ">=8",
63
63
  "react": ">=18",
64
64
  "three": ">=0.160"
@@ -73,7 +73,8 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@changesets/cli": "^2.27.0",
76
- "@convai/web-sdk": "1.8.0-beta.4",
76
+ "@convai/web-sdk": "2.0.0-beta.0",
77
+ "@convai/web-widget": "0.2.1",
77
78
  "@react-three/fiber": "^8.18.0",
78
79
  "@types/react": "^18.3.31",
79
80
  "@types/react-dom": "^19.2.7",