# Generated by @typespec-fastapi/emitter
# Do not edit this file manually — regenerate with: tsp compile .
"""Service layer for Search operations.

Contains a Protocol interface defining the service contract and a stub
implementation that raises NotImplementedError for all methods.
"""
from __future__ import annotations


from typing import Protocol, runtime_checkable

from ..models.common import ValidationError
from ..models.session_hub import MessageSearchResult, SessionRow, SessionSearchResult


@runtime_checkable
class SearchService(Protocol):
    """Service interface for Search operations."""
    async def search_messages(self, query: str, tool: str | None = None, host: str | None = None, role: str | None = None, limit: int | None = None, mode: str | None = None) -> list[MessageSearchResult] | ValidationError:
        ...
    async def search_sessions(self, query: str, tool: str | None = None, host: str | None = None, limit: int | None = None, mode: str | None = None) -> list[SessionRow] | ValidationError:
        ...
    async def search_similar_sessions(self, query: str, tool: str | None = None, host: str | None = None, limit: int | None = None) -> list[SessionSearchResult]:
        ...
    async def search_similar_messages(self, query: str, tool: str | None = None, host: str | None = None, role: str | None = None, limit: int | None = None) -> list[MessageSearchResult]:
        ...


class SearchServiceStub:
    """Stub implementation of SearchService.

    All methods raise NotImplementedError. Replace with actual
    business logic by subclassing or monkey-patching.
"""
    async def search_messages(self, query: str, tool: str | None = None, host: str | None = None, role: str | None = None, limit: int | None = None, mode: str | None = None) -> list[MessageSearchResult] | ValidationError:
        raise NotImplementedError(
            "Method search_messages not yet implemented"
        )
    async def search_sessions(self, query: str, tool: str | None = None, host: str | None = None, limit: int | None = None, mode: str | None = None) -> list[SessionRow] | ValidationError:
        raise NotImplementedError(
            "Method search_sessions not yet implemented"
        )
    async def search_similar_sessions(self, query: str, tool: str | None = None, host: str | None = None, limit: int | None = None) -> list[SessionSearchResult]:
        raise NotImplementedError(
            "Method search_similar_sessions not yet implemented"
        )
    async def search_similar_messages(self, query: str, tool: str | None = None, host: str | None = None, role: str | None = None, limit: int | None = None) -> list[MessageSearchResult]:
        raise NotImplementedError(
            "Method search_similar_messages not yet implemented"
        )
