hermes-agent/hermes_cli
teknium1 cc61f54cd3 feat: add ACP (Agent Client Protocol) server for editor integration
Complete ACP implementation enabling hermes-agent to work as a coding
agent inside VS Code, Zed, JetBrains IDEs, and any ACP-compatible editor.

Based on PR #837 by teknium1, with full implementation of the prompt flow
and fixes for broken event bridging.

## ACP Adapter (acp_adapter/, ~1200 lines)

server.py — HermesACPAgent with all 15 Agent protocol methods:
  - Full session lifecycle (new, load, resume, list, fork, cancel)
  - prompt() runs AIAgent in thread executor, streams tool events,
    thinking, and agent messages back to the editor in real-time
  - Permission bridging for dangerous command approval dialogs
  - Model switching support

session.py — Thread-safe SessionManager with per-session AIAgent,
  conversation history, and model tracking

events.py — Callback factories bridging AIAgent's sync callbacks to
  ACP's async notifications via run_coroutine_threadsafe()

tools.py — Tool kind mapping (25+ tools) with human-readable titles,
  diff content for file edits, and result truncation

permissions.py — Maps ACP permission dialogs to hermes approval flow
auth.py — Provider credential detection
entry.py — CLI entry point with stderr logging

## Key Design Decisions

- No modifications to run_agent.py — ACP works entirely through
  AIAgent's existing callback system (tool_progress_callback,
  thinking_callback, step_callback)
- File edits shown as diffs in the editor (FileEditToolCallContent)
- Terminal commands shown with $ prefix
- Large tool outputs truncated for the UI (5000 char limit)
- Approval for dangerous commands routed to editor permission dialog

## Also includes
- jupyter-live-kernel skill for data science workflows
- acp_registry/ with agent.json for editor auto-discovery
- docs/acp-setup.md with VS Code, Zed, JetBrains setup guides
- hermes acp CLI subcommand

## Tests
- 81 new ACP tests covering server, session, events, tools, auth,
  permissions
- Full suite: 3330 passed, 16 skipped

Closes #837
2026-03-11 09:07:19 -07:00
..
__init__.py Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
auth.py fix: sort Nous Portal model list (opus first, sonnet lower) 2026-03-10 23:20:46 -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: clean up empty file after failed wl-paste clipboard extraction 2026-03-11 02:56:19 -07:00
codex_models.py fix: unify visibility filter in codex model discovery 2026-03-10 15:15:33 +03:00
colors.py Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py feat(cli): add /reasoning command for effort level and display toggle 2026-03-11 06:02:18 -07:00
config.py Merge pull request #921 from NousResearch/hermes/hermes-ece5a45c 2026-03-11 06:30:20 -07:00
cron.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
curses_ui.py refactor: extract shared curses checklist, fix skill discovery perf 2026-03-11 03:06:15 -07:00
doctor.py fix: add Kimi Code API support (api.kimi.com/coding/v1) 2026-03-07 21:00:12 -05:00
gateway.py feat: add email gateway platform (IMAP/SMTP) 2026-03-11 06:32:01 -07:00
main.py feat: add ACP (Agent Client Protocol) server for editor integration 2026-03-11 09:07:19 -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 fix: provider selection not persisting when switching via hermes model 2026-03-10 17:12:34 -07:00
setup.py Revert "fix: smart vision setup that respects the user's chosen provider" 2026-03-11 07:59:00 -07:00
skills_config.py fix: wire email platform into toolset mappings + add documentation 2026-03-11 06:34:32 -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 feat: add email gateway platform (IMAP/SMTP) 2026-03-11 06:32:01 -07:00
tools_config.py fix: wire email platform into toolset mappings + add documentation 2026-03-11 06:34:32 -07:00
uninstall.py Cleanup time! 2026-02-20 23:23:32 -08:00