"""Skin + config-change watcher: on-disk signatures for skin/pet/cron/sessions/platforms/ pairing/bot-relay state and the broadcast loop that pushes *.changed events. Bodies are rebound onto server.py's globals at install time (method_ctx.bind_module).""" from __future__ import annotations from .method_ctx import HandlerRegistry, bind_module _registry = HandlerRegistry() def resolve_skin() -> dict: try: from hermes_cli.skin_engine import init_skin_from_config, get_active_skin init_skin_from_config(_load_cfg()) skin = get_active_skin() # light/dark are paired palettes: the TUI prefers the block matching terminal polarity. return { "name": skin.name, "colors": skin.colors, "light_colors": skin.light_colors, "dark_colors": skin.dark_colors, "branding": skin.branding, "banner_logo": skin.banner_logo, "banner_hero": skin.banner_hero, "tool_prefix": skin.tool_prefix, "help_header": (skin.branding or {}).get("help_header", ""), # Raw user CSS for the desktop GUI's