/** * Unit / localization configuration for weather output. * * The server defaults to imperial units (preserving historical behavior for * existing users). A server-wide default can be set via environment variables, * and individual tool calls may override it per request (see * `src/utils/unitPreferences.ts`). * * Environment variables: * WEATHER_UNITS imperial | metric (default: imperial) * WEATHER_TEMPERATURE_UNIT F | C (override) * WEATHER_WIND_SPEED_UNIT mph | kmh | ms | kn (override) * WEATHER_PRECIPITATION_UNIT inch | mm (override) * WEATHER_PRESSURE_UNIT inHg | hPa (override) * WEATHER_DISTANCE_UNIT mi | km (override) * WEATHER_TIME_FORMAT 12h | 24h (override) */ export type UnitSystem = 'imperial' | 'metric'; export type TemperatureUnit = 'F' | 'C'; export type WindSpeedUnit = 'mph' | 'kmh' | 'ms' | 'kn'; export type PrecipitationUnit = 'inch' | 'mm'; export type PressureUnit = 'inHg' | 'hPa'; export type DistanceUnit = 'mi' | 'km'; export type TimeFormat = '12h' | '24h'; /** * A fully-resolved set of unit preferences. Every weather output path formats * values according to one of these. */ export interface UnitPreferences { temperature: TemperatureUnit; windSpeed: WindSpeedUnit; precipitation: PrecipitationUnit; pressure: PressureUnit; distance: DistanceUnit; timeFormat: TimeFormat; } /** Imperial preset — the historical default. */ export declare const IMPERIAL_PREFERENCES: UnitPreferences; /** Metric preset. */ export declare const METRIC_PREFERENCES: UnitPreferences; /** * Return the base preset for a unit system. */ export declare function systemPreferences(system: UnitSystem): UnitPreferences; /** * Accepted spellings for each unit, normalized to the canonical token. * Kept permissive so both the env layer and per-call params can share it. */ declare const NORMALIZERS: { readonly system: Map; readonly temperature: Map; readonly windSpeed: Map; readonly precipitation: Map; readonly pressure: Map; readonly distance: Map; readonly timeFormat: Map; }; /** * Normalize a raw string to a canonical unit token, or return undefined if the * value is unrecognized. Exported for reuse by the per-call resolver. */ export declare function normalizeUnit(kind: K, raw: string | undefined): (typeof NORMALIZERS)[K] extends Map ? V | undefined : never; /** * The server-wide default unit preferences, resolved once at startup from the * environment. Per-call tool parameters layer on top of this. */ export declare const defaultUnitPreferences: UnitPreferences; export {}; //# sourceMappingURL=units.d.ts.map