hermes-agent/hermes_cli
teknium1 e80786cc94 feat: add ACP (Agent Client Protocol) server for editor integration
Adds full ACP support enabling hermes-agent to work as a coding agent
inside VS Code (via vscode-acp extension), Zed, JetBrains IDEs, and
any ACP-compatible editor.

## New module: acp_adapter/

- server.py: HermesACPAgent implementing all 15 Agent protocol methods
  (initialize, authenticate, new/load/list/fork/resume session, prompt,
  cancel, set mode/model/config, on_connect)
- session.py: Thread-safe SessionManager with per-session AIAgent lifecycle
- events.py: Callback factories translating hermes callbacks to ACP
  session_update notifications (tool_call, agent_thought, agent_message)
- tools.py: Tool kind mapping (20+ tools → read/edit/execute/search/fetch/think)
  and content builders (diffs for file edits, terminal output, text previews)
- permissions.py: Bridges hermes approval_callback to ACP requestPermission
  RPC for dangerous command approval dialogs in the editor
- auth.py: Provider credential verification
- entry.py: CLI entry point with .env loading and stderr logging

## Integration points

- run_agent.py: ACP tool bridge hook in _execute_tool_calls() for
  delegating file/terminal operations to the editor
- hermes_cli/main.py: 'hermes acp' subcommand
- pyproject.toml: [acp] optional dependency, hermes-acp entry point,
  included in [all] extras (auto-installed via install.sh)

## Supporting files

- acp_registry/agent.json: ACP Registry manifest
- acp_registry/icon.svg: Hermes caduceus icon
- docs/acp-setup.md: User-facing setup guide for VS Code, Zed, JetBrains

## Tests

- 41 new tests across 5 test files covering tools, sessions, permissions,
  server lifecycle, and auth
- Full test suite: 2901 passed, 0 failures

## User flow

1. hermes is already installed (install.sh)
2. Install 'ACP Client' extension in VS Code
3. Configure: command='hermes', args=['acp']
4. Chat with Hermes in the editor — diffs, terminals, approval
   dialogs, thinking blocks all rendered natively
2026-03-10 08:41:11 -07:00
..
__init__.py Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
auth.py feat: add Nous Portal API key provider (#644) 2026-03-10 06:28:00 -07:00
banner.py feat: add data-driven skin/theme engine for CLI customization 2026-03-10 00:37:28 -07:00
callbacks.py refactor: reorganize agent and CLI structure for improved clarity 2026-02-21 23:17:18 -08:00
clipboard.py fix: resolve merge conflict with main in clipboard.py 2026-03-09 03:50:29 +03:00
codex_models.py Merge PR #446: fix(cli): use correct visibility filter string in codex API model fetch 2026-03-09 17:42:39 -07:00
colors.py Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py feat: add data-driven skin/theme engine for CLI customization 2026-03-10 00:37:28 -07:00
config.py fix(config): atomic write for config.yaml to prevent data loss on crash 2026-03-10 06:48:37 -07:00
cron.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
doctor.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
gateway.py fix: Slack gateway setup missing event subscriptions and scopes 2026-03-09 14:31:19 -07:00
main.py feat: add ACP (Agent Client Protocol) server for editor integration 2026-03-10 08:41:11 -07:00
models.py fix: custom endpoint provider shows as openrouter in gateway 2026-03-09 02:38:34 -07:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
runtime_provider.py feat: add z.ai/GLM, Kimi/Moonshot, MiniMax as first-class providers 2026-03-06 18:55:18 -08:00
setup.py feat: add Nous Portal API key provider (#644) 2026-03-10 06:28:00 -07:00
skills_hub.py fix: Initialize Skills Hub on list 2026-03-09 01:43:59 +08:00
skin_engine.py fix: add themed hero art for all skins, fix triple-quote syntax 2026-03-10 03:54:12 -07:00
status.py Merge PR #458: Add explicit UTF-8 encoding to config/data file I/O 2026-03-09 21:19:20 -07:00
tools_config.py fix: setup wizard overwrites platform_toolsets saved by tools_command 2026-03-08 23:39:00 -07:00
uninstall.py Cleanup time! 2026-02-20 23:23:32 -08:00