import { Vowel } from '../../core/VowelClient'; import { VowelClientConfig } from '../../types'; /** * Main controller for Vowel instance in extension background script * * This controller: * - Manages a single Vowel client instance * - Routes messages from content scripts to appropriate handlers * - Broadcasts state updates to all listening content scripts * - Handles extension lifecycle (install, update, suspend) * * @example * ```typescript * const controller = new ExtensionVowelController({ * apiKey: 'vkey_public_xxx', * systemInstruction: 'Custom instructions...', * }); * * await controller.initialize(); * ``` */ export declare class ExtensionVowelController { private vowelClient; private messageRouter; private stateSync; private config; constructor(config: VowelClientConfig); /** * Initialize the Vowel client with extension-specific adapters */ initialize(): Promise; /** * Start a voice session * * @param tabId - Optional tab ID to associate with session */ startSession(tabId?: number): Promise; /** * Stop the current voice session */ stopSession(): Promise; /** * Get current Vowel state * * @returns Current state object */ getState(): any; /** * Update configuration * * @param config - Partial configuration to update */ updateConfig(config: Partial): void; /** * Register a custom action that the AI can perform * * Forwards to the internal Vowel client's registerAction method * * @param name - Action name (will be used as tool name) * @param definition - Action definition with parameters * @param handler - Function to execute when action is called * * @example * ```ts * controller.registerAction('goToSite', { * description: 'Navigate to a website', * parameters: { * url: { type: 'string', description: 'URL to navigate to' } * } * }, async ({ url }) => { * // Implementation * }); * ``` */ registerAction(name: string, definition: any, handler: (params: T) => Promise): void; /** * Cleanup resources */ cleanup(): Promise; /** * Get the Vowel client instance (for direct access if needed) * * @returns Vowel client instance or null */ getVowelClient(): Vowel | null; /** * Setup message listeners from content scripts */ private setupMessageListeners; /** * Setup extension lifecycle handlers */ private setupLifecycleHandlers; } //# sourceMappingURL=ExtensionVowelController.d.ts.map