
    `gjŮ                        U d Z ddlZddlmZmZ ddlmZ ddlmZm	Z	m
Z
mZmZ ddlmZ  ej                  e      Ze G d d             Zd	d
i ddddddddddddddddddddddddd dd!d"d#dd$d%i d&d'd(d)d*d+d,d-d.d/d0i dd1dd2dd3dd4dd5dd3dd2dddddddd5dd1d d2d!d6d7d5d8d2d9d:d;d2d3d<d2d:d=g d>g d?g d@dAdBgdCdDgdEdFgdGdHggdIdJdKdLdMdNdOd,dPdQdRdSdTdUi ddVddWddXddYddZddXdd[dd[dd\dd]ddZddYd dXd!d^d7d_d8d`d9dadbdcddded[dVd=i d&d'd(d)d*dfd,d-d.dgdhi ddiddjddkddlddZddjddkddmddnddoddZddid djd!dpd7d_d8dqd9drdmdsdndtdjdld=i d&d'd(d)d*d+d,d-d.dudvi ddwddxddyddzdd{ddwdd|dd}dd~dddd{ddd dwd#dyd$dd!ddddddddi d&d'd(d)d*dfd,dd.ddi ddddddddddddddddddddddddd dd#dd$dd!ddddddddi d&d'd(d)d*d+d,d-d.ddi ddddddddddddddddddddddddd dd!dd7dd8dd9dddddddd=g dg dg dddgddgddgddggdIddddddd,ddddSddi ddddddddddddddddddddddddd dd!dd7dd8dd9dddddddd=g d¢g dâg dĢddgddgddgddggdIddddddd,ddddSddi ddՓdd֓ddדddؓddٓddדdd֓ddddddddٓddՓd dדd!dړd7dٓd8d֓d9dۓdddd<ddddddddg dg dg dddgdCdDgddgddggdIddddddd,ddddSd	Ze	ee	eef   f   ed<   daee   ed<   d	aeed<   defdZdedee	eef      fdZdededede	eef   fdZde	eef   defdZde
e	eef      fd ZdedefdZdefdZdedefdZdefdZ de!ddfdZ"ddedefd	Z#ddedefd
Z$ddedefdZ%de	eef   fdZ&y(  u  Hermes CLI skin/theme engine.

A data-driven skin system that lets users customize the CLI's visual appearance.
Skins are defined as YAML files in ~/.hermes/skins/ or as built-in presets.
No code changes are needed to add a new skin.

SKIN YAML SCHEMA
================

All fields are optional. Missing values inherit from the ``default`` skin.

.. code-block:: yaml

    # Required: skin identity
    name: mytheme                         # Unique skin name (lowercase, hyphens ok)
    description: Short description        # Shown in /skin listing

    # Colors: hex values for Rich markup (banner, UI, response box)
    colors:
      banner_border: "#CD7F32"            # Panel border color
      banner_title: "#FFD700"             # Panel title text color
      banner_accent: "#FFBF00"            # Section headers (Available Tools, etc.)
      banner_dim: "#B8860B"               # Dim/muted text (separators, labels)
      banner_text: "#FFF8DC"              # Body text (tool names, skill names)
      ui_accent: "#FFBF00"               # General UI accent
      ui_label: "#DAA520"                # UI labels (warm gold; teal clashed w/ default banner gold)
      ui_ok: "#4caf50"                   # Success indicators
      ui_error: "#ef5350"                # Error indicators
      ui_warn: "#ffa726"                 # Warning indicators
      prompt: "#FFF8DC"                  # Prompt text color
      input_rule: "#CD7F32"              # Input area horizontal rule
      response_border: "#FFD700"         # Response box border (ANSI)
      status_bar_bg: "#1a1a2e"           # Status bar background
      status_bar_text: "#C0C0C0"         # Status bar default text
      status_bar_strong: "#FFD700"       # Status bar highlighted text
      status_bar_dim: "#8B8682"          # Status bar separators/muted text
      status_bar_good: "#8FBC8F"         # Healthy context usage
      status_bar_warn: "#FFD700"         # Warning context usage
      status_bar_bad: "#FF8C00"          # High context usage
      status_bar_critical: "#FF6B6B"     # Critical context usage
      session_label: "#DAA520"           # Session label color
      session_border: "#8B8682"          # Session ID dim color
      status_bar_bg: "#1a1a2e"          # TUI status/usage bar background
      voice_status_bg: "#1a1a2e"        # TUI voice status background
      selection_bg: "#333355"           # TUI mouse-selection highlight background
      completion_menu_bg: "#1a1a2e"      # Completion menu background
      completion_menu_current_bg: "#333355"  # Active completion row background
      completion_menu_meta_bg: "#1a1a2e"     # Completion meta column background
      completion_menu_meta_current_bg: "#333355"  # Active completion meta background

    # Spinner: customize the animated spinner during API calls
    spinner:
      waiting_faces:                      # Faces shown while waiting for API
        - "(⚔)"
        - "(⛨)"
      thinking_faces:                     # Faces shown during reasoning
        - "(⌁)"
        - "(<>)"
      thinking_verbs:                     # Verbs for spinner messages
        - "forging"
        - "plotting"
      wings:                              # Optional left/right spinner decorations
        - ["⟪⚔", "⚔⟫"]                  # Each entry is [left, right] pair
        - ["⟪▲", "▲⟫"]

    # Branding: text strings used throughout the CLI
    branding:
      agent_name: "Hermes Agent"          # Banner title, status display
      welcome: "Welcome message"          # Shown at CLI startup
      goodbye: "Goodbye! ⚕"              # Shown on exit
      response_label: " ⚕ Hermes "       # Response box header label
      prompt_symbol: "❯"                 # Input prompt symbol (bare token; renderers add trailing space)
      help_header: "(^_^)? Commands"      # /help header text

    # Tool prefix: character for tool output lines (default: ┊)
    tool_prefix: "┊"

    # Tool emojis: override the default emoji for any tool (used in spinners & progress)
    tool_emojis:
      terminal: "⚔"           # Override terminal tool emoji
      web_search: "🔮"        # Override web_search tool emoji
      # Any tool not listed here uses its registry default

USAGE
=====

.. code-block:: python

    from hermes_cli.skin_engine import get_active_skin, list_skins, set_active_skin

    skin = get_active_skin()
    print(skin.colors["banner_title"])    # "#FFD700"
    print(skin.get_branding("agent_name"))  # "Hermes Agent"

    set_active_skin("ares")               # Switch to built-in ares skin
    set_active_skin("mytheme")            # Switch to user skin from ~/.hermes/skins/

BUILT-IN SKINS
==============

- ``default`` — Classic Hermes gold/kawaii (the current look)
- ``ares``    — Crimson/bronze war-god theme with custom spinner wings
- ``mono``    — Clean grayscale monochrome
- ``slate``   — Cool blue developer-focused theme
- ``daylight`` — Light background theme with dark text and blue accents
- ``warm-lightmode`` — Warm brown/gold text for light terminal backgrounds

USER SKINS
==========

Drop a YAML file in ``~/.hermes/skins/<name>.yaml`` following the schema above.
Activate with ``/skin <name>`` in the CLI or ``display.skin: <name>`` in config.yaml.
    N)	dataclassfield)Path)AnyDictListOptionalTupleget_hermes_homec                   4   e Zd ZU dZeed<   dZeed<    ee      Z	e
