"""
Waterfall enrichment module for g-gremlin.

Provides multi-provider enrichment with configurable ordering, stop conditions,
provenance tracking, and graceful degradation.

Usage:
    from g_gremlin.waterfall import WaterfallRunner, load_config, SafetyFlags

    config = load_config("waterfall.yaml")
    runner = WaterfallRunner(config, SafetyFlags(dry_run=True))
    summary = runner.run(input_csv, output_csv)
"""

from .models import (
    ProviderStatus,
    ProviderPlan,
    FieldRequest,
    RowState,
    ProvenanceEvent,
    WaterfallSummary,
    ProviderResult,
    SafetyFlags,
    CostEstimate,
    PROVIDER_COST_ESTIMATES,
)
from .config import (
    WaterfallConfig,
    load_config,
    create_default_config,
    merge_cli_overrides,
    ConfigError,
    CacheConfig,
    RetryConfig,
    RateLimitConfig,
    OutputConfig,
)
from .runner import WaterfallRunner, WaterfallError
from .stop_conditions import StopCondition, StopConditionError
from .circuit_breaker import CircuitBreaker
from .provenance_writer import ProvenanceWriter, read_provenance

__all__ = [
    # Models
    "ProviderStatus",
    "ProviderPlan",
    "FieldRequest",
    "RowState",
    "ProvenanceEvent",
    "WaterfallSummary",
    "ProviderResult",
    "SafetyFlags",
    "CostEstimate",
    "PROVIDER_COST_ESTIMATES",
    # Config
    "WaterfallConfig",
    "load_config",
    "create_default_config",
    "merge_cli_overrides",
    "ConfigError",
    "CacheConfig",
    "RetryConfig",
    "RateLimitConfig",
    "OutputConfig",
    # Runner
    "WaterfallRunner",
    "WaterfallError",
    # Stop conditions
    "StopCondition",
    "StopConditionError",
    # Circuit breaker
    "CircuitBreaker",
    # Provenance
    "ProvenanceWriter",
    "read_provenance",
]
