"""BaseStore protocol — storage abstraction for scan results and findings."""

from __future__ import annotations

from typing import Any, Protocol, runtime_checkable

__all__ = ["BaseStore"]

from keelson.core.models import AgentProfile, CampaignResult, ScanResult


@runtime_checkable
class BaseStore(Protocol):
    def save_scan(self, scan: ScanResult) -> None: ...
    def get_scan(self, scan_id: str) -> ScanResult | None: ...
    def list_scans(self, limit: int = 20) -> list[dict[str, Any]]: ...
    def save_campaign(self, campaign: CampaignResult) -> None: ...
    def get_campaign(self, campaign_id: str) -> CampaignResult | None: ...
    def list_campaigns(self, limit: int = 20) -> list[dict[str, Any]]: ...
    def save_agent_profile(self, profile: AgentProfile) -> None: ...
    def get_agent_profile(self, profile_id: str) -> AgentProfile | None: ...
    def close(self) -> None: ...
