import type { LaunchChangeEntry, LaunchChangeGroup, LaunchConfig } from './types.js'; /** * Thrown by transformConfig when the source config is structurally invalid * (e.g. variant/valueType mismatch) and the migrator cannot produce a valid * qfg document from it. Callers in the source layer catch this specifically * to soft-skip the config with a warning rather than aborting the whole run. */ export declare class InvalidSourceConfigError extends Error { constructor(message: string); } export declare function slugify(value: string): string; export declare function isLegacyLogLevel(type: string): boolean; export declare function normalizeLogLevelKey(key: string): string; /** * qfg-qhk1 + qfg-6na9.3: resolve keys through the per-run key rewriter so the * destination is always flat AND 100% Policy-A conformant (charset + FS-floor, * with collision disambiguation). Launch keys are dotted identifiers, so this is * a no-op in the common case; an odd key still gets made safe, and the matching * IN_SEG reference (resolveSegmentRef, below) resolves the same source string so * a rewritten segment key never dangles its rules. */ export declare function normalizeKey(key: string): string; /** * qfg-l18w / qfg-0q1f: Operators Quonfig accepts in rule criteria. Mirrors * the `OperatorSchema` enum in cli/src/verify/validate.ts (and app-quonfig's * config-schemas.ts). All currently-known Launch operators are supported; * this allowlist guards against future Launch additions Quonfig hasn't * implemented yet — emitting an unrecognized operator would otherwise be * caught only at qfg verify time, after the migrator has already written * a broken file. Keep this list in lockstep with the verify schema; a CI * test in this file enforces parity. */ export declare const QUONFIG_SUPPORTED_OPERATORS: Set; export declare function transformConfig(config: LaunchConfig, envIdMap: Record, onDroppedEnv?: (envId: string) => void, onCoercedSentinel?: (envId: string, valueType: string) => void, onNormalizedWeights?: (detail: string) => void): Record; export declare function getOutputPath(type: string, key: string): string; /** * Walks the set of written files looking for cross-type collisions (the same * key appearing in multiple type-dirs). Reforge occasionally produces a config * and a feature_flag with the same key simultaneously — qfg requires globally- * unique keys, so we resolve the collision by keeping the config side and * marking the other side(s) for deletion. Callers should fs.unlinkSync the * paths in each resolution's `deleted` array and surface the resolutions in * stderr + MIGRATION_REPORT.md so the customer can clean up the source data. * * When the collision does NOT include 'config' (an unexpected pattern we have * not observed in production data), we still throw so the case surfaces for * review rather than silently picking a tiebreak. */ export declare function detectDuplicateKeys(files: Array<{ path: string; }>): import('../../source.js').DuplicateResolution[]; export declare function groupChanges(changes: LaunchChangeEntry[]): LaunchChangeGroup[];