mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
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 |
||
|---|---|---|
| .. | ||
| acp | ||
| agent | ||
| cron | ||
| fakes | ||
| gateway | ||
| hermes_cli | ||
| honcho_integration | ||
| integration | ||
| skills | ||
| tools | ||
| __init__.py | ||
| conftest.py | ||
| test_413_compression.py | ||
| test_860_dedup.py | ||
| test_agent_loop.py | ||
| test_agent_loop_tool_calling.py | ||
| test_agent_loop_vllm.py | ||
| test_api_key_providers.py | ||
| test_atomic_json_write.py | ||
| test_auth_codex_provider.py | ||
| test_auth_nous_provider.py | ||
| test_auxiliary_config_bridge.py | ||
| test_batch_runner_checkpoint.py | ||
| test_cli_init.py | ||
| test_cli_loading_indicator.py | ||
| test_cli_model_command.py | ||
| test_cli_provider_resolution.py | ||
| test_codex_execution_paths.py | ||
| test_codex_models.py | ||
| test_display.py | ||
| test_external_credential_detection.py | ||
| test_fallback_model.py | ||
| test_file_permissions.py | ||
| test_flush_memories_codex.py | ||
| test_hermes_state.py | ||
| test_honcho_client_config.py | ||
| test_insights.py | ||
| test_managed_server_tool_support.py | ||
| test_model_provider_persistence.py | ||
| test_model_tools.py | ||
| test_personality_none.py | ||
| test_provider_parity.py | ||
| test_quick_commands.py | ||
| test_reasoning_command.py | ||
| test_resume_display.py | ||
| test_run_agent.py | ||
| test_run_agent_codex_responses.py | ||
| test_runtime_provider_resolution.py | ||
| test_timezone.py | ||
| test_tool_call_parsers.py | ||
| test_toolset_distributions.py | ||
| test_toolsets.py | ||
| test_trajectory_compressor.py | ||
| test_worktree.py | ||