@voxket-ai/voxket-live 1.0.158 → 1.1.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.
Files changed (43) hide show
  1. package/dist/components/{deep-analysis.d.ts → common/deep-analysis.d.ts} +2 -2
  2. package/dist/components/common/index.d.ts +12 -0
  3. package/dist/components/{interactive-component.d.ts → common/interactive-component.d.ts} +2 -2
  4. package/dist/components/{session-timer.d.ts → common/session-timer.d.ts} +1 -1
  5. package/dist/components/common/unified-control-bar.d.ts +58 -0
  6. package/dist/components/{welcome.d.ts → common/welcome.d.ts} +2 -2
  7. package/dist/components/{chat-view.d.ts → modalities/chat/chat-view.d.ts} +3 -3
  8. package/dist/components/{chat → modalities/chat/components}/attachment-message.d.ts +2 -2
  9. package/dist/components/{chat → modalities/chat/components}/chat-message.d.ts +2 -2
  10. package/dist/components/modalities/chat/components/index.d.ts +10 -0
  11. package/dist/components/{chat → modalities/chat/components}/markdown-utils.d.ts +1 -1
  12. package/dist/components/{chat → modalities/chat/components}/thinking-indicator.d.ts +1 -1
  13. package/dist/components/{chat → modalities/chat/components}/tool-execution-indicator.d.ts +2 -2
  14. package/dist/components/modalities/chat/index.d.ts +5 -0
  15. package/dist/components/modalities/index.d.ts +6 -0
  16. package/dist/components/{video → modalities/video/components}/index.d.ts +1 -1
  17. package/dist/components/{video → modalities/video/components}/video-controls.d.ts +1 -1
  18. package/dist/components/{video → modalities/video/components}/video-grid.d.ts +1 -1
  19. package/dist/components/{video → modalities/video/components}/video-tile.d.ts +1 -1
  20. package/dist/components/modalities/video/index.d.ts +5 -0
  21. package/dist/components/{video-view.d.ts → modalities/video/video-view.d.ts} +3 -3
  22. package/dist/components/modalities/voice/index.d.ts +4 -0
  23. package/dist/components/{session-view.d.ts → modalities/voice/session-view.d.ts} +2 -2
  24. package/dist/core/agent-manager.d.ts +50 -0
  25. package/dist/core/chat-manager.d.ts +72 -0
  26. package/dist/core/client.d.ts +80 -190
  27. package/dist/core/connection-manager.d.ts +81 -0
  28. package/dist/core/index.d.ts +9 -1
  29. package/dist/core/media-manager.d.ts +177 -0
  30. package/dist/core/stream-handler-manager.d.ts +91 -0
  31. package/dist/core/ui-renderer.d.ts +76 -0
  32. package/dist/index.cjs +54 -54
  33. package/dist/index.css +1 -1
  34. package/dist/index.d.ts +8 -7
  35. package/dist/index.js +10265 -9714
  36. package/package.json +1 -1
  37. package/dist/components/chat/chat-input-panel.d.ts +0 -11
  38. /package/dist/components/{alert-toast.d.ts → common/alert-toast.d.ts} +0 -0
  39. /package/dist/components/{common-popup-trigger.d.ts → common/common-popup-trigger.d.ts} +0 -0
  40. /package/dist/components/{error-boundary.d.ts → common/error-boundary.d.ts} +0 -0
  41. /package/dist/components/{session-logger.d.ts → common/session-logger.d.ts} +0 -0
  42. /package/dist/components/{chat → modalities/chat/components}/default-views.d.ts +0 -0
  43. /package/dist/components/{chat → modalities/chat/components}/streaming-text.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- import { VoxketClient } from '../core/client';
