feat(acp): aggregate ACP improvements — auth compat, protocol fixes, command ads, delegation, SSE events#5292
Merged
Merged
Conversation
…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>
Contributor
|
This was referenced Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
>=0.8.1,<0.9to>=0.9.0,<1.0② #3909 (Git-on-my-level) — fix: keep ACP stdout protocol-clean
_print_fnfor ACP stdio sessions_should_start_quiet_spinner()to protect JSON-RPC on stdout③ #3417 (NexVeridian) — fix(acp): advertise slash commands via ACP protocol
AvailableCommandsUpdateon session create/load/resume/forkagent._compress_context()properly④ #3113 (Mibayy) — feat(delegate): add acp_command/acp_args override to delegate_task
⑤ #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(tool_name, preview, args)→(event_type, tool_name, preview, args, **kwargs)PRs to close after merge
Test results