#ifndef CST_HERMIT_GLYPH_H #define CST_HERMIT_GLYPH_H #include #include #ifdef __cplusplus extern "C" { #endif /* Product display name (user-visible). Binary install name is "hermit". */ #define HERMIT_NAME "Hermit" #define HERMIT_BIN "hermit" #define HERMIT_LEGACY_BIN "cst-agent" #define HERMIT_CONFIG_DIR "hermit" #define HERMIT_LEGACY_CONFIG_DIR "cst-agent" /* Icon states mirror icons/agent-motion SVG set. */ typedef enum { HERMIT_ST_IDLE = 0, HERMIT_ST_QUESTION, HERMIT_ST_THINKING, HERMIT_ST_CODING, HERMIT_ST_SUCCESS, HERMIT_ST_ERROR, HERMIT_ST_N } hermit_state_t; typedef enum { HERMIT_ICON_AUTO = 0, HERMIT_ICON_MINI, HERMIT_ICON_FONT } hermit_icon_mode_t; /* HERMIT_ then CST_. Never returns NULL (may be ""). */ const char *hermit_getenv(const char *suffix); hermit_icon_mode_t hermit_icon_mode(void); /* Effective mode after AUTO resolution (ascii forces MINI). */ hermit_icon_mode_t hermit_icon_mode_eff(int ascii); /* Small badge UTF-8 (or ASCII). frame advances animation. */ const char *hermit_mini_badge(hermit_state_t st, int frame, int ascii); /* Home shell crab: up to *nlines strings (not owned). Returns line count. */ int hermit_shell_art(hermit_state_t st, int with_shell, int ascii, const char **lines, int max_lines); /* Same as hermit_shell_art, but advances HTML-kit animation by frame. */ int hermit_shell_art_frame(hermit_state_t st, int with_shell, int ascii, int frame, const char **lines, int max_lines); int hermit_shell_art_width(void); int hermit_shell_art_height(void); /* Color roles for art cells: 0=body 1=shell 2=eye 3=leg 4=prompt 5=mark */ int hermit_shell_cell_role(hermit_state_t st, int with_shell, int row, int col); /* PUA base U+E700; layout: shell*HERMIT_ST_N*HERMIT_FONT_FRAMES + st*FRAMES + frame */ #define HERMIT_FONT_PUA_BASE 0xE700 #define HERMIT_FONT_FRAMES 8 wchar_t hermit_font_codepoint(hermit_state_t st, int frame, int with_shell); /* Non-empty path when hermit-icons.ttf is installed (may be ""). */ const char *hermit_font_path(void); /* Map agent UI signals → icon state. */ hermit_state_t hermit_state_from_ui(int busy, int ask, int error); #ifdef __cplusplus } #endif #endif