@voxket-ai/voxket-live 1.0.140 → 1.0.143

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.
@@ -0,0 +1,9 @@
1
+ import { ThemeType } from '../../styles';
2
+ import { ChatMessage } from '../../types/core';
3
+ interface AttachmentMessageProps {
4
+ message: ChatMessage;
5
+ theme: ThemeType;
6
+ isOwn: boolean;
7
+ }
8
+ export declare function AttachmentMessage({ message, theme, isOwn }: AttachmentMessageProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ThemeType } from '../../styles';
2
+ interface ChatInputPanelProps {
3
+ onSendMessage: (message: string) => void;
4
+ onSendAttachments: (files: File[]) => void;
5
+ disabled?: boolean;
6
+ theme: ThemeType;
7
+ onEndChat?: () => void;
8
+ attachmentsEnabled?: boolean;
9
+ }
10
+ export declare function ChatInputPanel({ onSendMessage, onSendAttachments, disabled, theme, onEndChat, attachmentsEnabled }: ChatInputPanelProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ThemeType } from '../../styles';
2
+ import { ChatMessage } from '../../types/core';
3
+ interface ChatMessageProps {
4
+ message: ChatMessage;
5
+ theme: ThemeType;
6
+ isOwn: boolean;
7
+ isStreaming?: boolean;
8
+ }
9
+ export declare function ChatMessageComponent({ message, theme, isOwn, isStreaming }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare function DefaultSuccessView(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function DefaultTimeoutView(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function DefaultToolExecutionView({ toolData }: {
4
+ toolData?: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ThemeType } from '../../styles';
2
+ export declare function createMarkdownComponents(theme: ThemeType): any;
3
+ export declare function linkifyText(text: string, theme: ThemeType): (string | import("react/jsx-runtime").JSX.Element)[];
4
+ export declare function detectMarkdownContent(content: string): boolean;
5
+ export declare function cleanMarkdownContent(content: string): string;
@@ -0,0 +1,8 @@
1
+ interface StreamingTextProps {
2
+ text: string;
3
+ isComplete: boolean;
4
+ isRealTimeStream?: boolean;
5
+ speed?: number;
6
+ }
7
+ export declare function StreamingText({ text, isComplete, isRealTimeStream, speed }: StreamingTextProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ThemeType } from '../../styles';
2
+ interface ThinkingIndicatorProps {
3
+ theme: ThemeType;
4
+ }
5
+ export declare function ThinkingIndicator({ theme }: ThinkingIndicatorProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ThemeType } from '../../styles';
2
+ import { ToolExecutionData } from '../../types/tools';
3
+ interface ToolExecutionIndicatorProps {
4
+ toolData: ToolExecutionData;
5
+ theme: ThemeType;
6
+ }
7
+ export declare function ToolExecutionIndicator({ toolData, theme }: ToolExecutionIndicatorProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { VoxketClient } from '../core/client';
2
+ import { ThemeType } from '../styles';
3
+ interface DeepAnalysisProps {
4
+ voxketClient: VoxketClient | null;
5
+ theme: ThemeType;
6
+ setTheme: (theme: ThemeType) => void;
7
+ configAgentId: string;
8
+ configParticipantName: string;
9
+ className?: string;
10
+ prompts?: string[];
11
+ statusMessage?: string;
12
+ welcomeTitle?: string;
13
+ welcomeSubTitle?: string;
14
+ participantMetadata?: Record<string, any>;
15
+ }
16
+ export declare function DeepAnalysis({ voxketClient, theme, setTheme, configAgentId, configParticipantName, className, prompts, statusMessage, welcomeTitle, welcomeSubTitle, participantMetadata }: DeepAnalysisProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -33,6 +33,7 @@ export interface VoxketWidgetProps {
33
33
  onPopupToggle?: (isOpen: boolean) => void;
34
34
  onDisplayTypeChange?: (displayType: DisplayType) => void;
35
35
  voxketClient?: VoxketClient;
36
+ participantMetadata?: Record<string, any>;
36
37
  }
37
38
  declare function WrappedWidget(props: VoxketWidgetProps & {
38
39
  prompts?: string[];
@@ -37,11 +37,14 @@ export interface RenderUIOptions {
37
37
  welcomeTitle?: string;
38
38
  welcomeSubTitle?: string;
39
39
  loadingText?: string;
40
+ /** Participant metadata to be sent with session creation */
41
+ participantMetadata?: Record<string, any>;
40
42
  }
41
43
  export interface VoxketClientConfig extends VoxketConfig {
42
44
  agentId?: string;
43
45
  participantName?: string;
44
46
  modalities?: SessionModality[];
47
+ participantMetadata?: Record<string, any>;
45
48
  onConnected?: () => void;
46
49
  onDisconnected?: (reason?: string) => void;
47
50
  onError?: (error: Error) => void;
@@ -74,13 +77,13 @@ export declare class VoxketClient extends VoxketEventEmitter<VoxketEvents & RpcE
74
77
  private initializeClient;
75
78
  private setupRoomEventListeners;
76
79
  private setupTextStreamHandlers;
77
- fetchConnectionDetails(agentId?: string, participantName?: string, modalities?: SessionModality[]): Promise<{
80
+ fetchConnectionDetails(agentId?: string, participantName?: string, modalities?: SessionModality[], participantMetadata?: Record<string, any>): Promise<{
78
81
  serverUrl: string;
79
82
  participantToken: string;
80
83
  voxketSessionId: string;
81
84
  agentInfo?: AgentInfo;
82
85
  }>;
83
- connect(agentId?: string, participantName?: string, modalities?: SessionModality[]): Promise<{
86
+ connect(agentId?: string, participantName?: string, modalities?: SessionModality[], participantMetadata?: Record<string, any>): Promise<{
84
87
  serverUrl: string;
85
88
  participantToken: string;
86
89
  voxketSessionId: string;
@@ -92,6 +95,7 @@ export declare class VoxketClient extends VoxketEventEmitter<VoxketEvents & RpcE
92
95
  participantName?: string;
93
96
  modalities?: SessionModality[];
94
97
  metadata?: Record<string, any>;
98
+ participantMetadata?: Record<string, any>;
95
99
  }): Promise<VoxketSession>;
96
100
  endSession(): Promise<SessionMetrics | null>;
97
101
  getCurrentSession(): VoxketSession | null;
@@ -215,6 +219,16 @@ export declare class VoxketClient extends VoxketEventEmitter<VoxketEvents & RpcE
215
219
  * Unregister an RPC method
216
220
  */
217
221
  unregisterRpcMethod(methodName: string): void;
222
+ /**
223
+ * Set participant metadata that will be sent with session creation requests.
224
+ * This is useful for passing business-specific user information to the API.
225
+ * @param metadata Object containing participant metadata (e.g., userId, customerType, etc.)
226
+ */
227
+ setParticipantMetadata(metadata: Record<string, any>): void;
228
+ /**
229
+ * Get the current participant metadata
230
+ */
231
+ getParticipantMetadata(): Record<string, any> | undefined;
218
232
  /**
219
233
  * Register a custom event listener for VoxketClient events.
220
234
  * This is a business-friendly alias for the inherited `on` method.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Test script to simulate visualization_data events
3
+ * This can be run in the browser console when the deep analysis component is active
4
+ */
5
+ declare global {
6
+ interface Window {
7
+ voxketClient?: any;
8
+ testVisualizationEvent?: () => void;
9
+ testBarChart?: () => void;
10
+ testLineChart?: () => void;
11
+ testTableData?: () => void;
12
+ }
13
+ }
14
+ declare function testVisualizationEvent(): void;
15
+ declare function testBarChart(): void;
16
+ declare function testLineChart(): void;
17
+ declare function testTableData(): void;
18
+ export { testVisualizationEvent, testBarChart, testLineChart, testTableData };
@@ -0,0 +1,8 @@
1
+ import { VoxketInteractiveView } from '../types/rpc';
2
+ /**
3
+ * Visualization RPC Component
4
+ * - Agent calls RPC with schema JSON
5
+ * - RpcManager passes data → this component renders chart/table
6
+ * - Component responds back via handler.didSuccess or handler.didFail
7
+ */
8
+ export declare const VisualizationView: VoxketInteractiveView;
@@ -0,0 +1,39 @@
1
+ import { VoxketClient } from '../core/client';
2
+ import { ChatMessage } from '../types/core';
3
+ import { InteractiveUIState } from '../types/rpc';
4
+ import { ToolExecutionData } from '../types/tools';
5
+ import * as React from 'react';
6
+ export type { ToolExecutionData };
7
+ export declare function useChatMessages(client: VoxketClient): {
8
+ messages: ChatMessage[];
9
+ setMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
10
+ isLoading: boolean;
11
+ setIsLoading: React.Dispatch<React.SetStateAction<boolean>>;
12
+ streamingMessages: Set<string>;
13
+ setStreamingMessages: React.Dispatch<React.SetStateAction<Set<string>>>;
14
+ pendingMessages: ChatMessage[];
15
+ setPendingMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
16
+ };
17
+ export declare function useAgentState(client: VoxketClient): {
18
+ agentState: "idle" | "thinking" | "speaking" | "tool_execution";
19
+ setAgentState: React.Dispatch<React.SetStateAction<"idle" | "thinking" | "speaking" | "tool_execution">>;
20
+ toolExecutions: ToolExecutionData[];
21
+ setToolExecutions: React.Dispatch<React.SetStateAction<ToolExecutionData[]>>;
22
+ };
23
+ export declare function useInteractionState(client: VoxketClient): {
24
+ currentInteraction: InteractiveUIState | null;
25
+ setCurrentInteraction: React.Dispatch<React.SetStateAction<InteractiveUIState | null>>;
26
+ };
27
+ export declare function useScrollBehavior(): {
28
+ messagesContainerRef: React.RefObject<HTMLDivElement>;
29
+ shouldAutoScroll: boolean;
30
+ setShouldAutoScroll: React.Dispatch<React.SetStateAction<boolean>>;
31
+ scrollToBottom: (immediate?: boolean) => void;
32
+ smartScrollToBottom: (immediate?: boolean) => void;
33
+ handleScroll: () => void;
34
+ };
35
+ export declare function useMobileDetection(): {
36
+ isMobile: boolean;
37
+ isFullscreen: boolean;
38
+ setIsFullscreen: React.Dispatch<React.SetStateAction<boolean>>;
39
+ };