2
- import { ThemeType } from '../styles';
1
+ import { VoxketClient } from '../../core/client';
2
+ import { ThemeType } from '../../styles';
3
3
  interface DeepAnalysisProps {
4
4
  voxketClient: VoxketClient | null;
5
5
  theme: ThemeType;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Common Components - Shared across all modalities
3
+ */
4
+ export { toastAlert } from './alert-toast';
5
+ export { VoxketErrorBoundary } from './error-boundary';
6
+ export { InteractiveComponent } from './interactive-component';
7
+ export { SessionTimer } from './session-timer';
8
+ export { SessionLogViewer, SessionMetrics } from './session-logger';
9
+ export { Welcome } from './welcome';
10
+ export { CommonPopupTrigger } from './common-popup-trigger';
11
+ export { DeepAnalysis } from './deep-analysis';
12
+ export { UnifiedControlBar, type UnifiedControlBarProps, type ControlBarModality } from './unified-control-bar';
@@ -1,5 +1,5 @@
1
- import { ThemeType } from '../styles';
2
- import { InteractiveUIState } from '../types/rpc';
1
+ import { ThemeType } from '../../styles';
2
+ import { InteractiveUIState } from '../../types/rpc';
3
3
  interface InteractiveComponentProps {
4
4
  interaction: InteractiveUIState | null;
5
5
  theme: ThemeType;
@@ -1,4 +1,4 @@
1
- import { ThemeType } from '../styles';
1
+ import { ThemeType } from '../../styles';
2
2
  interface SessionTimerProps {
3
3
  /** Timer duration in seconds */
4
4
  duration: number;
@@ -0,0 +1,58 @@
1
+ import { ThemeType } from '../../styles';
2
+ export type ControlBarModality = 'voice' | 'chat' | 'video';
3
+ export interface UnifiedControlBarProps {
4
+ /** Current modality (voice, chat, or video) */
5
+ modality: ControlBarModality;
6
+ /** Theme for styling */
7
+ theme: ThemeType;
8
+ /** Disabled state for all controls */
9
+ disabled?: boolean;
10
+ /** Show microphone toggle */
11
+ showMicrophone?: boolean;
12
+ /** Microphone enabled state */
13
+ microphoneEnabled?: boolean;
14
+ /** Microphone loading state */
15
+ microphoneLoading?: boolean;
16
+ /** Microphone toggle handler */
17
+ onToggleMicrophone?: () => void;
18
+ /** Show camera toggle */
19
+ showCamera?: boolean;
20
+ /** Camera enabled state */
21
+ cameraEnabled?: boolean;
22
+ /** Camera loading state */
23
+ cameraLoading?: boolean;
24
+ /** Camera toggle handler */
25
+ onToggleCamera?: () => void;
26
+ /** Show screen share toggle */
27
+ showScreenShare?: boolean;
28
+ /** Screen share enabled state */
29
+ screenShareEnabled?: boolean;
30
+ /** Screen share loading state */
31
+ screenShareLoading?: boolean;
32
+ /** Screen share toggle handler */
33
+ onToggleScreenShare?: () => void;
34
+ /** Show chat/transcription toggle */
35
+ showChatToggle?: boolean;
36
+ /** Chat open state */
37
+ chatOpen?: boolean;
38
+ /** Chat toggle handler */
39
+ onToggleChat?: () => void;
40
+ /** Show text input field */
41
+ showTextInput?: boolean;
42
+ /** Text input placeholder */
43
+ textInputPlaceholder?: string;
44
+ /** Text send handler */
45
+ onSendText?: (text: string) => void;
46
+ /** Attachment send handler */
47
+ onSendAttachments?: (files: File[]) => void;
48
+ /** Support attachment uploads */
49
+ supportsAttachments?: boolean;
50
+ /** Show end call button */
51
+ showEndCall?: boolean;
52
+ /** End call handler */
53
+ onEndCall?: () => void;
54
+ }
55
+ export declare function UnifiedControlBar({ modality, theme, disabled, showMicrophone, microphoneEnabled, microphoneLoading, onToggleMicrophone, showCamera, cameraEnabled, cameraLoading, onToggleCamera, showScreenShare, screenShareEnabled, screenShareLoading, onToggleScreenShare, showChatToggle, chatOpen, onToggleChat, showTextInput, textInputPlaceholder, onSendText, onSendAttachments, supportsAttachments, showEndCall, onEndCall, }: UnifiedControlBarProps): import("react/jsx-runtime").JSX.Element;
56
+ export declare namespace UnifiedControlBar {
57
+ var displayName: string;
58
+ }
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { ThemeType } from '../styles';
3
- import { SessionModality } from '../types/core';
2
+ import { ThemeType } from '../../styles';
3
+ import { SessionModality } from '../../types/core';
4
4
  interface WelcomeProps {
5
5
  disabled: boolean;
6
6
  onStartCall: () => void;
@@ -1,6 +1,6 @@
1
- import { ThemeType } from '../styles';
2
- import { VoxketClient } from '../core/client';
3
- import { DisplayType } from './widget';
1
+ import { ThemeType } from '../../../styles';
2
+ import { VoxketClient } from '../../../core/client';
3
+ import { DisplayType } from '../../widget';
4
4
  interface ChatViewProps {
5
5
  client: VoxketClient;
6
6
  theme?: ThemeType;
@@ -1,5 +1,5 @@
1
- import { ThemeType } from '../../styles';
2
- import { ChatMessage } from '../../types/core';
1
+ import { ThemeType } from '../../../../styles';
2
+ import { ChatMessage } from '../../../../types/core';
3
3
  interface AttachmentMessageProps {
4
4
  message: ChatMessage;
5
5
  theme: ThemeType;
@@ -1,5 +1,5 @@
1
- import { ThemeType } from '../../styles';
2
- import { ChatMessage } from '../../types/core';
1
+ import { ThemeType } from '../../../../styles';
2
+ import { ChatMessage } from '../../../../types/core';
3
3
  interface ChatMessageProps {
4
4
  message: ChatMessage;
5
5
  theme: ThemeType;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Chat Components - Internal chat UI components
3
+ */
4
+ export { AttachmentMessage } from './attachment-message';
5
+ export { ChatMessageComponent } from './chat-message';
6
+ export { DefaultSuccessView, DefaultTimeoutView, DefaultToolExecutionView } from './default-views';
7
+ export { createMarkdownComponents, linkifyText, detectMarkdownContent, cleanMarkdownContent } from './markdown-utils';
8
+ export { StreamingText } from './streaming-text';
9
+ export { ThinkingIndicator } from './thinking-indicator';
10
+ export { ToolExecutionIndicator } from './tool-execution-indicator';
@@ -1,4 +1,4 @@
1
- import { ThemeType } from '../../styles';
1
+ import { ThemeType } from '../../../../styles';
2
2
  export declare function createMarkdownComponents(theme: ThemeType): any;
3
3
  export declare function linkifyText(text: string, theme: ThemeType): (string | import("react/jsx-runtime").JSX.Element)[];
4
4
  export declare function detectMarkdownContent(content: string): boolean;
@@ -1,4 +1,4 @@
1
- import { ThemeType } from '../../styles';
1
+ import { ThemeType } from '../../../../styles';
2
2
  interface ThinkingIndicatorProps {
3
3
  theme: ThemeType;
4
4
  }
@@ -1,5 +1,5 @@
1
- import { ThemeType } from '../../styles';
2
- import { ToolExecutionData } from '../../types/tools';
1
+ import { ThemeType } from '../../../../styles';
2
+ import { ToolExecutionData } from '../../../../types/tools';
3
3
  interface ToolExecutionIndicatorProps {
4
4
  toolData: ToolExecutionData;
5
5
  theme: ThemeType;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Chat Modality Components
3
+ */
4
+ export { ChatView } from './chat-view';
5
+ export * from './components';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Modality Components - Organized by communication type
3
+ */
4
+ export * from './chat';
5
+ export * from './voice';
6
+ export * from './video';
@@ -5,4 +5,4 @@
5
5
  export { VideoTile } from './video-tile';
6
6
  export { VideoGrid } from './video-grid';
7
7
  export { VideoControls } from './video-controls';
8
- export type { VideoTrack, VideoLayout, VideoTileProps, VideoGridProps, VideoControlsProps, VideoState, VideoHookReturn } from '../../types/video';
8
+ export type { VideoTrack, VideoLayout, VideoTileProps, VideoGridProps, VideoControlsProps, VideoState, VideoHookReturn } from '../../../../types/video';
@@ -1,2 +1,2 @@
1
- import { VideoControlsProps } from '../../types/video';
1
+ import { VideoControlsProps } from '../../../../types/video';
2
2
  export declare function VideoControls({ localTrack, onToggleCamera, onToggleScreenShare, onLayoutChange, showLayoutControls, showCameraControls, showScreenShareControls, className }: VideoControlsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { VideoGridProps } from '../../types/video';
1
+ import { VideoGridProps } from '../../../../types/video';
2
2
  export declare function VideoGrid({ tracks, layout, className, onLayoutChange, onTrackClick, maxVisibleTracks, showPagination }: VideoGridProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { VideoTileProps } from '../../types/video';
1
+ import { VideoTileProps } from '../../../../types/video';
2
2
  export declare function VideoTile({ track, participantName, showControls, showName, showMuteIndicator, isPinned, className, onClick, onPin, onUnpin }: VideoTileProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Video Modality Components
3
+ */
4
+ export { default as VideoView } from './video-view';
5
+ export * from './components';
@@ -1,6 +1,6 @@
1
- import { ThemeType } from '../styles';
2
- import { VoxketClient } from '../core/client';
3
- import { DisplayType } from './widget';
1
+ import { ThemeType } from '../../../styles';
2
+ import { VoxketClient } from '../../../core/client';
3
+ import { DisplayType } from '../../widget';
4
4
  interface VideoViewProps {
5
5
  client: VoxketClient;
6
6
  theme?: ThemeType;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Voice Modality Components
3
+ */
4
+ export { SessionView } from './session-view';
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { ThemeType } from '../styles';
3
- import { DisplayType } from './widget';
2
+ import { ThemeType } from '../../../styles';
3
+ import { DisplayType } from '../../widget';
4
4
  interface SessionViewProps {
5
5
  disabled: boolean;
6
6
  sessionStarted: boolean;
@@ -0,0 +1,50 @@
1
+ import { VoxketEventEmitter } from './event-emitter';
2
+ import { VoxketEvents, AgentInfo } from '../types/core';
3
+ /**
4
+ * AgentManager
5
+ *
6
+ * Manages all agent-related functionality including:
7
+ * - Agent state (idle, thinking, speaking)
8
+ * - Agent connection status
9
+ * - Agent information
10
+ * - Agent-related events
11
+ */
12
+ export declare class AgentManager {
13
+ private agentState;
14
+ private isAgentConnected;
15
+ private currentAgentInfo;
16
+ private eventEmitter;
17
+ constructor(eventEmitter: VoxketEventEmitter<VoxketEvents>);
18
+ /**
19
+ * Get current agent state
20
+ */
21
+ getAgentState(): 'idle' | 'thinking' | 'speaking';
22
+ /**
23
+ * Set agent state
24
+ */
25
+ setAgentState(state: 'idle' | 'thinking' | 'speaking'): void;
26
+ /**
27
+ * Check if agent is connected
28
+ */
29
+ getIsAgentConnected(): boolean;
30
+ /**
31
+ * Set agent connection status
32
+ */
33
+ setAgentConnected(connected: boolean): void;
34
+ /**
35
+ * Get current agent info
36
+ */
37
+ getCurrentAgentInfo(): AgentInfo | null;
38
+ /**
39
+ * Set current agent info
40
+ */
41
+ setCurrentAgentInfo(info: AgentInfo | null): void;
42
+ /**
43
+ * Reset agent state (used on disconnection)
44
+ */
45
+ reset(): void;
46
+ /**
47
+ * Handle agent state changed event
48
+ */
49
+ handleAgentStateChanged(stateObj: any): void;
50
+ }
@@ -0,0 +1,72 @@
1
+ import { Room } from 'livekit-client';
2
+ import { VoxketEventEmitter } from './event-emitter';
3
+ import { ChatMessage, VoxketEvents } from '../types/core';
4
+ /**
5
+ * ChatManager
6
+ *
7
+ * Manages all chat-related functionality including:
8
+ * - Message storage and retrieval
9
+ * - Sending text messages
10
+ * - Sending file attachments
11
+ * - Message updates (streaming messages)
12
+ * - Markdown to plain text conversion
13
+ */
14
+ export declare class ChatManager {
15
+ private chatMessages;
16
+ private activeTranscriptions;
17
+ private room;
18
+ private eventEmitter;
19
+ private participantName;
20
+ constructor(eventEmitter: VoxketEventEmitter<VoxketEvents>, participantName?: string);
21
+ /**
22
+ * Set the room instance for message sending
23
+ */
24
+ setRoom(room: Room | null): void;
25
+ /**
26
+ * Update participant name
27
+ */
28
+ setParticipantName(name: string): void;
29
+ /**
30
+ * Get all chat messages
31
+ */
32
+ getChatMessages(): ChatMessage[];
33
+ /**
34
+ * Add a new chat message
35
+ */
36
+ addChatMessage(message: ChatMessage): void;
37
+ /**
38
+ * Update an existing chat message
39
+ */
40
+ updateChatMessage(updatedMessage: ChatMessage): void;
41
+ /**
42
+ * Clear all chat messages and transcriptions
43
+ */
44
+ clearChatMessages(): void;
45
+ /**
46
+ * Track a transcription message ID to prevent duplicates
47
+ */
48
+ trackTranscription(participantKey: string, messageId: string): void;
49
+ /**
50
+ * Get existing transcription within time window (1 second)
51
+ */
52
+ getActiveTranscription(participantKey: string): {
53
+ messageId: string;
54
+ timestamp: number;
55
+ } | null;
56
+ /**
57
+ * Send a text message
58
+ */
59
+ sendMessage(message: string, metadata?: Record<string, any>): Promise<void>;
60
+ /**
61
+ * Send multiple file attachments (images only)
62
+ */
63
+ sendAttachments(files: File[], metadata?: Record<string, any>): Promise<void>;
64
+ /**
65
+ * Send a single file attachment
66
+ */
67
+ sendAttachment(file: File, metadata?: Record<string, any>): Promise<void>;
68
+ /**
69
+ * Convert markdown text to plain text
70
+ */
71
+ convertMarkdownToText(markdownText: string): string;
72
+ }