"""Pluggable property-search sources. See sources/_base.py for the contract.

Adding a source:
1. Create sources/<name>.py with a Source subclass
2. Add it to REGISTRY below
3. Reference 'name' in campaigns.yaml
"""
from sources._base import DisabledSource, PropertyHit, SearchCriteria, Source
from sources._disabled import make_disabled_sources
from sources.email_ingest import LeggettEmailSource, ProperstarEmailSource
from sources.greenacres import GreenAcresSource
from sources.immonot import ImmonotSource
from sources.listglobally_search import ListGloballySearchSource


def build_registry() -> dict[str, Source]:
    """Single instance per source — health() and search() are stateless."""
    sources = [
        GreenAcresSource(),
        ImmonotSource(),
        LeggettEmailSource(),
        ProperstarEmailSource(),
        ListGloballySearchSource(),
    ]
    sources.extend(make_disabled_sources())
    return {s.name: s for s in sources}


__all__ = ['Source', 'SearchCriteria', 'PropertyHit', 'DisabledSource', 'build_registry']
