/** * Bot Type Definitions * * Types for managing voice agent and screenshare bots in LiveKit sessions. */ /** * Type of bot to spawn */ export type BotType = 'voice-agent' | 'screenshare_livekit'; /** * Bot lifecycle state */ export type BotState = 'spawning' | 'running' | 'stopping' | 'stopped' | 'error'; /** * Bot status information */ export interface BotStatus { /** * Unique bot identifier */ bot_id: string; /** * Current lifecycle state */ status: BotState; /** * LiveKit room name the bot is connected to */ room_name: string; /** * Timestamp when bot was created */ created_at: string; /** * Optional error message if status is 'error' */ error?: string; } /** * Request payload for spawning a bot */ export interface SpawnBotRequest { /** * Session ID to spawn bot for */ session_id: string; /** * Type of bot to spawn */ bot_type: BotType; /** * Optional deck ID for screenshare bot */ deck_id?: string; /** * Optional configuration for the bot */ config?: Record; } /** * Response from bot spawn endpoint */ export interface SpawnBotResponse { /** * Unique bot identifier */ bot_id: string; /** * Initial bot state (usually 'spawning') */ status: BotState; /** * LiveKit room name the bot will join */ room_name: string; /** * Human-readable message */ message?: string; } /** * Options for spawning a voice agent bot */ export interface SpawnVoiceAgentOptions { /** * Additional configuration for voice agent */ config?: Record; } /** * Options for spawning a screenshare bot */ export interface SpawnScreenshareBotOptions { /** * Deck ID to present */ deckId: string; /** * Additional configuration for screenshare bot */ config?: Record; } /** * Internal bot tracking record */ export interface BotRecord { /** * Bot ID */ botId: string; /** * Bot type */ type: BotType; /** * Session ID this bot belongs to */ sessionId: string; /** * Current status */ status: BotStatus; /** * Timestamp when bot was spawned */ spawnedAt: Date; }