Skip to content

Commit 7b2d7b8

Browse files
authored
Make the agents sdk beta-tagged before official release (#1235)
1 parent 22683aa commit 7b2d7b8

File tree

8 files changed

+44
-44
lines changed

8 files changed

+44
-44
lines changed

packages/core/etc/components-core.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ export interface ReceivedDataMessage<T extends string | undefined = string> exte
444444
from?: Participant;
445445
}
446446

447-
// @public (undocumented)
447+
// @beta (undocumented)
448448
export type ReceivedMessage = ReceivedUserTranscriptionMessage | ReceivedAgentTranscriptionMessage | ReceivedChatMessage;
449449

450450
// @public (undocumented)

packages/core/src/messages/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export type ReceivedAgentTranscriptionMessage = ReceivedMessageWithType<
3838
}
3939
>;
4040

41-
/** @public */
41+
/** @beta */
4242
export type ReceivedMessage =
4343
| ReceivedUserTranscriptionMessage
4444
| ReceivedAgentTranscriptionMessage

packages/react/etc/components-react.api.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ import { TranscriptionSegment } from 'livekit-client';
7272
import { VideoCaptureOptions } from 'livekit-client';
7373
import { WidgetState } from '@livekit/components-core';
7474

75-
// @public (undocumented)
75+
// @beta (undocumented)
7676
export type AgentCallbacks = {
7777
[AgentEvent.CameraChanged]: (newTrack: TrackReference | undefined) => void;
7878
[AgentEvent.MicrophoneChanged]: (newTrack: TrackReference | undefined) => void;
7979
[AgentEvent.StateChanged]: (newAgentState: AgentState) => void;
8080
};
8181

