/** A device entry in the ThermoWorks statusline configuration. */ export interface DeviceEntry { serial: string; label: string; /** Channel numbers to display, or "avg" for average temperature. */ channels: number[] | "avg"; } /** * Persistent local channel labels keyed by `"serial:channelNumber"`. * * Example: `{ "ABC123:1": "Pit", "ABC123:2": "Brisket" }` */ export type ChannelLabelMap = Record; /** Shared configuration for ThermoWorks CLI and VS Code statusline. */ export interface StatuslineConfig { /** Devices to show in statusline. */ devices: DeviceEntry[]; /** API cache duration in seconds. */ refreshSeconds: number; /** Persistent local channel labels, keyed by `"serial:channelNumber"`. */ channelLabels?: ChannelLabelMap; } /** Maximum length for a user-provided channel label. */ export declare const MAX_CHANNEL_LABEL_LENGTH = 50; /** Default configuration values. */ export declare const DEFAULT_STATUSLINE_CONFIG: StatuslineConfig; /** * Strip ANSI escape sequences and control characters from a label string. * * Labels reach the terminal, the DOM, and MCP/LLM output, so they must be * treated as untrusted input. This function is the single sanitization point * shared by all surfaces. */ export declare function sanitizeLabel(value: string | null | undefined): string | null; /** * Build the config map key for a channel label. * * @param serial - Device serial number. * @param channelNumber - 1-indexed channel number (string or number). */ export declare function channelLabelKey(serial: string, channelNumber: string | number): string; /** * Resolve the display name for a channel, applying the three-tier fallback: * * 1. Local custom label (from `channelLabels` config map) * 2. Cloud channel label (`channel.label` from the API) * 3. Default `"Ch N"` derived from the channel number * * @param serial - Device serial number. * @param channel - The channel object from the SDK. * @param channelLabels - The persisted label map (may be undefined). * @param index - Zero-based index, used when `channel.number` is null. * @returns The resolved display name. */ export declare function resolveChannelLabel(serial: string, channel: { label?: string | null; number?: string | null; }, channelLabels: ChannelLabelMap | undefined, index: number): string; /** Validate a raw object as a partial StatuslineConfig. */ export declare function isValidStatuslineConfig(raw: unknown): raw is Partial; /** Validate a single device entry. */ export declare function isValidDeviceEntry(entry: unknown): entry is DeviceEntry; /** Validate a channel label map: must be a plain object with string values. */ export declare function isValidChannelLabelMap(raw: unknown): raw is ChannelLabelMap; //# sourceMappingURL=config.d.ts.map