/**
 * Sink Registry Service
 *
 * Manages sink definitions loaded from a project's `_sinks.json` file.
 * Provides lookup, listing, tag-based matching, and registration of new sinks.
 * Works alongside SchemaRegistryService to form the Data Architecture V2
 * ingestion layer.
 *
 * @module services/data/sink-registry.service
 */
import type { SinkDefinition } from '../../types/data-object.types.js';
/**
 * Singleton service that manages data sink definitions.
 *
 * Sinks are loaded from `{projectPath}/sinks/_sinks.json`. Each sink declares
 * a name, schema reference, tags, and a directory for storage. The matchSink()
 * method enables content-aware routing of incoming data.
 */
export declare class SinkRegistryService {
    private static instance;
    private readonly logger;
    private readonly sinks;
    private constructor();
    /**
     * Get the singleton instance.
     *
     * @returns SinkRegistryService singleton
     */
    static getInstance(): SinkRegistryService;
    /**
     * Reset the singleton (for testing).
     */
    static resetInstance(): void;
    /**
     * Load sink definitions from a project's `_sinks.json` file.
     *
     * If the file does not exist, the service starts with an empty registry
     * (no error thrown). Invalid entries (missing id) are skipped with a warning.
     *
     * @param projectPath - Absolute path to the Crewly project root
     */
    loadSinks(projectPath: string): Promise<void>;
    /**
     * Get a sink by its ID.
     *
     * @param sinkId - Unique sink identifier
     * @returns The sink definition, or null if not found
     */
    getSink(sinkId: string): SinkDefinition | null;
    /**
     * List all registered sinks.
     *
     * @returns Array of all SinkDefinitions
     */
    listSinks(): SinkDefinition[];
    /**
     * Match incoming data to the best sink based on tag overlap.
     *
     * Scores each sink by the number of matching tags (intersection with the
     * provided tags array). If `content` is provided and a sink name appears
     * in the content, that sink gets a bonus point. Returns the highest-scoring
     * sink, or null if no sink has any overlap.
     *
     * @param tags - Tags from the incoming data
     * @param content - Optional content string for keyword matching
     * @returns Best-matching SinkDefinition, or null
     */
    matchSink(tags: string[], content?: string): SinkDefinition | null;
    /**
     * Register a new sink definition and persist it to `_sinks.json`.
     *
     * Creates the sinks directory and registry file if they don't exist.
     * If a sink with the same ID already exists, it is overwritten.
     *
     * @param projectPath - Absolute path to the Crewly project root
     * @param sink - The sink definition to register
     */
    registerSink(projectPath: string, sink: SinkDefinition): Promise<void>;
    /**
     * Compute the absolute path to the _sinks.json registry file.
     *
     * @param projectPath - Project root
     * @returns Absolute path to _sinks.json
     */
    private registryPath;
}
//# sourceMappingURL=sink-registry.service.d.ts.map