realtime-avatar 0.23.0 → 0.24.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/README.md CHANGED
@@ -25,6 +25,47 @@ return call.raw; // relay to the browser byte-for-byte
25
25
 
26
26
  That is the whole server half. The client joins with the payload and renders her.
27
27
 
28
+ ## React Native compatibility
29
+
30
+ The next release requires **LiveKit React Native 3** for `/react-native`; it does not claim
31
+ compatibility with LiveKit React Native 2. Install the tested group together:
32
+
33
+ ```bash
34
+ npm install --save-exact @livekit/react-native@3.0.0 @livekit/react-native-webrtc@144.2.0 livekit-client@2.22.3 @livekit/components-react@2.9.21
35
+ ```
36
+
37
+ `@livekit/components-react@2.9.21` retains `@livekit/components-core@0.12.13`; both satisfy the
38
+ native 3.0.0 peer contracts. Keep a single resolved components-react instance: the native room
39
+ provides its context and the SDK's shared hooks consume that same context. SDK checks use React
40
+ 19.2.7 and React Native 0.81.5. The web binding also uses client 2.22.3; no components upgrade or
41
+ stream-handling patch is required for this tuple. Peer ranges allow compatible updates, but only
42
+ this exact tuple has been checked here. Client 2.22.3 introduces `machina@7.0.1`, whose Node
43
+ engine is `>=22.22`; use Node 22.22 or newer for client/native tooling (verified on 22.23.1).
44
+ This does not change the dependency-free server entry's Node floor. Node 20 tooling is not
45
+ verified for the new LiveKit group.
46
+
47
+ Call the SDK's re-exported `registerGlobals()` once at app startup, before creating rooms. RN3
48
+ configures iOS audio natively by default; do not reintroduce the deprecated JavaScript audio
49
+ management callback. `RealtimeAvatarLiveKitRoom` retains the existing `AudioSession.startAudioSession`
50
+ and `stopAudioSession` lifecycle while a grant and `connect` intent are present. Apps that own audio
51
+ configuration or coordinate overlapping calls must pass `manageAudioSession={false}` and own that
52
+ lifecycle; the hook is not a shared audio-session lease. Camera publication still requires both the
53
+ server grant's permission and the caller's opt-in. Room callbacks/options continue to use LiveKit's
54
+ public types and implementation; no separate connection state machine is introduced.
55
+
56
+ **This is a native build upgrade, not an OTA-only change.** Rebuild iOS and Android binaries with
57
+ RN3/WebRTC 144.2.0 before shipping JavaScript that requires them. Retain the previous SDK group for
58
+ installed binaries that still use RN2, and isolate their OTA runtime/channel appropriately.
59
+
60
+ The packaged-entry regression suite mounts the built `/react-native` adapter with the installed
61
+ RN3 room and audio implementations, real React/LiveKit hooks, and shared contexts. It checks room
62
+ props, microphone/camera policy, callbacks, start/stop intent, redial, and listener cleanup. It mocks
63
+ native module calls, network connection and media capture; it does **not** prove native binary
64
+ linking, `registerGlobals`, RTCView rendering, permissions, Bluetooth/speaker routing, interruption
65
+ recovery, asynchronous OS audio teardown, or overlapping-room ownership. Test these on iOS and
66
+ Android devices, including repeated call/redial and background/foreground transitions, before a
67
+ consumer release.
68
+
28
69
  ## Optional call recordings
29
70
 
30
71
  Your server decides whether to record after your application obtains consent:
@@ -1,4 +1,4 @@
1
- import { RealtimeAvatar, isQueued, RealtimeAvatarHttpError } from './chunk-6JLDTWL4.js';
1
+ import { RealtimeAvatar, isQueued, RealtimeAvatarHttpError } from './chunk-ZXPLFSG7.js';
2
2
 
3
3
  // ../proxy/src/config.ts
