import { EARS_SETTINGS_SCHEMA_VERSION, type EarsSettings } from './config.js'; import { type CloudAsrSettings } from './settings/cloud-asr.js'; import { type GeneralSettings } from './settings/general.js'; import { type PolishingSettings } from './settings/polishing.js'; import { type RecognitionSettings } from './settings/recognition.js'; import type { EarsSettingsPatch } from './remote-contract.js'; export { migrateV1ToV2, migrateV2ToV3, migrateV3ToV4, migrateSettingsToCurrent } from './settings/migrations.js'; /** Canonical Host persistence. The browser-facing EarsSettings shape stays flat. */ export type StoredEarsSettings = { schemaVersion: typeof EARS_SETTINGS_SCHEMA_VERSION; general: GeneralSettings; recognition: RecognitionSettings; cloudAsr: CloudAsrSettings; polishing: PolishingSettings; }; export declare function defaultStoredEarsSettings(): StoredEarsSettings; /** Normalize stored settings into canonical form. */ export declare function normalizeStoredEarsSettings(raw: unknown): StoredEarsSettings; export declare function flattenStoredSettings(raw: unknown): EarsSettings; export declare function unflattenEarsSettings(settings: EarsSettings, acceleration?: string): StoredEarsSettings; export declare function flatSettingsPatchToStoredPatch(patch: EarsSettingsPatch): Record; export declare function applyFlatSettingsPatch(stored: unknown, patch: EarsSettingsPatch): StoredEarsSettings; /** * Apply one flat patch and report the requested values it was built from. * * `unflattenEarsSettings` normalizes enumerated fields to a legal value, which * is right for recovering a corrupt stored document but would silently accept an * illegal write. The caller validates {@link requested} — the values as asked * for — and persists `next`. */ export declare function applyFlatSettingsPatchWithSettings(stored: unknown, patch: EarsSettingsPatch): { requested: EarsSettings; next: StoredEarsSettings; }; export declare function storedSettingsNeedRewrite(raw: unknown): boolean; export declare function isFutureSettingsSchema(raw: unknown): boolean; /** Convert schema user overrides into the flat field names understood by the client. */ export declare function flattenOverriddenSettings(raw: unknown, secrets?: readonly { path: string[]; set: boolean; }[]): string[];