release: Hermit 1.0.0 — home layout, icon font, install
Compact the home parliament chip, animate crab states like the HTML kit, ship hermit-icons.ttf (sbix) + frames, and install the font from make/ bootstrap/package paths. Co-authored-by: Cursor <cursoragent@cursor.com>
@@ -428,9 +428,22 @@ endif()
|
||||
|
||||
if(WIN32)
|
||||
install(TARGETS cst-agent RUNTIME DESTINATION .)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/res/hermit-icons.ttf")
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/res/hermit-icons.ttf" DESTINATION .)
|
||||
endif()
|
||||
else()
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS cst-agent RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/res/hermit-icons.ttf")
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/res/hermit-icons.ttf"
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/hermit)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/res/hermit-icons.ttf"
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/fonts/hermit)
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/res/hermit-frames")
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/res/hermit-frames/"
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/hermit/frames)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER}")
|
||||
|
||||
@@ -47,7 +47,7 @@ git clone https://git.whcself.xyz/WHC/CST-agent.git # 兼容;请改 origin
|
||||
| Release `cst-agent-VERSION-linux-*.tar.gz` | `hermit-VERSION-linux-*.tar.gz`(过渡期可能双发) |
|
||||
|
||||
```bash
|
||||
hermit --version # hermit 0.10.x
|
||||
hermit --version # hermit 1.0.0
|
||||
cst-agent --version # 同二进制(软链)
|
||||
```
|
||||
|
||||
|
||||
@@ -219,8 +219,8 @@ help:
|
||||
@echo " all / hermit incremental build (ccache auto if installed)"
|
||||
@echo " check build + run unit tests"
|
||||
@echo " asan AddressSanitizer rebuild + check"
|
||||
@echo " hermit-font optional SVG→color font (needs rsvg + fonttools)"
|
||||
@echo " install PREFIX=$(PREFIX); hermit + cst-agent symlink"
|
||||
@echo " hermit-font bake PNG frames + hermit-icons.ttf (Pillow+fonttools)"
|
||||
@echo " install PREFIX=$(PREFIX); hermit + font + cst-agent symlink"
|
||||
@echo " install-service systemd --user parliament unit"
|
||||
@echo "Env: USE_CCACHE=0|1|auto STATIC=1 CST_WEBUI=0 CC=tcc"
|
||||
@echo " HERMIT_ICONS=auto|mini|font HERMIT_*/CST_* env"
|
||||
@@ -250,7 +250,7 @@ hermit: $(OBJ) sashidown-lib
|
||||
|
||||
hermit-font:
|
||||
@python3 scripts/build_hermit_font.py || \
|
||||
echo "hermit-font: skipped (install rsvg-convert + fonttools to build)"
|
||||
echo "hermit-font: skipped (need Pillow+fonttools; try: nix-shell -p python3Packages.pillow python3Packages.fonttools)"
|
||||
|
||||
# Built-in model data as a C byte list (included by model_registry.c).
|
||||
.gen/models_builtin.inc: src/models_builtin.json
|
||||
@@ -328,9 +328,24 @@ install: hermit
|
||||
install -m 0755 hermit "$(DESTDIR)$(PREFIX)/bin/hermit"
|
||||
ln -sfr "$(DESTDIR)$(PREFIX)/bin/hermit" "$(DESTDIR)$(PREFIX)/bin/cst-agent" 2>/dev/null || \
|
||||
ln -sf hermit "$(DESTDIR)$(PREFIX)/bin/cst-agent"
|
||||
@if [ ! -f res/hermit-icons.ttf ]; then $(MAKE) hermit-font || true; fi
|
||||
@if [ -f res/hermit-icons.ttf ]; then \
|
||||
install -d "$(DESTDIR)$(PREFIX)/share/hermit"; \
|
||||
install -m 0644 res/hermit-icons.ttf "$(DESTDIR)$(PREFIX)/share/hermit/"; \
|
||||
install -d "$(DESTDIR)$(PREFIX)/share/fonts/hermit"; \
|
||||
install -m 0644 res/hermit-icons.ttf "$(DESTDIR)$(PREFIX)/share/hermit/hermit-icons.ttf"; \
|
||||
install -m 0644 res/hermit-icons.ttf "$(DESTDIR)$(PREFIX)/share/fonts/hermit/hermit-icons.ttf"; \
|
||||
if [ -n "$(HOME)" ] && [ "$(DESTDIR)" = "" ]; then \
|
||||
install -d "$(HOME)/.local/share/fonts"; \
|
||||
install -m 0644 res/hermit-icons.ttf "$(HOME)/.local/share/fonts/hermit-icons.ttf"; \
|
||||
command -v fc-cache >/dev/null 2>&1 && fc-cache -f "$(HOME)/.local/share/fonts" >/dev/null 2>&1 || true; \
|
||||
fi; \
|
||||
echo "installed Hermit Icons → $(PREFIX)/share/fonts/hermit/hermit-icons.ttf"; \
|
||||
else \
|
||||
echo "warning: res/hermit-icons.ttf missing (run: make hermit-font)" >&2; \
|
||||
fi
|
||||
@if [ -d res/hermit-frames ]; then \
|
||||
install -d "$(DESTDIR)$(PREFIX)/share/hermit/frames"; \
|
||||
cp -a res/hermit-frames/. "$(DESTDIR)$(PREFIX)/share/hermit/frames/"; \
|
||||
fi
|
||||
|
||||
# Optional systemd --user unit for the parliament seat service.
|
||||
@@ -346,6 +361,10 @@ install-service: install
|
||||
|
||||
uninstall:
|
||||
rm -f "$(DESTDIR)$(PREFIX)/bin/hermit" "$(DESTDIR)$(PREFIX)/bin/cst-agent"
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/hermit/hermit-icons.ttf"
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/fonts/hermit/hermit-icons.ttf"
|
||||
rm -rf "$(DESTDIR)$(PREFIX)/share/hermit/frames"
|
||||
rm -f "$(HOME)/.local/share/fonts/hermit-icons.ttf"
|
||||
rm -f "$(HOME)/.config/systemd/user/cst-agent-parliament.service"
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
||||
@@ -30,7 +30,7 @@ curl -fsSL https://git.whcself.xyz/WHC/Hermit/raw/branch/main/scripts/bootstrap_
|
||||
|
||||
```bash
|
||||
./scripts/bootstrap_linux.sh .
|
||||
hermit --version # hermit 0.10.x
|
||||
hermit --version # hermit 1.0.0
|
||||
cst-agent-update # 升级助手仍可用
|
||||
./scripts/migrate_remote_to_hermit.sh # 已有 CST-agent 检出时改 origin
|
||||
```
|
||||
@@ -54,11 +54,11 @@ cd ~/my-project && hermit
|
||||
```bash
|
||||
make -j$(nproc) # 产出 hermit(并链 cst-agent)
|
||||
make -j$(nproc) check
|
||||
make hermit-font # 可选:SVG→PUA 字体(需 rsvg/fonttools)
|
||||
make install PREFIX=$HOME/.local
|
||||
make hermit-font # 烘焙 PNG 帧 + hermit-icons.ttf(Pillow + fonttools)
|
||||
make install PREFIX=$HOME/.local # 同时安装字体到 share/fonts/hermit 与 ~/.local/share/fonts
|
||||
```
|
||||
|
||||
TUI 图标:`HERMIT_ICONS=auto|mini|font`(默认极简字符帧;`font` 需安装 `share/hermit/hermit-icons.ttf`)。
|
||||
TUI 图标:`HERMIT_ICONS=auto|mini|font`(默认色块动画帧,状态与 `icons/agent-motion` HTML 套件一致;`font` 输出 PUA `U+E700+`,需终端加载已安装的 Hermit Icons)。
|
||||
|
||||
---
|
||||
|
||||
@@ -89,4 +89,4 @@ scripts/prompt_smoke.sh
|
||||
scripts/e2e_webui.sh
|
||||
```
|
||||
|
||||
`icons/agent-motion/` 为 SVG 资产;TUI 默认用字体序列极简轨,`make hermit-font` 生成 PUA 字体轨。
|
||||
`icons/agent-motion/` 为 SVG 资产;`make hermit-font` 生成 `res/hermit-icons.ttf`(sbix 彩色位图,96 帧)与 `res/hermit-frames/`。安装脚本会把字体装进系统字体目录。
|
||||
|
||||
@@ -18,6 +18,6 @@ icons/{状态}-shell.svg 是大的带壳图标;icons/{状态}.svg 是小的无
|
||||
|
||||
普通字符终端不直接渲染 SVG;图标适用于支持图形的终端界面、Webview 或 CLI 伴随应用。
|
||||
|
||||
**TUI 双轨**:默认极简字符/色块帧见 `src/hermit_glyph.c`;`make hermit-font`(`scripts/build_hermit_font.py`)把本目录 SVG 批量打成 `res/hermit-icons.ttf`(PUA `U+E700+`),`HERMIT_ICONS=font` 时直接输出码点序列。
|
||||
**TUI 双轨**:默认极简字符/色块帧见 `src/hermit_glyph.c`(idle 眨眼、coding `>_`、ask/thinking/success/error,与本目录 HTML 动画状态一致);`make hermit-font`(Pillow + fonttools,无需 rsvg)烘焙 `res/hermit-frames/` 与 `res/hermit-icons.ttf`(sbix,PUA `U+E700+`)。`make install` / bootstrap 会安装该字体;`HERMIT_ICONS=font` 时输出码点序列(终端需选用 Hermit Icons)。
|
||||
|
||||
更新:橘杏色身体、莓紫眼睛、低饱和蓝绿终端壳。预览主角色以 620ms 缓入缓出插值连续改变眼睛路径与身体姿态,支持中途切换;不重建主角色。状态符号淡入淡出。独立 SVG 保留各状态循环动效;跨状态变形逻辑位于 index.html。
|
||||
|
||||
@@ -45,8 +45,13 @@ 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(crab) 1=shell 2=eye 3=leg 4=prompt 5=mark */
|
||||
/* 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 */
|
||||
@@ -54,6 +59,9 @@ int hermit_shell_cell_role(hermit_state_t st, int with_shell, int row, int col);
|
||||
#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);
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef CST_VERSION_H
|
||||
#define CST_VERSION_H
|
||||
|
||||
#define CST_VERSION_MAJOR 0
|
||||
#define CST_VERSION_MINOR 10
|
||||
#define CST_VERSION_PATCH 1
|
||||
#define CST_VERSION_MAJOR 1
|
||||
#define CST_VERSION_MINOR 0
|
||||
#define CST_VERSION_PATCH 0
|
||||
|
||||
#define CST_VERSION_STR_(x) #x
|
||||
#define CST_VERSION_STR(x) CST_VERSION_STR_(x)
|
||||
|
||||
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 238 B |
|
After Width: | Height: | Size: 238 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 439 B |
|
After Width: | Height: | Size: 439 B |
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 439 B |
|
After Width: | Height: | Size: 439 B |
|
After Width: | Height: | Size: 441 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 441 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 466 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 410 B |
|
After Width: | Height: | Size: 404 B |
|
After Width: | Height: | Size: 404 B |
|
After Width: | Height: | Size: 410 B |
|
After Width: | Height: | Size: 386 B |
|
After Width: | Height: | Size: 410 B |
|
After Width: | Height: | Size: 486 B |
|
After Width: | Height: | Size: 486 B |
|
After Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 480 B |
|
After Width: | Height: | Size: 467 B |
|
After Width: | Height: | Size: 483 B |
|
After Width: | Height: | Size: 433 B |
|
After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 433 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 431 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 453 B |
|
After Width: | Height: | Size: 453 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 454 B |
|
After Width: | Height: | Size: 453 B |