/** * Durable notification preferences for the completion-sound plugin. Standalone * distribution stores them in browser `localStorage` (no Host settings * dependency), so this module owns the schema, defaults, and the storage * round-trip the client half reads and writes. */ import z from '@deepseek-ai/schemastery'; /** Selectable embedded sounds; 'none' silences the completion reminder. */ export declare const NOTIFY_SOUNDS: readonly ["none", "a", "b", "c"]; /** One selectable notification sound. */ export type NotifySound = typeof NOTIFY_SOUNDS[number]; /** Which turn completions ring. */ export declare const NOTIFY_REMIND: readonly ["background-only", "any"]; /** One completion-reminder scope. */ export type NotifyRemind = typeof NOTIFY_REMIND[number]; /** Durable notification section shared by the schema and the browser scope. */ export interface NotifySettings { /** Master switch; disabled never rings. */ enabled: boolean; /** Embedded sound to play; 'none' silences even when enabled. */ sound: NotifySound; /** Element volume, 0..1. */ volume: number; /** 'background-only' rings sessions the Host marks completed (not selected); 'any' rings every turn end. */ remind: NotifyRemind; /** Turns shorter than this (ms) never ring. */ minTurnMs: number; } /** * Durable notification schema; the standalone client validates every * `localStorage` round-trip through it so a corrupt or hand-edited value * falls back to defaults instead of reaching the player. */ export declare const NotifySettingsSchema: z; /** The resolved defaults the schema applies to an empty section. */ export declare const DEFAULT_NOTIFY_SETTINGS: NotifySettings; /** `localStorage` key for the standalone settings document. */ export declare const NOTIFY_STORAGE_KEY = "dsh-ui-notify.settings"; /** Storage backend the settings round-trip reads and writes. */ export interface NotifyStorage { getItem(key: string): string | null; setItem(key: string, value: string): void; } /** * Read the persisted settings, validating against the schema. Any parse or * validation failure — corrupt JSON, unknown sound, out-of-range volume, or a * storage backend that throws (private mode) — returns the defaults. * @param storage - storage backend; defaults to the browser's `localStorage`. * @returns the resolved settings. */ export declare function loadNotifySettings(storage?: NotifyStorage): NotifySettings; /** * Persist the settings. A failing backend (quota, private mode) is a silent * no-op — the in-memory value still drives the session, only durability is lost. * @param settings - resolved settings to persist. * @param storage - storage backend; defaults to the browser's `localStorage`. */ export declare function saveNotifySettings(settings: NotifySettings, storage?: NotifyStorage): void;