# 𝄑 dirigate **ACP bridge and mock server for AI agent orchestration.** Connect stdio-based ACP agents (Claude Code, Zed) to a remote Dirigent server — or run a fixture-backed mock for local development and testing. > [!CAUTION] > **Alpha software.** Dirigate is under active development and not fully battle-tested. The ACP specification itself is still evolving, and dirigate tracks it on a best-effort basis. APIs and CLI flags may change between releases. ```bash # Bridge Claude Code to a running Dirigent instance dirigate bridge --server-url http://your-server:3001/acp ``` --- ## Dirigent Protocol and ACP Dirigate speaks the **Dirigent Protocol**, which is a superset of the [Agent-Client Protocol (ACP)](https://github.com/anthropics/agent-protocol). Dirigent Protocol started as an early attempt at an HTTP-based ACP implementation and carries additional signaling used by the Dirigent orchestration platform (session lifecycle, multi-agent coordination, archival events). **The goal is full ACP parity at all times.** As the ACP HTTP specification evolves, dirigate tracks it and aims to provide a fully ACP-compliant smart adapter as its primary function. The Dirigent-specific extensions ride alongside as optional protocol signals — an ACP-only client can ignore them entirely and still get a conformant experience. In short: dirigate is an **ACP adapter first**, Dirigent extension carrier second. --- ## Why Dirigate ACP clients speak JSON-RPC over stdio. Dirigent listens over HTTP/SSE. Dirigate bridges the two — reliably, with correct streaming semantics. The core challenge: an ACP server returns the JSON-RPC response immediately, but the actual agent output keeps arriving as SSE chunks. If the bridge naively forwards the response right away, the client thinks the turn is done and stops listening — before the content has arrived. **Dirigate solves this with RPC response buffering**: the response is held until `turn.complete` arrives via SSE, so all chunks and notifications reach the client first, and the response arrives last. The client gets clean "all content, then done" semantics — exactly what stdio JSON-RPC expects. --- ## Feature Overview | Mode | Command | Maturity | Description | |------|---------|----------|-------------| | Bridge | `dirigate bridge` | beta | Relay a stdio ACP client to a Dirigent ACP Server over HTTP/SSE | | Mock server | `dirigate serve` | beta | Fixture-based ACP server for client development and testing | | Interactive client | `dirigate connect` | concept | Debug and explore any ACP agent interactively | | Session ingest | `dirigate ingest` | concept | Import sessions from OpenCode.ai into fixture format (requires `ingest` feature) | --- ## Install ```bash cargo install --git https://git.g4b.org/dirigence/dirigate ``` Requires a working [Rust toolchain](https://rustup.rs). --- ## Quick Start: Bridge Mode Bridge mode is the primary use case. It lets any stdio ACP client reach a remote Dirigent server. ### 1. Start Dirigent Start the Dirigent server with the ACP server enabled: ```bash # Default ACP endpoint: http://localhost:3001/acp DIRIGENT_ACP_ENABLED=true dirigent ``` ### 2. Configure your ACP client **Claude Code** — add to `.claude/settings.json`: ```json { "mcpServers": { "dirigent": { "command": "dirigate", "args": ["bridge"] } } } ``` **Zed** — add to `settings.json`: ```json { "agent_servers": { "dirigent": { "command": "dirigate", "args": ["bridge"] } } } ``` **Remote server:** ```bash DIRIGENT_SERVER_URL=http://remote:3001/acp dirigate bridge ``` Or with the flag: ```bash dirigate bridge --server-url http://remote:3001/acp ``` ### Bridge options | Flag | Env | Default | Description | |------|-----|---------|-------------| | `-s, --server-url` | `DIRIGENT_SERVER_URL` | `http://localhost:3001/acp` | ACP server URL | | `-v, --verbose` | | false | Log all JSON-RPC messages | | `--timeout` | | 30 | HTTP request timeout in seconds | | `--auto-reconnect` | | true | Reconnect SSE stream on disconnect | --- ## Architecture: RPC Response Buffering The bridge implements a minimal buffering mechanism that preserves real-time streaming while maintaining correct JSON-RPC request/response pairing over stdio.