import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { CodexVoiceAuth } from "../auth.ts"; import type { PreparedRealtimeContext } from "../controller/start.ts"; import type { CodexVoiceController } from "../controller.ts"; import { type LanVoiceCertificate } from "./certificate.ts"; import type { LanVoiceSettings } from "./settings-contract.ts"; export interface CodexLanVoiceServer { readonly ownerSessionId: string; readonly urls: string[]; readonly port: number; readonly certificateFingerprint: string; hasActiveConversation(): boolean; browserAttached(): boolean; verifyTakeoverHost(verify: (proof: { port: number; token: string; }) => Promise): Promise; notifyTakeover(token: string): Promise; takeover(): Promise; agentStarted(): void; agentSettled(text?: string): void; uiPromptStarted(title?: string): void; uiPromptEnded(agentRunning: boolean): void; close(): Promise; } export declare function startCodexLanVoiceServer(options: { ctx: ExtensionContext; settings: LanVoiceSettings; voice: CodexVoiceController; resolveAuth(): Promise; sendUserMessage(text: string): void; ownerSessionId: string; port?: number | undefined; certificateAgentDir: string; certificate?: LanVoiceCertificate; takeover?: { token: string; prepared: PreparedRealtimeContext; inputMuted: boolean; alternateVoice: boolean; }; }): Promise;