Skip to content

feat(acp): add editor protocol server - #8

Open
yan-ad wants to merge 17 commits into
Blankeos:mainfrom
yan-ad:feat/acp
Open

feat(acp): add editor protocol server#8
yan-ad wants to merge 17 commits into
Blankeos:mainfrom
yan-ad:feat/acp

Conversation

@yan-ad

@yan-ad yan-ad commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add crabcode acp [--cwd PATH], a stdio Agent Client Protocol server backed by the Rust ACP SDK.
  • Implement persisted ACP session lifecycle: create, list, load, resume, close, fork, prompt streaming, cancellation, mode selection, tool updates, and permission forwarding.
  • Support PNG, JPEG, GIF, and WebP ACP image attachments when the selected model accepts image input; audio input remains unsupported.
  • Expose selectable Crabcode models to ACP clients with validated, session-local provider/model changes.
  • Expose model-supported reasoning-effort selectors through ACP session configuration options.
  • Emit estimated ACP context-window usage when the selected model provides a context limit.
  • Add crabcode models [provider] for non-interactive model discovery using the same credentials, custom providers, free models, runtime models, and effective catalog as Crabcode.
  • Make configuration and history initialization workspace-aware for ACP sessions.
  • Document Zed setup and add an ACP capability matrix with supported behavior, limitations, and follow-up work.

Editor Validation

The crabcode acp command was tested successfully with Zed IDE:

  • Zed version: 1.13.1
  • Zed commit: 00bd72e7838f4b875a913cd112b47a0ebe1ca62b
  • Full version: 1.13.1+stable.332.00bd72e7838f4b875a913cd112b47a0ebe1ca62b

Validation

  • cargo build
  • cargo fmt --check
  • cargo test acp::service::tests --bin crabcode
  • cargo test parses_acp_command_with_workspace --bin crabcode
  • cargo test parses_models_command_with_optional_provider --bin crabcode
  • cargo test model::catalog::tests --bin crabcode
  • cargo test config::configuration --bin crabcode
  • git diff --check

Notes

  • ACP model choices use canonical provider/model identifiers and remain session-local.
  • ACP reasoning-effort options are available only when model catalog metadata provides supported effort values.
  • ACP usage currently reports estimated context tokens and the known context-window size; provider-authoritative token and cost accounting is still pending.
  • Remaining ACP limitations are client-provided MCP servers, ACP terminal embedding, audio prompts, and authoritative usage/cost reporting.

@Blankeos

Copy link
Copy Markdown
Owner

Was thinking of this for a while now. Thanks for adding! Will review asap

@yan-ad
yan-ad marked this pull request as draft August 3, 2026 02:25
@yan-ad
yan-ad marked this pull request as ready for review August 3, 2026 02:48
@yan-ad

yan-ad commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@Blankeos this PR is ready for review. I have tested the ACP integration end-to-end in my local Zed setup, including image prompts, slash-command discovery/execution, workspace skills, and configured/client-provided MCP servers. Everything is working locally, and the ACP test suite plus cargo check pass.

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.

2 participants