Skip to content

feat(acp): aggregate ACP improvements — auth compat, protocol fixes, command ads, delegation, SSE events#5292

Merged
teknium1 merged 5 commits into
mainfrom
hermes/hermes-f9d9e542
Apr 5, 2026
Merged

feat(acp): aggregate ACP improvements — auth compat, protocol fixes, command ads, delegation, SSE events#5292
teknium1 merged 5 commits into
mainfrom
hermes/hermes-f9d9e542

Conversation

@teknium1

@teknium1 teknium1 commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Aggregate salvage of 5 ACP-related contributor PRs onto current main. Each contributor's authorship is preserved via cherry-pick.

What's included

#3111 (Mibayy) — fix(acp): rename AuthMethod → AuthMethodAgent for agent-client-protocol 0.9.0

  • Compatibility shim: try AuthMethodAgent (0.9.x), fall back to AuthMethod (0.8.x)
  • Bumps pin from >=0.8.1,<0.9 to >=0.9.0,<1.0

#3909 (Git-on-my-level) — fix: keep ACP stdout protocol-clean

  • Routes AIAgent print output to stderr via _print_fn for ACP stdio sessions
  • Gates spinner startup on _should_start_quiet_spinner() to protect JSON-RPC on stdout
  • Child agents inherit the redirect

#3417 (NexVeridian) — fix(acp): advertise slash commands via ACP protocol

  • Sends AvailableCommandsUpdate on session create/load/resume/fork
  • ACP clients (Zed, etc.) can now discover /help, /model, /tools, etc.
  • Rewrites /compact to use agent._compress_context() properly

#3113 (Mibayy) — feat(delegate): add acp_command/acp_args override to delegate_task

  • Lets delegate_task specify custom ACP transport per-task
  • Enables CLI/Discord/Telegram parents to spawn ACP child agents (e.g. claude --acp --stdio)
  • Per-task granularity in batch mode

#3100 (Mibayy) — feat(api): structured run events via /v1/runs SSE endpoint

  • POST /v1/runs — start async run, get run_id (HTTP 202)
  • GET /v1/runs/{run_id}/events — SSE stream of typed lifecycle events
  • Event types: tool.started, tool.completed, message.delta, reasoning.available, run.completed, run.failed
  • Changes internal callback signature: (tool_name, preview, args)(event_type, tool_name, preview, args, **kwargs)
  • Adds concurrency limit (10 max) and orphaned run sweep (300s TTL)
  • Fixes logic inversion bug in original PR's cli.py change

PRs to close after merge

Test results

  • ACP tests: 137/137 passed
  • Agent tests: 523/523 passed
  • hermes_cli tests: 1142/1143 (1 pre-existing failure)
  • 3 pre-existing failures in test_run_progress_topics (UnboundLocalError on main)

teknium1 and others added 5 commits April 5, 2026 11:41
…col 0.9.0

Straight rename to match the 0.9.0 API where AuthMethod was split into
AuthMethodAgent, AuthMethodEnvVar, AuthMethodTerminal. Bump pin to >=0.9.0,<1.0.

Co-authored-by: Mibayy <mibayy@users.noreply.github.com>
Route AIAgent print output to stderr via _print_fn for ACP stdio sessions.
Gate quiet-mode spinner startup on _should_start_quiet_spinner() so JSON-RPC
on stdout isn't corrupted. Child agents inherit the redirect.

Co-authored-by: Git-on-my-level <Git-on-my-level@users.noreply.github.com>
Send AvailableCommandsUpdate on session create/load/resume/fork so ACP
clients (Zed, etc.) can discover /help, /model, /tools, /compact, etc.
Also rewrites /compact to use agent._compress_context() properly with
token estimation and session DB isolation.

Co-authored-by: NexVeridian <NexVeridian@users.noreply.github.com>
Allow delegate_task to specify custom ACP transport per-task, so a parent
running via CLI/Discord/Telegram can spawn child agents over ACP
(e.g. claude --acp --stdio). Follows the existing override_provider pattern.
Supports per-task granularity in batch mode.

Co-authored-by: Mibayy <mibayy@users.noreply.github.com>
Add POST /v1/runs to start async agent runs and GET /v1/runs/{run_id}/events
for SSE streaming of typed lifecycle events (tool.started, tool.completed,
message.delta, reasoning.available, run.completed, run.failed).

Changes the internal tool_progress_callback signature from positional
(tool_name, preview, args) to event-type-first
(event_type, tool_name, preview, args, **kwargs). Existing consumers
filter on event_type and remain backward-compatible.

Adds concurrency limit (_MAX_CONCURRENT_RUNS=10) and orphaned run sweep.

Fixes logic inversion in cli.py _on_tool_progress where the original PR
would have displayed internal tools instead of non-internal ones.

Co-authored-by: Mibayy <mibayy@users.noreply.github.com>
@github-actions

github-actions Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: Install hook files modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants