"""Adapter protocols for Langfuse consumers."""

from __future__ import annotations

from typing import TYPE_CHECKING, Protocol, runtime_checkable

if TYPE_CHECKING:
    from dr_langfuse.prompts.prompt_fetch_request import PromptFetchRequest
    from dr_langfuse.prompts.prompt_payload import PromptPayload
    from dr_langfuse.tracing.models import TraceAck, TraceEventRequest


@runtime_checkable
class PromptProvider(Protocol):
    """Primitive prompt resolver."""

    def fetch_prompt(self, request: PromptFetchRequest) -> PromptPayload: ...


@runtime_checkable
class TraceEmitter(Protocol):
    """Primitive trace emission adapter."""

    def emit_trace(self, event: TraceEventRequest) -> TraceAck: ...
