refactor: reorganize agent and CLI structure for improved clarity

- Extracted agent internals into a dedicated `agent/` directory, including model metadata, context compression, and prompt handling.
- Enhanced CLI structure by separating banner, commands, and callbacks into distinct modules within `hermes_cli/`.
- Updated README to reflect the new directory organization and clarify the purpose of each component.
- Improved tool registration and terminal execution backends for better maintainability and usability.
This commit is contained in:
teknium1
2026-02-21 23:17:18 -08:00
parent 51b95236f9
commit b1f55e3ee5
6 changed files with 473 additions and 18 deletions

View File

@@ -1374,9 +1374,12 @@ All variables go in `~/.hermes/.env`. Run `hermes config set VAR value` to set t
| `~/.hermes/cron/` | Scheduled jobs data |
| `~/.hermes/sessions/` | Gateway session data |
| `~/.hermes/hermes-agent/` | Installation directory |
| `hermes_cli/` | CLI implementation |
| `hermes_cli/auth.py` | Multi-provider auth system |
| `tools/` | Tool implementations |
| `agent/` | Agent internals (context compressor, prompt builder, display, etc.) |
| `hermes_cli/` | CLI implementation (banner, commands, callbacks, config, auth) |
| `tools/` | Tool implementations + central registry (`tools/registry.py`) |
| `tools/environments/` | Terminal execution backends (local, docker, ssh, singularity, modal) |
| `tools/approval.py` | Dangerous command detection + per-session approval state |
| `model_tools.py` | Tool orchestration (thin layer over `tools/registry.py`) |
| `skills/` | Bundled skill sources (copied to `~/.hermes/skills/` on install) |
| `~/.hermes/skills/` | All active skills (bundled + hub-installed + agent-created) |
| `gateway/` | Messaging platform adapters |