"""Code repair protocol for type narrowing."""

from typing import Protocol


class CodeRepairProtocol(Protocol):
    """Type-narrowing protocol for handlers that support code repair."""

    supports_code_repair: bool

    async def code_repair_repair(self, user_id: str, optimization_id: str, ctx: object) -> object: ...
