/**
 * Auto-Source Assignment Service
 *
 * Automatically matches scanned plugins to the curated registry
 * and assigns download sources/URLs. Only assigns to plugins that
 * don't already have a configured source.
 *
 * @since v2.2.0
 */
import type { RegistryService } from '../registry/registry-service.js';
import type { RegistryPlugin } from '../registry/registry-types.js';
import type { Plugin, ScannedPlugin } from '../types/plugin.js';
import type { AutoAssignOptions, AutoAssignResult, SourceAssignment } from './auto-source-types.js';
/**
 * Auto-Source Assignment Service
 *
 * Matches scanned plugins against the curated registry and assigns
 * download sources. Respects manual overrides and confidence thresholds.
 */
export declare class AutoSourceAssigner {
    private readonly registryService;
    constructor(registryService: RegistryService);
    /**
     * Assign sources to scanned plugins by matching against the registry.
     *
     * @param scannedPlugins - Plugins discovered from JAR scanning
     * @param existingPlugins - Already-configured plugins (from plugins.json)
     * @param options - Assignment configuration
     * @returns Summary of assignments, suggestions, skips, and failures
     */
    assignSources(scannedPlugins: ScannedPlugin[], existingPlugins: Plugin[], options?: AutoAssignOptions): AutoAssignResult;
    /**
     * Check if a plugin already has a configured (non-manual) source
     */
    private hasConfiguredSource;
    /**
     * Try to find a source assignment for a scanned plugin.
     * Strategy order:
     *   1. Registry match (by name)
     *   2. Website URL hint (from plugin.yml website field)
     */
    private findAssignment;
    /**
     * Match a plugin name to the curated registry.
     * Uses exact name match first, then fuzzy search.
     *
     * @returns Registry plugin and confidence, or null if no good match
     */
    matchToRegistry(pluginName: string): {
        plugin: RegistryPlugin;
        confidence: number;
    } | null;
    /**
     * Extract a source assignment from a registry plugin entry.
     * Uses the preferred source from the registry.
     */
    extractSourceFromRegistry(registryPlugin: RegistryPlugin, pluginName: string, confidence: number): SourceAssignment | null;
    /**
     * Map registry source fields to Plugin identifier fields
     */
    private mapSourceIdentifiers;
    /**
     * Try to extract a source assignment from a website URL.
     * Parses known URL patterns for Spigot, Modrinth, GitHub, Hangar.
     */
    extractSourceFromWebsite(website: string, pluginName: string): SourceAssignment | null;
    /**
     * Apply source assignments to plugins, creating/updating Plugin entries.
     *
     * @param assignments - Source assignments to apply
     * @param existingPlugins - Current plugins list (mutated in place)
     * @param scannedPlugins - Scanned plugin data for version info
     * @returns Updated plugins list
     */
    applyAssignments(assignments: SourceAssignment[], existingPlugins: Plugin[], scannedPlugins: ScannedPlugin[]): Plugin[];
    /**
     * Apply identifier fields from an assignment to a Plugin object
     */
    private applyIdentifiers;
}
//# sourceMappingURL=auto-assigner.d.ts.map