@voxket-ai/voxket-live 1.0.78 → 1.0.80

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.
@@ -1,7 +1,7 @@
1
1
  import { AgentState, TrackReference } from '@livekit/components-react';
2
2
  interface AgentAudioTileProps {
3
3
  state: AgentState;
4
- audioTrack: TrackReference;
4
+ audioTrack?: TrackReference;
5
5
  className?: string;
6
6
  }
7
7
  export declare const AgentTile: ({ state, audioTrack, className, ref, }: React.ComponentProps<"div"> & AgentAudioTileProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,9 @@
1
1
  import { Track } from 'livekit-client';
2
2
  import { TrackReference } from '@livekit/components-react';
3
- export declare function useLocalTrackRef(source: Track.Source): TrackReference | undefined;
3
+ export declare function useLocalTrackRef(source: Track.Source, client: any): TrackReference | undefined;
4
4
  interface MediaTilesProps {
5
5
  chatOpen: boolean;
6
+ client?: any;
6
7
  }
7
- export declare function MediaTiles({ chatOpen }: MediaTilesProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function MediaTiles({ chatOpen, client }: MediaTilesProps): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -21,6 +21,16 @@ export interface RenderUIOptions {
21
21
  popupTriggerText?: string;
22
22
  width?: string;
23
23
  height?: string;
24
+ /**
25
+ * Callback function to handle display type changes (e.g., when user clicks expand button).
26
+ * Required for expand/fullscreen functionality to work properly.
27
+ * @param displayType - The new display type ('widget', 'fullscreen', 'popup')
28
+ * @example
29
+ * onDisplayTypeChange: (newDisplayType) => {
30
+ * console.log('Display type changed to:', newDisplayType);
31
+ * // Handle the display type change in your app
32
+ * }
33
+ */
24
34
  onDisplayTypeChange?: (displayType: DisplayType) => void;
25
35
  prompts?: string[];
26
36
  statusMessage?: string;
@@ -55,6 +65,8 @@ export declare class VoxketClient extends VoxketEventEmitter<VoxketEvents & RpcE
55
65
  private textStreamHandlersRegistered;
56
66
  private currentAgentInfo;
57
67
  private chatMessages;
68
+ private isAgentConnected;
69
+ private agentState;
58
70
  constructor(config: VoxketClientConfig);
59
71
  private setupEventListeners;
60
72
  private setupRpcEventForwarding;
@@ -83,6 +95,51 @@ export declare class VoxketClient extends VoxketEventEmitter<VoxketEvents & RpcE
83
95
  endSession(): Promise<SessionMetrics | null>;
84
96
  getCurrentSession(): VoxketSession | null;
85
97
  getCurrentAgentInfo(): AgentInfo | null;
98
+ getIsAgentConnected(): boolean;
99
+ /**
100
+ * Force mark agent as connected - useful when agent should be visible
101
+ * even without receiving agent_state_changed events
102
+ */
103
+ forceAgentConnected(): void;
104
+ getAgentState(): 'idle' | 'thinking' | 'speaking';
105
+ private setAgentState;
106
+ /**
107
+ * Get agent tracks from remote participants
108
+ */
109
+ getAgentAudioTrack(): {
110
+ source: Track.Source;
111
+ participant: RemoteParticipant;
112
+ publication: import('livekit-client').RemoteTrackPublication;
113
+ } | null;
114
+ getAgentVideoTrack(): {
115
+ source: Track.Source;
116
+ participant: RemoteParticipant;
117
+ publication: import('livekit-client').RemoteTrackPublication;
118
+ } | null;
119
+ /**
120
+ * Get all video track references (camera and screen share) from all participants
121
+ */
122
+ getVideoTrackRefs(): Array<{
123
+ source: Track.Source;
124
+ participant: any;
125
+ publication: any;
126
+ }>;
127
+ /**
128
+ * Get camera track references only
129
+ */
130
+ getCameraTrackRefs(): Array<{
131
+ source: Track.Source;
132
+ participant: any;
133
+ publication: any;
134
+ }>;
135
+ /**
136
+ * Get screen share track references only
137
+ */
138
+ getScreenShareTrackRefs(): Array<{
139
+ source: Track.Source;
140
+ participant: any;
141
+ publication: any;
142
+ }>;
86
143
  getChatMessages(): ChatMessage[];
87
144
  addChatMessage(message: ChatMessage): void;
88
145
  updateChatMessage(updatedMessage: ChatMessage): void;
@@ -57,3 +57,45 @@ export declare function useVoxketPersistentUserChoices(options?: {
57
57
  saveVideoInputEnabled: (enabled: boolean) => void;
58
58
  saveVideoInputDeviceId: (deviceId: string) => void;
59
59
  };
60
+ /**
61
+ * Hook for voice assistant state
62
+ * Replaces useVoiceAssistant from LiveKit
63
+ */
64
+ export declare function useVoxketVoiceAssistant(client: VoxketClient): {
65
+ agent: {
66
+ isActive: boolean;
67
+ info: import('..').AgentInfo | null;
68
+ };
69
+ session: import('..').VoxketSession | null;
70
+ state: "idle" | "thinking" | "speaking";
71
+ audioTrack: {
72
+ source: import("livekit-client").Track.Source;
73
+ participant: import('livekit-client').RemoteParticipant;
74
+ publication: import('livekit-client').RemoteTrackPublication;
75
+ } | null;
76
+ videoTrack: {
77
+ source: import("livekit-client").Track.Source;
78
+ participant: import('livekit-client').RemoteParticipant;
79
+ publication: import('livekit-client').RemoteTrackPublication;
80
+ } | null;
81
+ };
82
+ /**
83
+ * Hook for managing video tracks using VoxketClient methods
84
+ */
85
+ export declare function useVoxketVideoTracks(client: VoxketClient): {
86
+ videoTrackRefs: {
87
+ source: import("livekit-client").Track.Source;
88
+ participant: any;
89
+ publication: any;
90
+ }[];
91
+ cameraTrackRefs: {
92
+ source: import("livekit-client").Track.Source;
93
+ participant: any;
94
+ publication: any;
95
+ }[];
96
+ screenShareTrackRefs: {
97
+ source: import("livekit-client").Track.Source;
98
+ participant: any;
99
+ publication: any;
100
+ }[];
101
+ };