eef   ed<    ee      Ze
eef   ed<    ee      Ze
eef   ed<   d	Zeed
<    ee      Ze
eef   ed<   dZeed<   dZeed<   ddededefdZdeeeef      fdZddededefdZy)
SkinConfigzComplete skin configuration.name description)default_factorycolorsspinnerbranding   ┊tool_prefixtool_emojisbanner_logobanner_herokeyfallbackreturnc                 :    | j                   j                  ||      S )z Get a color value with fallback.)r   getselfr   r   s      I/root/.hermes/venv/lib/python3.12/site-packages/hermes_cli/skin_engine.py	get_colorzSkinConfig.get_color   s    {{sH--    c                     | j                   j                  dg       }g }|D ]S  }t        |t        t        f      st        |      dk(  s)|j                  t        |d         t        |d         f       U |S )z.Get spinner wing pairs, or empty list if none.wings   r      )r   r   
isinstancelisttuplelenappendstr)r!   rawresultpairs       r"   get_spinner_wingszSkinConfig.get_spinner_wings   sl    llw+ 	<D$u.3t9>s47|Sa\:;	< r$   c                 :    | j                   j                  ||      S )z#Get a branding value with fallback.)r   r   r    s      r"   get_brandingzSkinConfig.get_branding   s    }}  h//r$   N)r   )__name__
__module____qualname____doc__r.   __annotations__r   r   dictr   r   r   r   r   r   r   r   r   r#   r   r
   r2   r4    r$   r"   r   r      s    &
