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.
Add ACP Support with Zed Integration, Protocol Fixes, and Tool Streaming
Overview
Why
What’s Included
mini_agent/acp/server.py: stdio ACP server entry (mini-agent-acp), config/bootstrap.mini_agent/acp/agent.py: ACP Agent implementation with multi‑session, streaming, tool execution.mini_agent/acp/session.py: Session manager.mini_agent/acp/converter.py: Message/content conversion.mini_agent/acp/schema_fix.py: Monkeypatch to accept stringprotocolVersionfrom some clients (e.g., “1.0.0”).end_turn,max_tokens,max_turn_requests,refusal,cancelled.start_tool_call(...)andupdate_tool_call(...)withstatus,raw_input,raw_output, and content blocks.protocolVersion; InitializeRequest accepts string versions via monkeypatch.tool.to_schema()) to the LLM instead of Tool objects.mini_agent/logger.py: Fallback log path in CWD when HOME is not writable.mini_agent/tools/file_tools.py: Offline-safe token counting fallback iftiktokenisn’t available.config.yaml.README.md: Detailed Zed integration steps (using absolute venv path), version verification wrapper, and configuration search order.mini_agent/acp/README.md: Expanded “With Zed” section, config locations, and explicit statement of ACP stopReason compliance.How To Test
pytest -q(44 passed, 3 skipped in local run).mini-agent-acpand connect an ACP client over stdio.python -m acp.examples.client mini-agent-acp./absolute/path/to/venv/bin/mini-agent-acp/bin/bash-lc,echo 'mini-agent:' $(python -c 'import importlib.metadata as m; print(m.version("mini-agent"))') 'at' $(python -c 'import mini_agent; print(mini_agent.__file__)') >&2; exec /absolute/path/to/venv/bin/mini-agent-acpin_progress→completed|failed) withraw_inputandraw_output.Compatibility
mini-agent).mini-agent-acp.Known Limitations
loadSessionandsetSessionModenot implemented.Notes For Reviewers
Changelog
tiktokenencoder unavailable.How To Roll Back
mini-agent-acpentrypoint andmini_agent/acp/*.mini_agent/acp/agent.py,mini_agent/acp/server.py,mini_agent/config.py,mini_agent/tools/file_tools.py,mini_agent/logger.py, and the README updates.