"""Code optimization protocol for type narrowing."""

from typing import Protocol


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

    supports_optimizer: bool

    async def optimizer_optimize(self, request: object, data: object) -> object: ...
