Skip to content

Add ACP stdio mode to ds4-agent#315

Open
omercelik wants to merge 1 commit into
antirez:mainfrom
omercelik:agent-acp-stdio
Open

Add ACP stdio mode to ds4-agent#315
omercelik wants to merge 1 commit into
antirez:mainfrom
omercelik:agent-acp-stdio

Conversation

@omercelik
Copy link
Copy Markdown

@omercelik omercelik commented May 31, 2026

Summary

This adds a minimal Agent Client Protocol mode to ds4-agent behind --acp. ACP lets editors and other clients drive the agent over stdio using newline delimited JSON-RPC.

The implementation keeps stdout reserved for protocol messages in ACP mode and leaves the existing TUI and --non-interactive paths unchanged.

Scope

  • adds --acp
  • handles initialize, session/new, session/prompt, and session/cancel
  • streams assistant text and tool updates through session/update
  • supports baseline text and resource_link prompt blocks
  • returns standard JSON-RPC errors for parse, request, method, params, and internal failures

Not included

  • session/load or session/list
  • modes or config options
  • client filesystem or terminal methods
  • ACP permission requests

References

Test environment

  • Machine: Apple M4 Max MacBook Pro, 128 GB RAM
  • OS: macOS 26.4.1
  • Backend: Metal
  • Test model: DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat-v2-imatrix.gguf

Tests

  • make clean
  • make
  • make test
  • ./ds4_test --server
  • ./ds4_test --acp
  • make cpu
  • git diff --check

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.

1 participant