from typing import Protocol, Any, Optional, Dict

class DockAIPlugin(Protocol):
    name: str
    version: str

    # All hooks are optional
    def on_start(self, ctx: Dict[str, Any]) -> None: ...
    def on_logs_fetched(self, ctx: Dict[str, Any], logs: str) -> None: ...
    def on_ai_response(self, ctx: Dict[str, Any], response: str, meta: Optional[dict]) -> None: ...
    def on_error(self, ctx: Dict[str, Any], err: Exception) -> None: ...
    def on_finish(self, ctx: Dict[str, Any], result: Dict[str, Any]) -> None: ...