# pipeline/pipeline/plugins/standard.py
from __future__ import annotations

from dataclasses import dataclass

from fitz_ai.engines.classic_rag.config.schema import ClassicRagConfig
from fitz_ai.engines.classic_rag.pipeline.base import Pipeline, PipelinePlugin
from fitz_ai.engines.classic_rag.pipeline.engine import RAGPipeline
from fitz_ai.logging.logger import get_logger
from fitz_ai.logging.tags import PIPELINE

logger = get_logger(__name__)


@dataclass
class StandardPipelinePlugin(PipelinePlugin):
    """
    Balanced default pipeline plugin.

    Must only delegate to RAGPipeline.from_config().
    """

    plugin_name: str = "standard"

    def build(self, cfg: ClassicRagConfig) -> Pipeline:
        logger.info(f"{PIPELINE} Building Standard pipeline")
        return RAGPipeline.from_config(cfg)
