/**
 * Label-set matching and overlap detection for the scaler module.
 *
 * Label sets are normalized (sorted, deduplicated, lowercased) for
 * deterministic comparison.
 *
 * findBackendForLabels uses subset matching: a job requiring ['macos']
 * matches a scaler with ['macos', 'darwin', 'bare-metal']. This is
 * consistent with peer routing (findPeersWithCapacity) and allows
 * workflows to target broad labels like 'macos' without listing every
 * label the scaler defines.
 */
/**
 * Normalize a label set for comparison.
 * Sorts alphabetically, deduplicates, and lowercases all labels.
 * Produces a deterministic string key for comparison.
 *
 * @example
 * normalizeLabelSet(['Docker', 'linux', 'linux']) // => "docker,linux"
 * normalizeLabelSet([]) // => ""
 */
export declare function normalizeLabelSet(labels: string[]): string;
/**
 * Check if two label sets are exactly equal after normalization.
 * Subsets do NOT match -- ["linux"] does not match ["linux", "docker"].
 */
export declare function labelSetsMatch(a: string[], b: string[]): boolean;
/**
 * Detect overlapping label sets across different scalers.
 * Returns all pairs of scalers that share the same normalized label set.
 *
 * Intra-scaler duplicates are allowed (same scaler, duplicate label sets).
 * Only cross-scaler overlaps are flagged.
 *
 * Used at startup to reject configs with ambiguous routing.
 */
export declare function detectLabelSetOverlaps(scalers: Array<{
    name: string;
    labelSets: Array<{
        labels: string[];
    }>;
}>): Array<{
    labels: string;
    scaler1: string;
    scaler2: string;
}>;
/**
 * Find which scaler backend handles a given set of labels.
 * Returns the scaler name and label-set index, or null if no match.
 *
 * Uses subset matching: job labels must be a subset of the scaler's label set.
 * ['macos'] matches ['macos', 'darwin', 'bare-metal']. This is consistent
 * with peer routing (findPeersWithCapacity) which uses the same semantics.
 *
 * In addition, every label declared in a scaler's `mandatoryLabels` must be
 * present in the job's `runsOn`. This is the Kubernetes-taint-style opt-in
 * gate: a scaler with `mandatoryLabels: ['gpu']` only accepts jobs that
 * explicitly include `gpu` in `runsOn`.
 *
 * When multiple backends match, the one with the smallest label set wins
 * (most specific match).
 */
export declare function findBackendForLabels(labels: string[], scalers: Array<{
    name: string;
    labelSets: Array<{
        labels: string[];
    }>;
    mandatoryLabels?: string[];
}>, excludeLabels?: string[]): {
    scalerName: string;
    labelSetIndex: number;
} | null;
//# sourceMappingURL=label-matcher.d.ts.map