IK"48FDcN8#D9GT#s(^9$T:Hd38n:K"'"=Kc3h=KK.S .C . .4c3h#8 0 0s 0C 0r$   r   defaultu"   Classic Hermes — gold and kawaiibanner_border#CD7F32banner_title#FFD700banner_accentz#FFBF00
banner_dimz#B8860Bbanner_text#FFF8DC	ui_accentui_labelz#DAA520ui_okz#4caf50ui_errorz#ef5350ui_warnz#ffa726prompt
input_ruleresponse_borderstatus_bar_bg#1a1a2esession_labelsession_borderz#8B8682zHermes AgentzAWelcome to Hermes Agent! Type your message or /help for commands.   Goodbye! ⚕u    ⚕ Hermes    ❯(^_^)? Available Commands)
agent_namewelcomegoodbyeresponse_labelprompt_symbolhelp_headerr   )r   r   r   r   r   r   aresu$   War-god theme — crimson and bronzez#9F1C1Cz#C7A96Bz#DD4A3Az#6B1717z#F1E6CFz#2A1212status_bar_textstatus_bar_strongstatus_bar_dimz#6E584Bz#7BC96Fz#EF5350)status_bar_goodstatus_bar_warnstatus_bar_badstatus_bar_criticalrO   rP   )   (⚔)   (⛨)   (▲)(<>)z(/))rb   rc   rd      (⌁)re   )forgingmarchingzsizing the fieldzholding the linezhammering plansztempering steelzplotting impactzraising the shieldu   ⟪⚔u   ⚔⟫u   ⟪▲u   ▲⟫u   ⟪╸u   ╺⟫u   ⟪⛨u   ⛨⟫)waiting_facesthinking_facesthinking_verbsr&   z
Ares Agentz?Welcome to Ares Agent! Type your message or /help for commands.u   Farewell, warrior! ⚔u
    ⚔ Ares u   ⚔u   (⚔) Available Commandsu   ╎uW  [bold #A3261F] █████╗ ██████╗ ███████╗███████╗       █████╗  ██████╗ ███████╗███╗   ██╗████████╗[/]
[bold #B73122]██╔══██╗██╔══██╗██╔════╝██╔════╝      ██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝[/]
[#C93C24]███████║██████╔╝█████╗  ███████╗█████╗███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║[/]
[#D84A28]██╔══██║██╔══██╗██╔══╝  ╚════██║╚════╝██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║[/]
[#E15A2D]██║  ██║██║  ██║███████╗███████║      ██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║[/]
[#EB6C32]╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝╚══════╝      ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝[/]u  [#9F1C1C]⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#9F1C1C]⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⠟⠻⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#C7A96B]⠀⠀⠀⠀⠀⠀⠀⣠⣾⡿⠋⠀⠀⠀⠙⢿⣷⣄⠀⠀⠀⠀⠀⠀⠀[/]
[#C7A96B]⠀⠀⠀⠀⠀⢀⣾⡿⠋⠀⠀⢠⡄⠀⠀⠙⢿⣷⡀⠀⠀⠀⠀⠀[/]
[#DD4A3A]⠀⠀⠀⠀⣰⣿⠟⠀⠀⠀⣰⣿⣿⣆⠀⠀⠀⠻⣿⣆⠀⠀⠀⠀[/]
[#DD4A3A]⠀⠀⠀⢰⣿⠏⠀⠀⢀⣾⡿⠉⢿⣷⡀⠀⠀⠹⣿⡆⠀⠀⠀[/]
[#9F1C1C]⠀⠀⠀⣿⡟⠀⠀⣠⣿⠟⠀⠀⠀⠻⣿⣄⠀⠀⢻⣿⠀⠀⠀[/]
[#9F1C1C]⠀⠀⠀⣿⡇⠀⠀⠙⠋⠀⠀⚔⠀⠀⠙⠋⠀⠀⢸⣿⠀⠀⠀[/]
[#6B1717]⠀⠀⠀⢿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⡿⠀⠀⠀[/]
[#6B1717]⠀⠀⠀⠘⢿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⡿⠃⠀⠀⠀[/]
[#C7A96B]⠀⠀⠀⠀⠈⠻⣿⣷⣦⣤⣀⣀⣤⣤⣶⣿⠿⠋⠀⠀⠀⠀[/]
[#C7A96B]⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⠿⠿⠿⠛⠉⠀⠀⠀⠀⠀⠀⠀[/]
[#DD4A3A]⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⚔⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[dim #6B1717]⠀⠀⠀⠀⠀⠀⠀⠀war god online⠀⠀⠀⠀⠀⠀⠀⠀[/])r   r   r   r   r   r   r   r   monou   Monochrome — clean grayscale#555555z#e6edf3z#aaaaaaz#444444z#c9d1d9z#888888z#ccccccz#999999z#1F1F1Fz#C9D1D9z#E6EDF3z#777777z#B5B5B5z#AAAAAAz#D0D0D0z#F0F0F0z[?] Available Commandsslateu   Cool blue — developer-focusedz#4169e1z#7eb8f6z#8EA8FFz#4b5563z#63D0A6z#F7A072z#e6a855z#151C2Fz#7EB8F6z#4B5563z#E6A855z#FF7A7AdaylightzELight theme for bright terminals with dark text and cool blue accentsz#2563EBz#0F172Az#1D4ED8z#475569z#111827z#0F766Ez#15803Dz#B91C1Cz#B45309z#93C5FDz#64748Bz#E5EDF8voice_status_bgz#F8FAFCz#DBEAFEz#EEF2FFz#BFDBFE)completion_menu_bgcompletion_menu_current_bgcompletion_menu_meta_bgcompletion_menu_meta_current_bgu   │warm-lightmodeuG   Warm light mode — dark brown/gold text for light terminal backgroundsz#8B6914z#5C3D11z#8B4513z#8B7355z#2C1810z#2E7D32z#C62828z#E65100z#A0845Cz#F5F0E8z#F5EFE0z#E8DCC8z#F0E8D8z#DFCFB0poseidonu)   Ocean-god theme — deep blue and seafoamz#2A6FB9z#A9DFFFz#5DB8F5z#153C73z#EAF7FFz#0F2440z#496884z#6ED7B0z#D94F4F)   (≈)   (Ψ)   (∿)   (◌)u   (◠))rx   ry   rw   rf   rz   )zcharting currentszsounding the depthzreading foam lineszsteering the tridentztracking undertowzplotting sea laneszcalling the swellzmeasuring pressureu   ⟪≈u   ≈⟫u   ⟪Ψu   Ψ⟫u   ⟪∿u   ∿⟫u   ⟪◌u   ◌⟫zPoseidon AgentzCWelcome to Poseidon Agent! Type your message or /help for commands.u   Fair winds! Ψu    Ψ Poseidon u   Ψu   (Ψ) Available Commandsu=  [bold #B8E8FF]██████╗  ██████╗ ███████╗███████╗██╗██████╗  ██████╗ ███╗   ██╗       █████╗  ██████╗ ███████╗███╗   ██╗████████╗[/]
[bold #97D6FF]██╔══██╗██╔═══██╗██╔════╝██╔════╝██║██╔══██╗██╔═══██╗████╗  ██║      ██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝[/]
[#75C1F6]██████╔╝██║   ██║███████╗█████╗  ██║██║  ██║██║   ██║██╔██╗ ██║█████╗███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║[/]
[#4FA2E0]██╔═══╝ ██║   ██║╚════██║██╔══╝  ██║██║  ██║██║   ██║██║╚██╗██║╚════╝██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║[/]
[#2E7CC7]██║     ╚██████╔╝███████║███████╗██║██████╔╝╚██████╔╝██║ ╚████║      ██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║[/]
[#1B4F95]╚═╝      ╚═════╝ ╚══════╝╚══════╝╚═╝╚═════╝  ╚═════╝ ╚═╝  ╚═══╝      ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝[/]u9  [#2A6FB9]⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#5DB8F5]⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#5DB8F5]⠀⠀⠀⠀⠀⠀⠀⢠⣿⠏⠀Ψ⠀⠹⣿⡄⠀⠀⠀⠀⠀⠀⠀[/]
[#A9DFFF]⠀⠀⠀⠀⠀⠀⠀⣿⡟⠀⠀⠀⠀⠀⢻⣿⠀⠀⠀⠀⠀⠀⠀[/]
[#A9DFFF]⠀⠀⠀≈≈≈≈≈⣿⡇⠀⠀⠀⠀⠀⢸⣿≈≈≈≈≈⠀⠀⠀[/]
[#5DB8F5]⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀[/]
[#2A6FB9]⠀⠀⠀⠀⠀⠀⠀⢿⣧⠀⠀⠀⠀⠀⣼⡿⠀⠀⠀⠀⠀⠀⠀[/]
[#2A6FB9]⠀⠀⠀⠀⠀⠀⠀⠘⢿⣷⣄⣀⣠⣾⡿⠃⠀⠀⠀⠀⠀⠀⠀[/]
[#153C73]⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#153C73]⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#5DB8F5]⠀⠀⠀⠀⠀≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈⠀⠀⠀⠀⠀[/]
[#A9DFFF]⠀⠀⠀⠀⠀⠀≈≈≈≈≈≈≈≈≈≈≈≈≈⠀⠀⠀⠀⠀⠀[/]
[dim #153C73]⠀⠀⠀⠀⠀⠀⠀deep waters hold⠀⠀⠀⠀⠀⠀⠀[/]sisyphusu6   Sisyphean theme — austere grayscale with persistencez#B7B7B7z#F5F5F5z#E7E7E7z#4A4A4Az#D3D3D3z#919191z#656565z#202020)   (◉)rz      (◬)u   (⬤)z(::))r|   r}   rz   u   (○)u   (●))zfinding tractionzmeasuring the gradezresetting the boulderzcounting the ascentztesting leveragezsetting the shoulderzpushing uphillzenduring the loopu   ⟪◉u   ◉⟫u   ⟪◬u   ◬⟫u   ⟪⬤u   ⬤⟫zSisyphus AgentzCWelcome to Sisyphus Agent! Type your message or /help for commands.u   The boulder waits. ◉u    ◉ Sisyphus u   ◉u   (◉) Available Commandsu  [bold #F5F5F5]███████╗██╗███████╗██╗   ██╗██████╗ ██╗  ██╗██╗   ██╗███████╗       █████╗  ██████╗ ███████╗███╗   ██╗████████╗[/]
[bold #E7E7E7]██╔════╝██║██╔════╝╚██╗ ██╔╝██╔══██╗██║  ██║██║   ██║██╔════╝      ██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝[/]
[#D7D7D7]███████╗██║███████╗ ╚████╔╝ ██████╔╝███████║██║   ██║███████╗█████╗███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║[/]
[#BFBFBF]╚════██║██║╚════██║  ╚██╔╝  ██╔═══╝ ██╔══██║██║   ██║╚════██║╚════╝██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║[/]
[#8F8F8F]███████║██║███████║   ██║   ██║     ██║  ██║╚██████╔╝███████║      ██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║[/]
[#626262]╚══════╝╚═╝╚══════╝   ╚═╝   ╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚══════╝      ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝[/]ur  [#B7B7B7]⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#D3D3D3]⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#E7E7E7]⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀[/]
[#F5F5F5]⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀[/]
[#E7E7E7]⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀[/]
[#D3D3D3]⠀⠀⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀[/]
[#B7B7B7]⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⠿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#919191]⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#656565]⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#656565]⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#4A4A4A]⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#4A4A4A]⠀⠀⠀⠀⠀⣀⣴⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀⠀[/]
[#656565]⠀⠀⠀━━━━━━━━━━━━━━━━━━━━━━━⠀⠀⠀[/]
[dim #4A4A4A]⠀⠀⠀⠀⠀⠀⠀⠀⠀the boulder⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]	charizardu)   Volcanic theme — burnt orange and emberz#C75B1Dz#FFD39Az#F29C38z#C58A45z#FFF0D4z#2B160Ez#6C4724z#6BCB77z#E2832Bz#5A260Dz#0B0503z#4A1B07z#120806)r^   r_   r`   ra   rO   rP   selection_bgrq   rr   rs   rt   )   (✦)rd      (◇)re      (🔥))r   rd   r   rf   r   )zbanking into the draftzmeasuring burnzreading the updraftztracking ember fallzsetting wing anglezholding the flame corezplotting a hot landingzcoiling for liftu   ⟪✦u   ✦⟫u   ⟪◇u   ◇⟫zCharizard AgentzDWelcome to Charizard Agent! Type your message or /help for commands.u   Flame out! ✦u    ✦ Charizard u   ✦u   (✦) Available Commandsu  [bold #FFF0D4] ██████╗██╗  ██╗ █████╗ ██████╗ ██╗███████╗ █████╗ ██████╗ ██████╗        █████╗  ██████╗ ███████╗███╗   ██╗████████╗[/]
[bold #FFD39A]██╔════╝██║  ██║██╔══██╗██╔══██╗██║╚══███╔╝██╔══██╗██╔══██╗██╔══██╗      ██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝[/]
[#F29C38]██║     ███████║███████║██████╔╝██║  ███╔╝ ███████║██████╔╝██║  ██║█████╗███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║[/]
[#E2832B]██║     ██╔══██║██╔══██║██╔══██╗██║ ███╔╝  ██╔══██║██╔══██╗██║  ██║╚════╝██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║[/]
[#C75B1D]╚██████╗██║  ██║██║  ██║██║  ██║██║███████╗██║  ██║██║  ██║██████╔╝      ██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║[/]
[#7A3511] ╚═════╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝╚═════╝       ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝[/]u  [#FFD39A]⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⠶⠶⠶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#F29C38]⠀⠀⠀⠀⠀⠀⣴⠟⠁⠀⠀⠀⠀⠈⠻⣦⠀⠀⠀⠀⠀⠀[/]
[#F29C38]⠀⠀⠀⠀⠀⣼⠏⠀⠀⠀✦⠀⠀⠀⠀⠹⣧⠀⠀⠀⠀⠀[/]
[#E2832B]⠀⠀⠀⠀⢰⡟⠀⠀⣀⣤⣤⣤⣀⠀⠀⠀⢻⡆⠀⠀⠀⠀[/]
[#E2832B]⠀⠀⣠⡾⠛⠁⣠⣾⠟⠉⠀⠉⠻⣷⣄⠀⠈⠛⢷⣄⠀⠀[/]
[#C75B1D]⠀⣼⠟⠀⢀⣾⠟⠁⠀⠀⠀⠀⠀⠈⠻⣷⡀⠀⠻⣧⠀[/]
[#C75B1D]⢸⡟⠀⠀⣿⡟⠀⠀⠀🔥⠀⠀⠀⠀⢻⣿⠀⠀⢻⡇[/]
[#7A3511]⠀⠻⣦⡀⠘⢿⣧⡀⠀⠀⠀⠀⠀⢀⣼⡿⠃⢀⣴⠟⠀[/]
[#7A3511]⠀⠀⠈⠻⣦⣀⠙⢿⣷⣤⣤⣤⣾⡿⠋⣀⣴⠟⠁⠀⠀[/]
[#C75B1D]⠀⠀⠀⠀⠈⠙⠛⠶⠤⠭⠭⠤⠶⠛⠋⠁⠀⠀⠀⠀[/]
[#F29C38]⠀⠀⠀⠀⠀⠀⠀⠀⣰⡿⢿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀[/]
[#F29C38]⠀⠀⠀⠀⠀⠀⠀⣼⡟⠀⠀⢻⣧⠀⠀⠀⠀⠀⠀⠀⠀[/]
[dim #7A3511]⠀⠀⠀⠀⠀⠀⠀tail flame lit⠀⠀⠀⠀⠀⠀⠀⠀[/])	r<   rZ   rl   rn   ro   ru   rv   r{   r~   _BUILTIN_SKINS_active_skin_active_skin_namer   c                      t               dz  S )zUser skins directory.skinsr   r;   r$   r"   
_skins_dirr     s    w&&r$   pathc                     	 ddl }t        | dd      5 }|j                  |      }ddd       t        t              rd|v r|S y# 1 sw Y    xY w# t
        $ r!}t        j                  d| |       Y d}~yd}~ww xY w)z(Load a skin definition from a YAML file.r   Nrzutf-8)encodingr   zFailed to load skin from %s: %s)yamlopen	safe_loadr)   r:   	Exceptionloggerdebug)r   r   fdataes        r"   _load_skin_from_yamlr     s    A$g. 	%!>>!$D	%dD!fnK 	% 	%  A6a@@As-   A AA A
A 	A;A66A;valuesection	skin_namec                    t        | t              r| S | i S t        j                  d||t	        |       j
                         i S )zIReturn a mapping value or an empty dict when the section type is invalid.z>Skin '%s' has invalid '%s' section type (%s); ignoring section)r)   r:   r   warningtyper5   )r   r   r   s      r"   _mapping_or_emptyr     sD    %}	
NNHU	 Ir$   r   c                    t         d   }t        | j                  dd            }t        | j                  d      d|      }t        | j                  d      d|      }t        | j                  d      d|      }t        | j                  d      d|      }t	        |j                  di             }|j                  |       t	        |j                  di             }|j                  |       t	        |j                  di             }	|	j                  |       t        || j                  d	d
      |||	| j                  d|j                  dd            || j                  dd
      | j                  dd
      	      S )zBBuild a SkinConfig from a raw dict (built-in or loaded from YAML).r<   r   unknownr   )r   r   r   r   r   r   r   r   r   r   r   )	r   r   r   r   r   r   r   r   r   )r   r.   r   r   r:   updater   )
r   r<   r   color_overridesspinner_overridesbranding_overridesemoji_overridesr   r   r   s
             r"   _build_skin_configr     sI    Y'GDHHVY/0I'(:HXabO)$((9*=y\ef*488J+?_hi'(?bklO'++h+,F
MM/"7;;y"-.GNN$%GKK
B/0HOO&'HH]B/HH]GKKu,MN#HH]B/HH]B/
 
r$   c                     g } t         j                         D ]*  \  }}| j                  ||j                  dd      dd       , t	               }|j                         rt        |j                  d            D ]f  }t        |      }|s|j                  d|j                        t        fd| D              rB| j                  |j                  dd      dd       h | S )	zList all available skins (built-in + user-installed).

    Returns list of {"name": ..., "description": ..., "source": "builtin"|"user"}.
    r   r   builtin)r   r   sourcez*.yamlr   c              3   .   K   | ]  }|d    k(    yw)r   Nr;   ).0sr   s     r"   	<genexpr>zlist_skins.<locals>.<genexpr>  s     >!qyI->s   user)r   itemsr-   r   r   is_dirsortedglobr   stemany)r0   r   r   
skins_pathr   r   s        @r"   
list_skinsr     s    
 F$**, 
d88M26
 	 J
12 	A'*D HHVQVV4	>v>>%#'88M2#>$ 	 Mr$   r   c                     t               }||  dz  }|j                         rt        |      }|rt        |      S | t        v rt        t        |          S t
        j                  d|        t        t        d         S )z<Load a skin by name. Checks user skins first, then built-in.z.yamlz"Skin '%s' not found, using defaultr<   )r   is_filer   r   r   r   r   )r   r   	user_filer   s       r"   	load_skinr     sz     JvU^+I#I.%d++ ~!."677 NN7>nY788r$   c                  8    t         t        t              a t         S )z.Get the currently active skin config (cached).)r   r   r   r;   r$   r"   get_active_skinr     s      !23r$   c                 (    | a t        |       at        S )z3Switch the active skin. Returns the new SkinConfig.)r   r   r   )r   s    r"   set_active_skinr   	  s     T?Lr$   c                      t         S )z*Get the name of the currently active skin.)r   r;   r$   r"   get_active_skin_namer     s    r$   configc                     | j                  d      xs i }t        |t              si }|j                  dd      }t        |t              r*|j	                         rt        |j	                                yt        d       y)z|Initialize the active skin from CLI config at startup.

    Call this once during CLI init with the loaded config dict.
    displayskinr<   N)r   r)   r:   r.   stripr   )r   r   r   s      r"   init_skin_from_configr     s`    
 jj#)rGgt$FI.I)S!ioo&7	)*	"r$   r   c                     	 t               j                  d|       }|xs | j                         }|xs | j                          dS # t        $ r | }Y 8w xY w)a  Return the interactive prompt symbol with a single trailing space.

    Skins store ``prompt_symbol`` as a bare token (no spaces). The trailing
    space is appended here so callers can drop it straight into a rendered
    prompt without hand-rolling whitespace.
    rX    )r   r4   r   r   )r   r/   cleaneds      r"   get_active_prompt_symbolr   *  s`    ,,_hG h%%'G))*!,,  s   A AAc                 Z    	 t               j                  d|       S # t        $ r | cY S w xY w)z*Get the /help header from the active skin.rY   r   r4   r   r   s    r"   get_active_help_headerr   <  s1     --mXFF     **c                 Z    	 t               j                  d|       S # t        $ r | cY S w xY w)z*Get the goodbye line from the active skin.rV   r   r   s    r"   get_active_goodbyer   E  s1     --iBB r   c            	      X   	 t               } | j                  dd      }| j                  dd      }| j                  dd      }| j                  dd      }| j                  d	d
      }| j                  d|      }| j                  dd      }| j                  dd      }| j                  dd      }	| j                  d|      }
| j                  d|      }| j                  d|      }| j                  d| j                  dd            }| j                  d|      }| j                  d| j                  d|            }| j                  d|      }| j                  d|	      }| j                  dd      }| j                  dd      }| j                  d |      }| j                  d!|      }i d"dd#| d$d|d%| d$d&| d$d'd(|	 d)|
 d*d(|	 d)| d+d,d(|	 d)| d-d(|	 d)| d+d.d(|	 d)| d+d/d(|	 d)| d+d0d(|	 d)| d+d1|d2| d+d3d(| d)| d4d(| d)| d5d(| d)| i d6d(| d)| d7d(| d)| d8|d9| d+d:| d+d;|d<| d+d=| d$d>|d?| d+d@|dA| d+dB|dC|dD| d+dE| d+dF| d$|| d+d(| d)| d(| d)| d+dGS # t        $ r i cY S w xY w)HzReturn prompt_toolkit style overrides derived from the active skin.

    These are layered on top of the CLI's base TUI style so /skin can refresh
    the live prompt_toolkit UI immediately without rebuilding the app.
    rJ   r   rK   r>   r?   r@   rC   rD   rB   rm   rF   rI   z#FF8C00rH   z#FF6B6BrM   rN   r[   r\   r]   r^   rG   z#8FBC8Fr_   r`   rA   ra   rp   rq   rr   z#333355rs   rt   z
