Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 4.18 KB

File metadata and controls

49 lines (35 loc) · 4.18 KB

Hermes Console (80s Hermes Interface)

Native Windows desktop client for the local Hermes agent. Clay 0.14 layout, Win32 GDI renderer, 80s green-phosphor CRT cyberpunk aesthetic. One ~260 KB executable, no runtime dependencies.

Purpose

  • Feature-rich desktop console for a locally installed Hermes agent (%LOCALAPPDATA%\hermes\hermes-agent), speaking JSON-RPC over stdio to tui_gateway.entry.
  • Long-term goal: pop-out avatar window with distinct faces/personalities per agent. Current phase: make the main interface feature-rich in the CRT style.

Ownership

  • src/main.c — WinMain, window proc, fonts, input, CRT scanline overlay, F1-F7 key wiring.
  • src/ui.h — the entire interface declared with Clay; reads App state, never mutates it. Includes the floating module panels (AGENTS/SKILLS/MEMORY/CRON/SETTINGS) opened from the sidebar module strip; panel state + mutations live in app.h (app_module_open, app_setting_toggle, ...).
  • src/app.h — App state model + Hermes protocol handling; all gateway frames are applied here.
  • src/gateway.h — child process, pipes, reader thread.
  • src/json.h — dependency-free JSON parser/writer.
  • src/theme.h — green phosphor palette, metrics, font slots.
  • src/avatar.h — avatar pop-out window engine: double-buffered GDI puppet window (F8), expression state machine, blink/lip-flap/pupil animation, cast cycling, name plate.
  • src/avatar_cast.h — the six-character avatar cast: AvatarDef/AvatarPose contract, per-character GDI face renderers.
  • vendor/ — Clay 0.14 + GDI renderer, patched; every deliberate edit is marked [hermes].

Local Contracts

  • Unity build: build.bat compiles src/main.c only (TDM-GCC / MinGW on PATH). Success line is Built HermesConsole.exe.
  • UI layer reads state; only app.h mutates it. Keep that boundary.
  • Interactive elements use Clay_OnHover callbacks registered inside the element block — not pointer-over loops in main.c.
  • Strings handed to Clay text must stay valid through the frame (use the ui_fmt/ui_upper per-frame scratch).
  • Palette is rationed: phosphor green is primary, amber marks active/warning states, red marks failures. Do not reintroduce off-palette colors.
  • Concurrent edits: agents working in parallel must own disjoint files; app.h verifies with gcc -fsyntax-only, only the ui.h/main.c owner runs build.bat.
  • The exe locks while running: taskkill /F /IM HermesConsole.exe before linking.
  • Module-panel state contract (AGENTS/SKILLS/MEMORY/CRON/SETTINGS) lives in app.h: activeModule/moduleLoading/moduleError, the agentList/skillList/memoryList/cronList/uiSettings arrays, and the app_module_open/close, app_agent_set_effort, app_agent_activate, app_skill_toggle, app_cron_toggle, app_memory_open, app_setting_toggle entry points; responses route through the ridMethod rid ring via app_rpc_tracked.
  • Subagent and file explorer state contracts live in app.h: subagents tracks active subagent delegates and assigns speakingAvatar; WorkspaceFile classifies workspace files by extension (kind) with explorerCwd navigation via app_explorer_nav.

Work Guidance

  • 80s cyberpunk CRT vibe: all-caps chrome, section headers with neon ticks, scanlines, box-drawing/geometric UTF-8 glyphs for decoration.

  • Live data over mockups: panels (activity log, task checklist, file tree, context meter) must render real gateway/App state, with mock data only as an empty-state fallback.

  • QoL rules learned: solid (non-blinking) caret to avoid layout jitter; paste must not append the UTF-16 null; Tab inserts 4 spaces via WM_KEYDOWN only.

  • docs/FEATURE_PARITY.md — audited gateway/UI capability matrix and release gates; update state when a contract moves between pending, partial, implemented, and verified.

Verification

  • ./build.bat must end with Built HermesConsole.exe and no NEW warnings in src/ files (vendor warnings are pre-existing).
  • Launch check: run the exe, confirm gateway link (LINK LED), send a prompt, confirm streaming + tool blocks render. Gateway stderr: %TEMP%\hermes-console-gateway.log; frame trace via HERMES_TRACE=1.

Child DOX Index

  • No child AGENTS.md files; this document owns the whole tree.