import type { EarsSettings } from '../config.js'; import type { EarsRemote } from '../remote.js'; import type { VoiceStateDetailParams } from './voice-session.js'; export type VoiceInputState = 'idle' | 'starting' | 'recording' | 'transcribing' | 'polishing' | 'error' | 'polish-error' | 'upstream-error'; export interface DraftActions { setDraft(text: string): void; } export interface CommitTranscriptOptions { transcript: string; baseDraft: string; expectedDraft?: string; requireUnchanged: boolean; transcriptAlreadyApplied?: boolean; settings: EarsSettings; remote: EarsRemote; setState: (state: VoiceInputState, detail?: string, detailCode?: string, detailParams?: VoiceStateDetailParams) => void; latestDraftRef: { current: string; }; actionsRef: { current: DraftActions; }; polishAbortRef: { current: AbortController | null; }; isCurrent?: () => boolean; } export declare function commitTranscript(options: CommitTranscriptOptions): void; export declare function shouldRequestPolish(settings: Pick): boolean; export interface PolishDraftOptions { transcript: string; baseDraft: string; originalDraft: string; draftAtStop: string; provider: string; model: string; reasoningEffort: string; remote: EarsRemote; setState: (state: VoiceInputState, detail?: string, detailCode?: string, detailParams?: VoiceStateDetailParams) => void; latestDraftRef: { current: string; }; actionsRef: { current: DraftActions; }; polishAbortRef: { current: AbortController | null; }; isCurrent?: () => boolean; } export declare function polishDraft(options: PolishDraftOptions): Promise; export declare function shouldApplyPolishResult(currentDraft: string, draftAtStop: string, baseDraft: string, originalDraft?: string): boolean; export declare function updateDraft(baseDraft: string, transcript: string, latestDraftRef: { current: string; }, actionsRef: { current: DraftActions; }): string; export declare function appendToDraft(baseDraft: string, transcript: string): string;