input-areaplaceholderz italiczprompt-workinghintz
status-barzbg:r   zstatus-bar-strongz boldzstatus-bar-dimzstatus-bar-goodzstatus-bar-warnzstatus-bar-badzstatus-bar-criticalz
input-rulezimage-badgezcompletion-menuzcompletion-menu.completionz"completion-menu.completion.currentzcompletion-menu.meta.completionz'completion-menu.meta.completion.currentzclarify-borderzclarify-titlezclarify-questionzclarify-choicezclarify-selectedzclarify-active-otherzclarify-countdownzsudo-promptzsudo-borderz
sudo-titlez	sudo-textzapproval-borderzapproval-titlezapproval-desczapproval-cmd)zapproval-choicezapproval-selectedzvoice-statuszvoice-status-recording)r   r   r#   )r   rJ   rK   titletextdimlabelwarnerror	status_bgstatus_textstatus_strong
status_dimstatus_goodstatus_warn
status_badstatus_criticalvoice_bgmenu_bgmenu_current_bgmenu_meta_bgmenu_meta_current_bgs                         r"   "get_prompt_toolkit_style_overridesr   N  s|     ^^Hb)Fi8JNN>95E>>-3D
..y
1CNN:u-E>>)Y/DNN:y1E	:I..!2D9KNN#6>M 0#6J..!2DNN7I4VWK..!2D9K 0$..RV2WXJnn%:EBO~~/;Hnn19=Gnn%A9MO>>";WEL>>*K_]+
 	b+ 	#g+ 	&+ 	SE/+ 	3%w+ 	I;a}5+ 	s9+Q}oUC+ 	C	{!J<8+ 	S1[M?+ 	S1[M?+ 	C	{!J<u=+  	YKq0AG!+" 	j#+$ 	%%+& 	S	4&1'+( 	%G9AdV&<)+* 	-O3DAeW.M++, 	*Sau+E-+. 	2S9M8NaPUw3W/+0 	*1+2 	E7%3+4 	tfEN5+6 	#7+8 	ugUO9+: 	5' 1;+< 	Z=+> 	%?+@ 	zA+B 	uoC+D 	TE+F 	:G+H 	TF%.I+J 	D6K+L 	3%wM+N  %we_hZq0$'z5'"?U+ +;  	s   