82-
// @public (undocumented)
82+
// @beta (undocumented)
8383
export enum AgentEvent {
8484
// (undocumented)
8585
CameraChanged = "cameraChanged",
@@ -91,7 +91,7 @@ export enum AgentEvent {
9191

9292
// Warning: (ae-forgotten-export) The symbol "AgentSdkStates" needs to be exported by the entry point index.docs.d.ts
9393
//
94-
// @public
94+
// @beta
9595
export type AgentState = 'disconnected' | 'connecting' | 'pre-connect-buffering' | 'failed' | AgentSdkStates;
9696

9797
// @public (undocumented)
@@ -486,12 +486,12 @@ export { MessageEncoder }
486486
// @public (undocumented)
487487
export type MessageFormatter = (message: string) => React_2.ReactNode;
488488

489-
// @public (undocumented)
489+
// @beta (undocumented)
490490
export type MessagesCallbacks = {
491491
[MessagesEvent.MessageReceived]: (message: ReceivedMessage) => void;
492492
};
493493

494-
// @public (undocumented)
494+
// @beta (undocumented)
495495
export enum MessagesEvent {
496496
MessageReceived = "messageReceived"
497497
}
@@ -654,14 +654,14 @@ export const ScreenShareIcon: (props: SVGProps<SVGSVGElement>) => React_2.JSX.El
654654
// @internal (undocumented)
655655
export const ScreenShareStopIcon: (props: SVGProps<SVGSVGElement>) => React_2.JSX.Element;
656656

657-
// @public (undocumented)
657+
// @beta (undocumented)
658658
export type SessionCallbacks = {
659659
[SessionEvent.ConnectionStateChanged]: (newAgentConnectionState: ConnectionState_2) => void;
660660
[SessionEvent.MediaDevicesError]: (error: Error) => void;
661661
[SessionEvent.EncryptionError]: (error: Error) => void;
662662
};
663663

664-
// @public (undocumented)
664+
// @beta (undocumented)
665665
export type SessionConnectOptions = {
666666
signal?: AbortSignal;
667667
tracks?: {
@@ -673,18 +673,18 @@ export type SessionConnectOptions = {
673673
roomConnectOptions?: RoomConnectOptions;
674674
};
675675

676-
// @public (undocumented)
676+
// @beta (undocumented)
677677
export enum SessionEvent {
678678
// (undocumented)
679679
ConnectionStateChanged = "connectionStateChanged",
680680
EncryptionError = "encryptionError",
681681
MediaDevicesError = "mediaDevicesError"
682682
}
683683

684-
// @public
684+
// @beta
685685
export function SessionProvider(props: SessionProviderProps): React_2.JSX.Element;
686686

687-
// @public (undocumented)
687+
// @beta (undocumented)
688688
export type SessionProviderProps = {
689689
session: UseSessionReturn;
690690
children: React_2.ReactNode;
@@ -705,7 +705,7 @@ export const StartAudio: (props: AllowAudioPlaybackProps & React_2.RefAttributes
705705
// @public
706706
export const StartMediaButton: (props: AllowMediaPlaybackProps & React_2.RefAttributes<HTMLButtonElement>) => React_2.ReactNode;
707707

708-
// @public (undocumented)
708+
// @beta (undocumented)
709709
export type SwitchActiveDeviceOptions = {
710710
exact?: boolean;
711711
};
@@ -782,13 +782,13 @@ export const UnfocusToggleIcon: (props: SVGProps<SVGSVGElement>) => React_2.JSX.
782782

783783
// Warning: (ae-forgotten-export) The symbol "SessionStub" needs to be exported by the entry point index.docs.d.ts
784784
//
785-
// @public
785+
// @beta
786786
export function useAgent(session?: SessionStub): UseAgentReturn;
787787

788788
// Warning: (ae-forgotten-export) The symbol "AgentStateCases" needs to be exported by the entry point index.docs.d.ts
789789
// Warning: (ae-forgotten-export) The symbol "AgentActions" needs to be exported by the entry point index.docs.d.ts
790790
//
791-
// @public (undocumented)
791+
// @beta (undocumented)
792792
export type UseAgentReturn = AgentStateCases & AgentActions;
793793

794794
// @alpha
@@ -877,7 +877,7 @@ export function useEnsureParticipant(participant?: Participant): Participant;
877877
// @public
878878
export function useEnsureRoom(room?: Room): Room;
879879

880-
// @public
880+
// @beta
881881
export function useEnsureSession(session?: UseSessionReturn): UseSessionReturn;
882882

883883
// @public
@@ -1004,7 +1004,7 @@ export function useMaybeParticipantContext(): Participant | undefined;
10041004
// @public
10051005
export function useMaybeRoomContext(): Room | undefined;
10061006

1007-
// @public
1007+
// @beta
10081008
export function useMaybeSessionContext(): UseSessionReturn | undefined;
10091009

10101010
// @public
@@ -1206,21 +1206,21 @@ export type UseSequentialRoomConnectDisconnectResults<R extends Room | undefined
12061206

12071207
// Warning: (ae-forgotten-export) The symbol "UseSessionConfigurableOptions" needs to be exported by the entry point index.docs.d.ts
12081208
//
1209-
// @public
1209+
// @beta
12101210
export function useSession(tokenSource: TokenSourceConfigurable, options?: UseSessionConfigurableOptions): UseSessionReturn;
12111211

12121212
// Warning: (ae-forgotten-export) The symbol "UseSessionFixedOptions" needs to be exported by the entry point index.docs.d.ts
12131213
//
1214-
// @public
1214+
// @beta
12151215
export function useSession(tokenSource: TokenSourceFixed, options?: UseSessionFixedOptions): UseSessionReturn;
12161216

1217-
// @public
1217+
// @beta
12181218
export function useSessionContext(): UseSessionReturn;
12191219

1220-
// @public (undocumented)
1220+
// @beta (undocumented)
12211221
export function useSessionMessages(session?: UseSessionReturn): UseSessionMessagesReturn;
12221222

1223-
// @public (undocumented)
1223+
// @beta (undocumented)
12241224
export type UseSessionMessagesReturn = {
12251225
messages: Array<ReceivedMessage>;
12261226
isSending: boolean;
@@ -1235,7 +1235,7 @@ export type UseSessionMessagesReturn = {
12351235
// Warning: (ae-forgotten-export) The symbol "SessionStateDisconnected" needs to be exported by the entry point index.docs.d.ts
12361236
// Warning: (ae-forgotten-export) The symbol "SessionActions" needs to be exported by the entry point index.docs.d.ts
12371237
//
1238-
// @public (undocumented)
1238+
// @beta (undocumented)
12391239
export type UseSessionReturn = (SessionStateConnecting | SessionStateConnected | SessionStateDisconnected) & SessionActions;
12401240

12411241
// @public

packages/react/src/components/SessionProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { UseSessionReturn } from '../hooks';
33
import { RoomContext } from '../context';
44
import { SessionContext } from '../context/session-context';
55

6-
/** @public */
6+
/** @beta */
77
export type SessionProviderProps = {
88
session: UseSessionReturn;
99
children: React.ReactNode;
1010
};
1111

1212
/**
1313
* The `SessionProvider` component instantiates a SessionContext from the return of useSession
14-
* @public
14+
* @beta
1515
*/
1616
export function SessionProvider(props: SessionProviderProps) {
1717
return (

packages/react/src/context/session-context.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const SessionContext = React.createContext<UseSessionReturn | undefined>(
88
/**
99
* Ensures that a session is provided via context.
1010
* If no session is provided, an error is thrown.
11-
* @public
11+
* @beta
1212
*/
1313
export function useSessionContext() {
1414
const ctx = React.useContext(SessionContext);
@@ -20,7 +20,7 @@ export function useSessionContext() {
2020

2121
/**
2222
* Returns the session context if it exists, otherwise undefined.
23-
* @public
23+
* @beta
2424
*/
2525
export function useMaybeSessionContext() {
2626
return React.useContext(SessionContext);
@@ -29,7 +29,7 @@ export function useMaybeSessionContext() {
2929
/**
3030
* Ensures that a session is provided, either via context or explicitly as a parameter.
3131
* If no session is provided, an error is thrown.
32-
* @public
32+
* @beta
3333
*/
3434
export function useEnsureSession(session?: UseSessionReturn) {
3535
const context = useMaybeSessionContext();

packages/react/src/hooks/useAgent.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type AgentSdkStates = 'initializing' | 'idle' | 'listening' | 'thinking' | 'spea
3838
* Legacy useVoiceAssistant hook:
3939
* disconnected ➡️ connecting ➡️ initializing ➡️ listening/thinking/speaking
4040
*
41-
* @public
41+
* @beta
4242
* */
4343
export type AgentState =
4444
| 'disconnected'
@@ -47,14 +47,14 @@ export type AgentState =
4747
| 'failed'
4848
| AgentSdkStates;
4949

50-
/** @public */
50+
/** @beta */
5151
export enum AgentEvent {
5252
CameraChanged = 'cameraChanged',
5353
MicrophoneChanged = 'microphoneChanged',
5454
StateChanged = 'stateChanged',
5555
}
5656

57-
/** @public */
57+
/** @beta */
5858
export type AgentCallbacks = {
5959
[AgentEvent.CameraChanged]: (newTrack: TrackReference | undefined) => void;
6060
[AgentEvent.MicrophoneChanged]: (newTrack: TrackReference | undefined) => void;
@@ -253,7 +253,7 @@ type AgentStateCases =
253253
| AgentStateUnAvailable
254254
| AgentStateFailed;
255255

256-
/** @public */
256+
/** @beta */
257257
export type UseAgentReturn = AgentStateCases & AgentActions;
258258

259259
const generateDerivedStateValues = <State extends AgentState>(state: State) =>
@@ -460,7 +460,7 @@ function useAgentWaitUntilDerivedStates(
460460

461461
/**
462462
* useAgent encapculates all agent state, normalizing some quirks around how LiveKit Agents work.
463-
* @public
463+
* @beta
464464
*/
465465
export function useAgent(session?: SessionStub): UseAgentReturn {
466466
const sessionFromContext = useMaybeSessionContext();

packages/react/src/hooks/useSession.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { AgentState, useAgent, useAgentTimeoutIdStore } from './useAgent';
1919
import { TrackReference } from '@livekit/components-core';
2020
import { useLocalParticipant } from './useLocalParticipant';
2121

22-
/** @public */
22+
/** @beta */
2323
export enum SessionEvent {
2424
ConnectionStateChanged = 'connectionStateChanged',
2525
/**
@@ -35,14 +35,14 @@ export enum SessionEvent {
3535
EncryptionError = 'encryptionError',
3636
}
3737

38-
/** @public */
38+
/** @beta */
3939
export type SessionCallbacks = {
4040
[SessionEvent.ConnectionStateChanged]: (newAgentConnectionState: ConnectionState) => void;
4141
[SessionEvent.MediaDevicesError]: (error: Error) => void;
4242
[SessionEvent.EncryptionError]: (error: Error) => void;
4343
};
4444

45-
/** @public */
45+
/** @beta */
4646
export type SessionConnectOptions = {
4747
/** Optional abort signal which if triggered will terminate connecting even if it isn't complete */
4848
signal?: AbortSignal;
@@ -58,7 +58,7 @@ export type SessionConnectOptions = {
5858
roomConnectOptions?: RoomConnectOptions;
5959
};
6060

61-
/** @public */
61+
/** @beta */
6262
export type SwitchActiveDeviceOptions = {
6363
/**
6464
* If true, adds an `exact` constraint to the getUserMedia request.
@@ -130,7 +130,7 @@ type SessionActions = {
130130
end: () => Promise<void>;
131131
};
132132

133-
/** @public */
133+
/** @beta */
134134
export type UseSessionReturn = (
135135
| SessionStateConnecting
136136
| SessionStateConnected
@@ -280,15 +280,15 @@ function useSessionTokenSourceFetch(
280280

281281
/**
282282
* A Session represents a managed connection to a Room which can contain Agents.
283-
* @public
283+
* @beta
284284
*/
285285
export function useSession(
286286
tokenSource: TokenSourceConfigurable,
287287
options?: UseSessionConfigurableOptions,
288288
): UseSessionReturn;
289289
/**
290290
* A Session represents a managed connection to a Room which can contain Agents.
291-
* @public
291+
* @beta
292292
*/
293293
export function useSession(
294294
tokenSource: TokenSourceFixed,

packages/react/src/hooks/useSessionMessages.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { useChat } from './useChat';
1616
import { UseSessionReturn } from './useSession';
1717
import { useEnsureSession } from '../context';
1818

19-
/** @public */
19+
/** @beta */
2020
export type UseSessionMessagesReturn = {
2121
messages: Array<ReceivedMessage>;
2222

@@ -30,7 +30,7 @@ export type UseSessionMessagesReturn = {
3030
};
3131
};
3232

33-
/** @public */
33+
/** @beta */
3434
export enum MessagesEvent {
3535
/**
3636
* Emits when a new message is received from a participant
@@ -39,12 +39,12 @@ export enum MessagesEvent {
3939
MessageReceived = 'messageReceived',
4040
}
4141

42-
/** @public */
42+
/** @beta */
4343
export type MessagesCallbacks = {
4444
[MessagesEvent.MessageReceived]: (message: ReceivedMessage) => void;
4545
};
4646

47-
/** @public */
47+
/** @beta */
4848
export function useSessionMessages(session?: UseSessionReturn): UseSessionMessagesReturn {
4949
const { room } = useEnsureSession(session);
5050

0 commit comments

Comments
 (0)