from __future__ import annotations

from dataclasses import dataclass, field


@dataclass(slots=True)
class RetrievalQuery:
    text: str
    mode: str
    limit: int = 5
    layers: list[str] = field(default_factory=list)
    path_prefixes: list[str] = field(default_factory=list)
    doc_kind: str | None = None


@dataclass(slots=True)
class RetrievalItem:
    content: str
    path: str
    layer: str
    title: str
    score: float | None = None
    metadata: dict | None = None