4
4
  var json = (body, status = 200) => new Response(JSON.stringify(body), {
@@ -654,7 +654,7 @@ z.enum([
654
654
 
655
655
  // ../http-client/src/client.ts
656
656
  var DEFAULT_BASE_URL = "https://realtimeavatar.ai/api/v1";
657
- var SDK_VERSION = "0.23.0";
657
+ var SDK_VERSION = "0.24.0";
658
658
  var RealtimeAvatar = class {
659
659
  #apiKey;
660
660
  #baseUrl;
package/dist/express.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-DP4GsT1R.js';
2
- import './types-C7s0yw8q.js';
1
+ import { P as ProxyConfig } from './types-CpqMHna3.js';
2
+ import './types-D77jgSms.js';
3
3
  import 'zod';
4
4
 
5
5
  type Expressish = {
package/dist/express.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-ICBVEIRK.js';
2
- import './chunk-6JLDTWL4.js';
1
+ import { createProxyHandler } from './chunk-FUJI3KIH.js';
2
+ import './chunk-ZXPLFSG7.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // ../proxy/src/express.ts
package/dist/hono.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-DP4GsT1R.js';
2
- import './types-C7s0yw8q.js';
1
+ import { P as ProxyConfig } from './types-CpqMHna3.js';
2
+ import './types-D77jgSms.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/hono.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-ICBVEIRK.js';
2
- import './chunk-6JLDTWL4.js';
1
+ import { createProxyHandler } from './chunk-FUJI3KIH.js';
2
+ import './chunk-ZXPLFSG7.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // ../proxy/src/hono.ts
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as CallPolicy, C as CallMode, S as StartCallResult, E as EndCallOptions, A as Avatar, b as AvatarUpdate, c as AvatarSourceSwap, d as ClipLibraryDeclaration, e as ClipLibraryUpdate, L as LoopRedirect, f as ClipLibrary, g as AssetKind, h as Asset, i as ListSessionsOptions, U as UsageSessionPage, j as UsageSession, k as ListRecordingsQuery, l as ListRecordingsResponse, R as RecordingArtifact, m as RecordingAccessResponse, n as CreditBalance, T as TranscriptPayload } from './types-C7s0yw8q.js';
2
- export { o as AvatarClip, p as CallConnection, q as CallQueued, r as ClipDeclaration, s as ClipLibraryPlan, t as ClipSource, u as ContextMessage, v as EndCallReason, w as RecordingArtifactStatus, x as RecordingMode, V as VideoPolicy, y as isQueued, z as listRecordingsResponseSchema, B as recordingAccessResponseSchema, D as recordingArtifactSchema, F as recordingModeSchema } from './types-C7s0yw8q.js';
1
+ import { a as CallPolicy, C as CallMode, S as StartCallResult, E as EndCallOptions, A as Avatar, b as AvatarUpdate, c as AvatarSourceSwap, d as ClipLibraryDeclaration, e as ClipLibraryUpdate, L as LoopRedirect, f as ClipLibrary, g as AssetKind, h as Asset, i as ListSessionsOptions, U as UsageSessionPage, j as UsageSession, k as ListRecordingsQuery, l as ListRecordingsResponse, R as RecordingArtifact, m as RecordingAccessResponse, n as CreditBalance, T as TranscriptPayload } from './types-D77jgSms.js';
2
+ export { o as AvatarClip, p as CallConnection, q as CallQueued, r as ClipDeclaration, s as ClipLibraryPlan, t as ClipSource, u as ContextMessage, v as EndCallReason, w as RecordingArtifactStatus, x as RecordingMode, V as VideoPolicy, y as isQueued, z as listRecordingsResponseSchema, B as recordingAccessResponseSchema, D as recordingArtifactSchema, F as recordingModeSchema } from './types-D77jgSms.js';
3
3
  import { ConnectionHistoryResponse } from './connection-history.js';
4
4
  import { z } from 'zod';
5
5
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-6JLDTWL4.js';
1
+ export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-ZXPLFSG7.js';
2
2
  import './chunk-MCIXU6XP.js';
package/dist/nextjs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-DP4GsT1R.js';
2
- import './types-C7s0yw8q.js';
1
+ import { P as ProxyConfig } from './types-CpqMHna3.js';
2
+ import './types-D77jgSms.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/nextjs.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-ICBVEIRK.js';
2
- import './chunk-6JLDTWL4.js';
1
+ import { createProxyHandler } from './chunk-FUJI3KIH.js';
2
+ import './chunk-ZXPLFSG7.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // ../proxy/src/nextjs.ts
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, RealtimeAvatarOptions, StartCallOptions, clipLibraryDeclarationSchema, verifyTranscript } from './index.js';
2
- export { h as Asset, g as AssetKind, A as Avatar, o as AvatarClip, c as AvatarSourceSwap, b as AvatarUpdate, p as CallConnection, C as CallMode, a as CallPolicy, q as CallQueued, r as ClipDeclaration, f as ClipLibrary, d as ClipLibraryDeclaration, s as ClipLibraryPlan, e as ClipLibraryUpdate, t as ClipSource, u as ContextMessage, n as CreditBalance, E as EndCallOptions, v as EndCallReason, k as ListRecordingsQuery, l as ListRecordingsResponse, i as ListSessionsOptions, L as LoopRedirect, m as RecordingAccessResponse, R as RecordingArtifact, w as RecordingArtifactStatus, x as RecordingMode, S as StartCallResult, T as TranscriptPayload, j as UsageSession, U as UsageSessionPage, V as VideoPolicy, y as isQueued, z as listRecordingsResponseSchema, B as recordingAccessResponseSchema, D as recordingArtifactSchema, F as recordingModeSchema } from './types-C7s0yw8q.js';
2
+ export { h as Asset, g as AssetKind, A as Avatar, o as AvatarClip, c as AvatarSourceSwap, b as AvatarUpdate, p as CallConnection, C as CallMode, a as CallPolicy, q as CallQueued, r as ClipDeclaration, f as ClipLibrary, d as ClipLibraryDeclaration, s as ClipLibraryPlan, e as ClipLibraryUpdate, t as ClipSource, u as ContextMessage, n as CreditBalance, E as EndCallOptions, v as EndCallReason, k as ListRecordingsQuery, l as ListRecordingsResponse, i as ListSessionsOptions, L as LoopRedirect, m as RecordingAccessResponse, R as RecordingArtifact, w as RecordingArtifactStatus, x as RecordingMode, S as StartCallResult, T as TranscriptPayload, j as UsageSession, U as UsageSessionPage, V as VideoPolicy, y as isQueued, z as listRecordingsResponseSchema, B as recordingAccessResponseSchema, D as recordingArtifactSchema, F as recordingModeSchema } from './types-D77jgSms.js';
3
3
  import './connection-history.js';
4
4
  import 'zod';
package/dist/server.js CHANGED
@@ -1,2 +1,2 @@
1
- export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-6JLDTWL4.js';
1
+ export { RealtimeAvatar, RealtimeAvatarError, RealtimeAvatarHttpError, clipLibraryDeclarationSchema, isQueued, listRecordingsResponseSchema, recordingAccessResponseSchema, recordingArtifactSchema, recordingModeSchema, verifyTranscript } from './chunk-ZXPLFSG7.js';
2
2
  import './chunk-MCIXU6XP.js';
@@ -1,5 +1,5 @@
1
- import { P as ProxyConfig } from './types-DP4GsT1R.js';
2
- import './types-C7s0yw8q.js';
1
+ import { P as ProxyConfig } from './types-CpqMHna3.js';
2
+ import './types-D77jgSms.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { createProxyHandler } from './chunk-ICBVEIRK.js';
2
- import './chunk-6JLDTWL4.js';
1
+ import { createProxyHandler } from './chunk-FUJI3KIH.js';
2
+ import './chunk-ZXPLFSG7.js';
3
3
  import './chunk-MCIXU6XP.js';
4
4
 
5
5
  // src/tanstack-start.ts
@@ -1,4 +1,4 @@
1
- import { C as CallMode, a as CallPolicy } from './types-C7s0yw8q.js';
1
+ import { C as CallMode, a as CallPolicy } from './types-D77jgSms.js';
2
2
 
3
3
  /** The three things a caller can ask the proxy to do. Gate on these, not on URLs. */
4
4
  type ProxyOperation = "connect" | "end" | "avatars" | "credits";
@@ -179,6 +179,17 @@ interface components {
179
179
  /** @description DEPRECATED, no-op. Accepted and ignored. The faster hesitation ceiling this requested is now the default for every session, so sending it changes nothing. Safe to stop sending; the field is retained only so existing callers do not break. */
180
180
  fast_endpointing?: boolean;
181
181
  require_ready_clip_library?: boolean;
182
+ /** @description Preview, enabled per workspace. A prepared scene from POST /v1/scenes, played forward over its full length in place of the avatar's source video; the avatar keeps the voice and persona. Cannot be combined with mode voice, render_backend generative, source_video_url, video_cache_id or a non-empty clip_library. */
183
+ scene?: {
184
+ /** @description The prepared scene's artifact id, as returned by POST /v1/scenes when status is ready. */
185
+ video_cache_id: string;
186
+ /** @description Frames in the first clip. The loop closes seamlessly at the wrap only when a continuation follows it. */
187
+ first_frames?: number;
188
+ /** @description Frames in the whole artifact (first plus continuation). */
189
+ total_frames?: number;
190
+ /** @description Preview. Set when this scene is a first clip alone: the joined scene (the same first clip plus its continuation) that this workspace prepares after the mint may then be attached to the live call. Linking needs the first clip's md5 and bytes declared on both prepares. Absent or false plays this scene for the whole call. */
191
+ attach_continuation?: boolean;
192
+ };
182
193
  };
183
194
  LiveKitSessionGrant: {
184
195
  /** @description Returned only for X-RTA-Observability: identity-v1 after successful platform billing attachment. The authoritative billing hold tenant ID; never client metadata or provider identity. Omitted by default and on failed or queued responses. Older servers may omit it. */
@@ -695,6 +706,9 @@ interface components {
695
706
  portraitUrl?: string;
696
707
  sourceAssetId?: string;
697
708
  anchorTimeMs?: number;
709
+ sourceReview?: {
710
+ reason: string;
711
+ };
698
712
  };
699
713
  CreateApiKeyRequest: {
700
714
  name: string;
@@ -759,6 +773,81 @@ interface components {
759
773
  [key: string]: unknown;
760
774
  };
761
775
  };
776
+ CreateSceneRequest: {
777
+ /** @description The first clip. Played forward over its full length. */
778
+ source: {
779
+ /**
780
+ * Format: uri
781
+ * @description An https URL the builder can fetch. Hosts are allowlisted by the builder.
782
+ */
783
+ url: string;
784
+ /** @description MD5 of the clip bytes. With bytes, lets an already-built scene answer ready without a download. */
785
+ md5?: string;
786
+ /** @description Clip size in bytes (at most 64 MiB). */
787
+ bytes?: number;
788
+ };
789
+ /** @description Optional return clip appended after the first. When its last frame matches the first clip's first frame, the loop closes seamlessly. */
790
+ continuation?: {
791
+ /**
792
+ * Format: uri
793
+ * @description An https URL the builder can fetch. Hosts are allowlisted by the builder.
794
+ */
795
+ url: string;
796
+ /** @description MD5 of the clip bytes. With bytes, lets an already-built scene answer ready without a download. */
797
+ md5?: string;
798
+ /** @description Clip size in bytes (at most 64 MiB). */
799
+ bytes?: number;
800
+ };
801
+ /** @enum {string} */
802
+ profile: "scene-v0";
803
+ };
804
+ SceneState: {
805
+ /** @constant */
806
+ status: "building";
807
+ /** @description The prepared scene's artifact id, as returned by POST /v1/scenes when status is ready. */
808
+ scene_id: string;
809
+ timings?: {
810
+ download_ms?: number;
811
+ decode_ms?: number;
812
+ geometry_ms?: number;
813
+ write_ms?: number;
814
+ total_ms?: number;
815
+ };
816
+ } | {
817
+ /** @constant */
818
+ status: "ready";
819
+ /** @description The prepared scene's artifact id, as returned by POST /v1/scenes when status is ready. */
820
+ scene_id: string;
821
+ /** @description The prepared scene's artifact id, as returned by POST /v1/scenes when status is ready. */
822
+ video_cache_id?: string;
823
+ fps?: number;
824
+ width?: number;
825
+ height?: number;
826
+ first_frames?: number;
827
+ total_frames?: number;
828
+ duration_s?: number;
829
+ timings?: {
830
+ download_ms?: number;
831
+ decode_ms?: number;
832
+ geometry_ms?: number;
833
+ write_ms?: number;
834
+ total_ms?: number;
835
+ };
836
+ } | {
837
+ /** @constant */
838
+ status: "failed";
839
+ /** @description The scene id, or "unresolved" when the download failed before any byte was hashed and the request carried no md5 and bytes. */
840
+ scene_id: string | "unresolved";
841
+ /** @enum {string} */
842
+ error?: "source_unreachable" | "source_unusable" | "source_mismatch" | "build_failed";
843
+ timings?: {
844
+ download_ms?: number;
845
+ decode_ms?: number;
846
+ geometry_ms?: number;
847
+ write_ms?: number;
848
+ total_ms?: number;
849
+ };
850
+ };
762
851
  CreditBalance: {
763
852
  tenantId: string;
764
853
  balanceCreditMicros: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "realtime-avatar",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Realtime Avatar SDK. `realtime-avatar` and the route adapters hold your API key and are server-only; `realtime-avatar/react`, `/browser` and `/tools` never can — importing a server entry into a browser build throws at bundle time.",
5
5
  "license": "MIT",
6
6
  "author": "The Influence Company",
@@ -118,7 +118,9 @@
118
118
  "tsup": "^8.5.0",
119
119
  "typescript": "^5.9.2",
120
120
  "@livekit/components-react": "2.9.21",
121
- "@livekit/react-native": "^2.11.1",
121
+ "@livekit/react-native": "3.0.0",
122
+ "@livekit/react-native-webrtc": "144.2.0",
123
+ "livekit-client": "2.22.3",
122
124
  "@types/react": "19.2.7",
123
125
  "react": "19.2.7",
124
126
  "react-dom": "19.2.7",
@@ -127,11 +129,12 @@
127
129
  },
128
130
  "peerDependencies": {
129
131
  "@livekit/components-react": "^2.9.0",
130
- "@livekit/react-native": "^2.11.0",
132
+ "@livekit/react-native": "^3.0.0",
133
+ "@livekit/react-native-webrtc": "^144.2.0",
131
134
  "react": ">=18",
132
135
  "react-dom": ">=18",
133
136
  "react-native": ">=0.78",
134
- "livekit-client": "^2.9.0",
137
+ "livekit-client": "^2.22.3",
135
138
  "zod": "^4.4.3"
136
139
  },
137
140
  "peerDependenciesMeta": {
@@ -141,6 +144,9 @@
141
144
  "@livekit/react-native": {
142
145
  "optional": true
143
146
  },
147
+ "@livekit/react-native-webrtc": {
148
+ "optional": true
149
+ },
144
150
  "react-dom": {
145
151
  "optional": true
146
152
  },