Skip to content

feat: add ACP Runners support for agent communication protocol#920

Merged
stephanj merged 10 commits intomasterfrom
feature/acp-runners
Feb 13, 2026
Merged

feat: add ACP Runners support for agent communication protocol#920
stephanj merged 10 commits intomasterfrom
feature/acp-runners

Conversation

@stephanj
Copy link
Copy Markdown
Collaborator

Summary

  • ACP Protocol Layer: Add full JSON-RPC 2.0 over stdin/stdout implementation (AcpClient, AcpTransport, AgentRequestHandler, JsonRpcMessage) supporting structured streaming, capability negotiation, and agent file/terminal requests
  • ACP Runners as Provider: Register ACP Runners as a new ModelProvider with AcpRunnersChatModelFactory, AcpPromptStrategy, and strategy factory integration so ACP tools appear in the provider dropdown
  • Conversation History for CLI/ACP: Both CLI and ACP runners now maintain chat memory via buildPromptWithHistory() — prior exchanges are formatted as a <conversation_history> text preamble so external tools can recall earlier messages
  • Project Context in System Prompt: Move CLAUDE.md/AGENTS.md and DEVOXXGENIE.md injection from per-user-message to system prompt (set once per conversation), saving tokens on every exchange
  • ACP Tool Configuration: Add CLAUDE and COPILOT ACP types with per-tool acpFlag support (Copilot uses --acp)
  • Dedicated Runner Settings Page: Extract CLI/ACP runner table management from Spec Settings into a new "CLI/ACP Runners" settings page
  • Documentation: Add ACP Runners docs page and update CLI Runners docs with new settings path
  • Test Suite: 40 new tests covering ACP protocol, transport, request handling, model factory, strategy factory, and tool config

Test plan

  • ./gradlew test — all 578 tests pass (BUILD SUCCESSFUL)
  • Manual: select an ACP runner (e.g. Kimi) → send "hey" → "tell a joke" → "what was my first question" — should recall "hey"
  • Manual: verify Settings > Tools > DevoxxGenie > CLI/ACP Runners page shows correctly
  • Manual: verify Spec Driven Dev settings page no longer shows runner tables

🤖 Generated with Claude Code

stephanj and others added 10 commits February 13, 2026 09:19
Implement JSON-RPC 2.0 over stdin/stdout transport adapted from the
ACP-Prototype project. Provides structured streaming, file operations,
terminal management, and capability negotiation for external ACP agents.

- AcpTransport: process-based transport with async request/response matching
- AcpClient: high-level client (initialize → createSession → sendPrompt)
- AgentRequestHandler: handles fs/read, fs/write, terminal, and permission requests
- JsonRpcMessage: JSON-RPC 2.0 message model with serialization support
- Model POJOs for protocol handshake and session management

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ACPRunners enum value and wire it through the full provider pipeline:
factory registration, state service persistence, LLM provider visibility,
model dropdown filtering, and Langchain4J bypass for chat context creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AcpPromptStrategy runs the full ACP flow (init → session → prompt) on a
pooled thread, streaming agent_message_chunk notifications to the WebView.
Settings UI adds an ACP Runners section with table, add/edit/remove dialog,
and a test button that performs an ACP initialize handshake.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comprehensive tests covering the full ACP stack:
- JsonRpcMessageTest: message creation, serialization, type detection
- AcpTransportTest: process lifecycle, dispatching, handler invocation
- AcpClientTest: full protocol flow, error handling, notification filtering
- AgentRequestHandlerTest: file I/O, permissions, terminal management
- AcpRunnersChatModelFactoryTest: model generation from config
- AcpToolConfigTest: builder, equality, enum values
- PromptExecutionStrategyFactoryTest: ACP/CLI strategy routing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add CLAUDE and COPILOT to AcpType enum with their default executable
paths and ACP flags (Copilot uses --acp). Add configurable acpFlag
field to AcpToolConfig so each tool can specify its own flag. Use the
configured acpFlag when starting the ACP client process.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract CLI and ACP runner table management from SpecSettingsComponent
into a new RunnerSettingsComponent under ui/settings/runner/. Register
it as a separate "CLI/ACP Runners" configurable in plugin.xml. This
keeps the Spec Driven Development settings focused on spec/backlog
configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… prompt

CLI and ACP runners previously sent each message as standalone with no
memory of prior exchanges. Add buildPromptWithHistory() to
AbstractPromptExecutionStrategy that prepares memory, retrieves prior
messages, and formats them as a <conversation_history> text preamble.

Also move CLAUDE.md/AGENTS.md and DEVOXXGENIE.md content injection from
per-user-message (MessageCreationService) into the system prompt
(ChatMemoryManager.buildSystemPrompt), so project context is set once
per conversation instead of repeated in every message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update enum size assertion from 4 to 6, add coverage for CLAUDE and
COPILOT display names and executable paths, and add new test for the
defaultAcpFlag field on all AcpType values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add new acp-runners.md page covering ACP protocol support, setup
instructions, and supported tools (Kimi, Gemini, Kilocode, Claude,
Copilot). Update cli-runners.md settings path to reflect the new
CLI/ACP Runners settings page. Add ACP runners to sidebar navigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@stephanj stephanj merged commit 948d110 into master Feb 13, 2026
8 checks passed
@stephanj stephanj deleted the feature/acp-runners branch February 13, 2026 09:04
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