import type { Context } from '@deepseek-ai/cordis'; import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol'; import { type PolishRoute, type ReasoningEffortsView } from '../config.js'; import type { WhisperModelState } from '../asr/whisper-models.js'; import type { AsrBackendInfo } from '../asr/types.js'; import type { CloudProviderModelsView, EarsSettingsPatch, EarsSettingsView, RemoteTextResult } from '../remote-contract.js'; import type { AboutInfo, UpdateCheckResult } from '../remote-contract.js'; export declare class PolishService extends TypertRemoteService { static inject: string[]; private settingsMigrationAttempted; private readonly whisperCapabilities; private whisperAvailability; private cloudModelsFailure; private readonly whisperModels; private readonly realtimeSessions; constructor(ctx: Context); getSettings(): EarsSettingsView; updateSettings(patch: EarsSettingsPatch, signal: AbortSignal): Promise; listRoutes(): Promise; listAsrBackends(): Promise; listCloudProviderModels(provider: string, signal: AbortSignal): Promise; getWhisperModelState(model: string): Promise; downloadWhisperModel(model: string): Promise; cancelWhisperModelDownload(model: string): Promise; deleteWhisperModel(model: string): Promise; getAbout(): AboutInfo; checkForUpdate(signal: AbortSignal): Promise; listReasoningEfforts(provider: string, model: string): Promise; transcribe(audioBase64: string, mimeType: string, signal: AbortSignal): Promise; startRealtime(signal: AbortSignal): Promise<{ sessionId: string; }>; sendRealtimeAudio(sessionId: string, audioBase64: string, signal: AbortSignal): Promise<{ text: string; final: boolean; }>; finishRealtime(sessionId: string, signal: AbortSignal): Promise; cancelRealtime(sessionId: string): Promise<{ cancelled: true; }>; private scheduleRealtimeSessionExpiry; private refreshRealtimeSessionExpiry; private removeRealtimeSession; polish(transcript: string, provider: string, model: string, reasoningEffort: string, signal: AbortSignal): Promise; private completePolish; private requireSettings; private settingsProvider; /** * Settings for a read that must still answer without them. * * Backend listing, model listing, and polish do not need persisted settings to * be correct in the degraded case, so an unavailable settings service yields * the shipped defaults instead of failing the call. */ private optionalSettings; private readSettingsSnapshot; /** * Rewrite the stored section in its canonical shape without moving it * forward: the write is built from a snapshot and must land on that same * revision, or dsh refuses it. */ private replaceSettings; private resolveReasoningEffort; private agentDefaultModelSelection; private currentWhisperAcceleration; private whisperAcceleration; private whisperIsAvailable; private withWhisperModelState; private cloudAsrIsAvailable; }