text: from datetime import datetime, timedelta
  from typing import (
      TYPE_CHECKING,
      AsyncContextManager,
      Callable,
      Dict,
      List,
      Literal,
      TypeVar,
      Union,
  )
  
  if TYPE_CHECKING:
      from avilla.core.execution import Execution
      from avilla.core.protocol import BaseProtocol
      from avilla.core.relationship import Relationship
  
  
  TProtocol = TypeVar("TProtocol", bound="BaseProtocol")
  TConfig = TypeVar("TConfig")
  
  TExecutionMiddleware = Callable[["Relationship", "Execution"], AsyncContextManager[None]]
  
  CONST_TYPES = Union[str, bool, int, float, datetime, timedelta, None]
  METADATA_VALUE = Union[CONST_TYPES, List[CONST_TYPES], Dict[str, CONST_TYPES]]
  
  META_OPS = Union[
      Literal["get"],
      Literal["set"],
      Literal["reset"],
      Literal["prev"],
      Literal["next"],
      Literal["push"],
      Literal["pop"],
      Literal["add"],
      Literal["remove"],
  ]
  