J J)(J))rR   )rS   )rQ   )'r8   loggingdataclassesr   r   pathlibr   typingr   r   r   r	   r
   hermes_constantsr   	getLoggerr5   r   r   r   r.   r9   r   r   r   r   r   r   r   r   r   r   r   r:   r   r   r   r   r   r;   r$   r"   <module>r      sk  pd  (  3 3 ,			8	$ 0 0 0H ;
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 Y
  i!
$
 )Z%,"6
 A!F =
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 y
   !
" i#
$  )('#,&'/
4 HJ
 8$8$8$8$	
 'X/*"5
 WRsGR 7
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 y
   !
" i#
$  )('#,&'/
2 (Z%,"3
 K&P 8
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 y
   !
" i#
$  )('#,&'/
2 (Z%,"6
 K&P ^
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 i
  Y!
" y#
$ #,*3'0/8+
. (Z%,"3
 G$L !`
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 i
  Y!
" y#
$ #,*3'0/8+
. (Z(/%6
  G$L B
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 y
   !
" i#
$  )('#,&'/
4 JJ 8$'"8$8$	
  +\'-!4
 dNuGR O
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 y
   !
" i#
$  )('#,&'/
4 JK 8$8$8$8$	
  +\/."5
 XUuHT B
Y
I
 Y
 )	

 9
 
 	
 Y
 	
 y
 i
 )
 y
 Y
 y
   !
" i#
$  )('#,&'%"+*3'0/89
> KL 8$8$8$8$	
  ,]'/"5
 pOLia-S$sCx.() aP &*hz" )" 3 "'D '

t 
c3h(@ 
S c c d3PS8n T#s(^ 
 <Dc3h( >9C 9J 9& # * c 
#$ #4 #(-s -s -$S 3  # PDcN Pr$   