// src/config/v2-format.ts // Telling a v2 config file from a legacy one. Kept free of imports so a light // reader (the HUD statusline) can ask without loading the config module graph. export const CONFIG_FILE_VERSION_2 = '2'; export function isV2File(raw: unknown): raw is Record & { version: '2' } { return ( !!raw && typeof raw === 'object' && !Array.isArray(raw) && // "2" or 2: a hand-written file may use either, and a v2 file mistaken for // legacy would fail the loader's major-version check and drop everything. String((raw as Record).version) === CONFIG_FILE_VERSION_2 ); }