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