Rebrand the Rust client crate (coven/ → hh/, package+binary "hack-house"), README, CLI strings, and branch (coven → hack-house). Gitea repo renamed cmd-chat → hack-house to match. Crypto/server logic unchanged; selftest + golden-vector test still green, binary is now `hack-house`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
711 B
Python
39 lines
711 B
Python
from enum import Enum, IntEnum, auto
|
|
|
|
|
|
class StrEnum(str, Enum): # no cov
|
|
def _generate_next_value_(name: str, *args) -> str: # type: ignore
|
|
return name.lower()
|
|
|
|
def __eq__(self, value: object) -> bool:
|
|
value = str(value).upper()
|
|
return super().__eq__(value)
|
|
|
|
def __hash__(self) -> int:
|
|
return hash(self.value)
|
|
|
|
def __str__(self) -> str:
|
|
return self.value
|
|
|
|
|
|
class Server(StrEnum):
|
|
"""Server types."""
|
|
|
|
SANIC = auto()
|
|
ASGI = auto()
|
|
|
|
|
|
class Mode(StrEnum):
|
|
"""Server modes."""
|
|
|
|
PRODUCTION = auto()
|
|
DEBUG = auto()
|
|
|
|
|
|
class ServerStage(IntEnum):
|
|
"""Server stages."""
|
|
|
|
STOPPED = auto()
|
|
PARTIAL = auto()
|
|
SERVING = auto()
|