"""
Sandai Operator SDK

A Python SDK for building high-performance, asynchronous batch processing operators.
"""

from .supervisor import RestartPolicy, Supervisor

TaskInput = None
TaskOutput = None
TaskError = None
InputArtifact = None
OutputArtifact = None
ProcessingContext = None
OptionsType = None
ResultsType = None
EOFMarker = None
BatchProcessor = None
FileChannel = None

try:
    from .types import (
        TaskInput,
        TaskOutput,
        TaskError,
        InputArtifact,
        OutputArtifact,
        ProcessingContext,
        OptionsType,
        ResultsType,
        EOFMarker,
    )
except ModuleNotFoundError as exc:
    if exc.name != "pydantic":
        raise

try:
    from .processor import BatchProcessor
    from .channel import FileChannel
except ModuleNotFoundError as exc:
    if exc.name not in {"redis", "requests", "sentry_sdk", "celery", "boto3", "oss2", "pydantic"}:
        raise

__all__ = [
    "BatchProcessor",
    "FileChannel", 
    "RestartPolicy",
    "Supervisor",
    "TaskInput",
    "TaskOutput",
    "TaskError",
    "InputArtifact",
    "OutputArtifact",
    "ProcessingContext",
    "OptionsType",
    "ResultsType",
    "EOFMarker",
]
