import { type EngineLevel } from '../patterns/types.js'; export type EngineMode = 'regex' | 'llm' | 'hybrid'; export interface Config { /** * Locale pack to run, or 'all' (the default) for every pack at once. * See ALL_LOCALES for why the default is not a single language. */ lang: string; engines: EngineMode; ollamaModel: string; ollamaBaseUrl: string; autoUnmask: boolean; strictValidation: boolean; customLiterals: string[]; /** * How much confidence a match needs before it is masked: * balanced (default) masks only high-confidence matches, strict adds * weaker context-dependent ones, paranoid masks everything a rule sees. */ sensitivity: EngineLevel; /** * Extra locales to recognize alongside `lang`. A Polish invoice carries * German and Italian identifiers too, and those packs would otherwise stay * dormant because the document language is Polish. Redundant while `lang` * is 'all'; the point of it is narrowing `lang` without losing a neighbour. */ extraLocales: string[]; } export interface CliArgs { lang?: string; engines?: EngineMode; ollamaModel?: string; ollamaBaseUrl?: string; config?: string; autoUnmask?: boolean; strictValidation?: boolean; customLiterals?: string[]; sensitivity?: EngineLevel; extraLocales?: string[]; } /** * Singleton configuration manager. * * Priority (highest to lowest): CLI args > mcp-config.json > built-in defaults * * That ordering only holds because every CLI flag is genuinely optional: a * flag carrying a commander default would arrive here indistinguishable from * one the user typed, and would silently outrank the config file. * * Usage: * ConfigManager.init(cliArgs) // once, in cli.ts * ConfigManager.getInstance() // everywhere else * ConfigManager.reset() // in tests, to reset between cases */ export declare class ConfigManager { private static instance; private readonly config; private readonly warnings; private constructor(); /** * Merge a parsed config file over the running config, ignoring keys it does * not set and refusing values outside the documented enums. */ private applyFile; private validEngines; private validSensitivity; static init(cliArgs?: CliArgs): ConfigManager; static getInstance(): ConfigManager; /** Reset the singleton — for use in tests only */ static reset(): void; /** Returns a shallow copy of the current config to prevent mutation */ get(): Config; /** * Problems found while loading the configuration — an unreadable file, a * value outside its enum. Reported at startup rather than swallowed. */ getWarnings(): string[]; } //# sourceMappingURL=manager.d.ts.map