ACP Plan
This is the current plan for the ACP surface. It is intentionally written as a
roadmap because acp/ does not yet contain server code.
Phase 1: Minimal Server Skeleton
Goal: create a stdio ACP server that can start, report capabilities, and accept a simple user request.
Planned work:
- Add
acp/server.py. - Define protocol message parsing and response serialization.
- Add a small adapter around
protoagent_core.agent_engine. - Support basic request/response tasks without editor-side file writes.
- Add tests for protocol frames and error handling.
Docs to update:
ACP / OverviewACP / PlanReference / File Map- Root
README.mdeditor setup section
Phase 2: Core Runtime Integration
Goal: route editor tasks through the same ProtoLink mesh as the CLI.
Planned work:
- Resolve workspace from ACP session metadata.
- Reuse Context Loom pack building.
- Pass stable session ids into ProtoLink state.
- Stream progress as editor-compatible updates.
- Return structured answer, trace, timeline, and diff metadata.
Important constraint: do not fork the runtime path. ACP should adapt the same core response shape instead of introducing a second agent engine.
Phase 3: Approval And Diff Flow
Goal: map ProtoLink approval requests into editor-native review interactions.
Planned work:
- Create an ACP approval bridge equivalent to
RuntimeBridge. - Preserve
RunActionandtext/x-diffpreview artifacts. - Let the editor approve or reject before
write_file()executes. - Return clear denied/canceled statuses.
Do not bypass Coder policy by applying diffs directly from the server.
Phase 4: MCP Tool Mapping
Goal: let editor-provided MCP tools become safe ProtoAgent capabilities.
Planned work:
- Inspect incoming tool schemas from the editor.
- Classify tools as read-only, write-capable, network, or external side effect.
- Route read-only tools to Explorer when safe.
- Route write-capable tools through the same approval boundary as workspace writes.
- Add visible docs for tool classification and limitations.
Phase 5: Editor Guides
Goal: document setup for specific editors after the server exists.
Candidate pages:
- Zed setup.
- JetBrains setup.
- Troubleshooting stdio startup.
- Workspace trust and approval model.
Open Questions
| Question | Current answer |
|---|---|
Should ACP call process_prompt() directly? | Likely yes for Phase 1 and 2. |
Should ACP share RuntimeBridge? | Probably not directly; it needs editor-native IO, but it should preserve the same approval semantics. |
| Should ACP own provider config? | No. Reuse core/protoagent_core/config.py. |
| Should ACP support model picking? | Later. Initial editor integration can rely on CLI/config setup. |