import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { CodexConversionConfig } from "../../adapter/activation/config.ts"; import type { ActiveVoiceGuard } from "../active-owner.ts"; import { type PreparedRealtimeContext, type RealtimePeerPlan, type VoiceControllerRuntime } from "./start.ts"; import type { CodexRealtimeConversation } from "../conversation/session.ts"; import type { CodexVoiceSessionMessages } from "../session-messages.ts"; import type { CodexVoiceMode } from "../ui.ts"; import type { ControllerHandoff } from "./handoff.ts"; import type { ControllerLifecycle } from "./lifecycle.ts"; import type { ControllerState } from "./state.ts"; interface ConnectionCallbacks { prepareRealtimePrompt(ctx: ExtensionContext): string | undefined; stop(options: { announce: boolean; transferring: boolean; }): Promise; finishDictation(options: { announce: boolean; }): Promise; cancelRefresh(): void; } /** Binds startup and reconnect to the same mode, ownership and presentation authorities. */ export declare class ControllerConnection { private readonly pi; private readonly runtime; private readonly ownership; private readonly messages; private readonly handoff; private readonly lifecycle; private readonly presentation; private readonly callbacks; constructor(pi: ExtensionAPI, runtime: VoiceControllerRuntime, ownership: ActiveVoiceGuard, messages: CodexVoiceSessionMessages, handoff: ControllerHandoff, lifecycle: ControllerLifecycle, presentation: ControllerState, callbacks: ConnectionCallbacks); start(ctx: ExtensionContext, config: CodexConversionConfig, mode: CodexVoiceMode, realtimePeerPlan?: RealtimePeerPlan, signal?: AbortSignal, resume?: boolean, inputMuted?: boolean, preparedRealtimeContext?: PreparedRealtimeContext, alternateVoice?: boolean): Promise; drop(session: CodexRealtimeConversation, error: Error): void; } export {};