import type { LauncherDropTarget } from '../hooks/useLauncherDrag'; import type { PhaseStatus } from '../hooks/usePhaseUpdates'; import type { AgentMode } from '../lib/agentMode'; import { type BuddyShape, CAPTURE_MODE, type CaptureMode, type ChatSurface, DEFAULT_CAPTURE_MODE, type LauncherMode, MIC_MODE, type MicMode } from '../lib/constants'; import type { SessionStatus } from '../lib/sessionStatus'; import type { BarDock } from '../lib/voiceBar'; import type { Message } from '../types'; export type SidebarTab = 'chat' | 'agenda'; export { CAPTURE_MODE, type CaptureMode, DEFAULT_CAPTURE_MODE, MIC_MODE, type MicMode }; export interface AgentControls { highlight?: boolean; actions?: boolean; micMode?: MicMode; chat?: ChatSurface; } export type UserContext = Record; export interface UiPreferences { animateCursor?: boolean; autoStart?: boolean; } export type { AgentMode, SessionStatus }; export interface ModuleCurrentSession { id: string; status: SessionStatus; currentPhaseIndex: number; } export interface Module { id: string; name: string; description: string | null; type: string; mode: AgentMode; priority: number; controls: AgentControls; uiPreferences: UiPreferences; totalPhases: number; currentSession: ModuleCurrentSession | null; } export interface ResumableSession { id: string; agentId: string; } export interface ModuleDefault { agentId: string | null; sessionId: string | null; } export interface BuddyAppearance { enabled: boolean; shape: BuddyShape; } export interface WidgetAppearance { accentColor: string | null; logoUrl: string | null; position: 'left' | 'right' | null; verticalAlign: 'top' | 'middle' | 'bottom' | null; launcherMode: LauncherMode | null; buddy: BuddyAppearance | null; } export interface IdleSessionHistory { messages: Message[]; phases: PhaseStatus[]; isLoading: boolean; } export declare enum AdoptionGoalStatus { Attended = "attended", Dismissed = "dismissed" } export declare enum AdoptionMatchType { Exact = "exact", Prefix = "prefix", Glob = "glob" } export interface AdoptionGoalMatch { goalId: string; agentId: string; displayMessage: string; objective: string; matchType: AdoptionMatchType; hashPattern: string | null; priority: number; } export interface LiveAgentPublicValue { isConnected: boolean; isStarting: boolean; isDisconnecting: boolean; isPausing: boolean; error: string; errorCode: number | null; agentId: string | null; agentMode: AgentMode | null; startSession: (opts: { agentId: string; agentControls?: AgentControls | undefined; existingSessionId?: string | undefined; }) => Promise; pauseSession: () => Promise; resumeSession: () => Promise; disconnect: () => Promise; isPaused: boolean; resumableSession: ResumableSession | null; isPanelOpen: boolean; openPanel: () => void; closePanel: () => void; togglePanel: () => void; variant: 'floating' | 'sidebar'; position: 'left' | 'right'; setPosition: (position: 'left' | 'right') => void; minimizable: boolean; isMinimized: boolean; expandPanel: () => void; minimizePanel: () => void; isAuthenticated: boolean; isValidating: boolean; authError: string; requestOtp: (email: string) => Promise; verifyOtp: (email: string, code: string) => Promise; logoutAuth: () => Promise; isAuthSubmitting: boolean; sidebarTab: SidebarTab; setSidebarTab: (tab: SidebarTab) => void; autoFocusChat: boolean; captureMode: CaptureMode; agentControls?: AgentControls | undefined; displayModules: Module[]; activeModule: Module | null; isLoadingModules: boolean; modulesError: string | null; refetchModules: () => Promise; selectModule: (id: string) => void; textMode: boolean; } export interface LiveAgentContextValue extends LiveAgentPublicValue { defaultAgentId: string | null; startDefaultSession: () => void; buddyActive: boolean; buddyShape: BuddyShape; pauseTimeoutSeconds: number | null; usesHostAuth: boolean; authFailed: boolean; connection: { livekitUrl: string; token: string; } | null; shouldConnect: boolean; historyMessages: Message[]; idleHistory: IdleSessionHistory; phasesSnapshot: unknown[]; setPhasesSnapshot: (phases: unknown[]) => void; hasResolvedModules: boolean; appearance: WidgetAppearance | null; adoptionGoals: AdoptionGoalMatch[]; startAdoptionSession: (goal: AdoptionGoalMatch) => void; attendGoal: (goalId: string) => void; setTextModeState: (enabled: boolean) => void; launcherBottomPx: number; setLauncherBottomPx: (px: number) => void; commitLauncherDrop: (target: LauncherDropTarget) => void; popsDown: boolean; barDock: BarDock | null; setBarDock: (next: BarDock) => void; panelExpanded: boolean; togglePanelExpanded: () => void; panelRef: React.RefObject; controlBarRef: React.RefObject; isDragging: boolean; setIsDragging: (dragging: boolean) => void; chatActivityAt: number; reportChatActivity: () => void; chatDraft: string; setChatDraft: (text: string) => void; setAutoStartAfterLogin: (pending: boolean) => void; } export declare const LiveAgentContext: import("react").Context;