From e06c3cd842c9433b8ac5da0167dc2e54d1b23ece Mon Sep 17 00:00:00 2001 From: IRISX Date: Mon, 13 Apr 2026 10:53:13 +0800 Subject: [PATCH 1/2] feat: add GitHub Copilot CLI as supported ACP backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add first-class support for GitHub Copilot CLI via its native `--acp` mode, following the same pattern as the existing Gemini integration. - Add `Dockerfile.copilot` with Copilot CLI installed via npm - Add Copilot to the backend table in README - Add Helm install example and manual config.toml example - Auth: `gh auth login` or `copilot auth` Copilot CLI ships built-in ACP support (`copilot --acp`) — no third-party adapter needed. Config: [agent] command = "copilot" args = ["--acp"] --- Dockerfile.copilot | 33 +++++++++++++++++++++++++++++++++ README.md | 16 ++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 Dockerfile.copilot diff --git a/Dockerfile.copilot b/Dockerfile.copilot new file mode 100644 index 00000000..827ee3b7 --- /dev/null +++ b/Dockerfile.copilot @@ -0,0 +1,33 @@ +# --- Build stage --- +FROM rust:1-bookworm AS builder +WORKDIR /build +COPY Cargo.toml Cargo.lock ./ +RUN mkdir src && echo 'fn main() {}' > src/main.rs && cargo build --release && rm -rf src +COPY src/ src/ +RUN touch src/main.rs && cargo build --release + +# --- Runtime stage --- +FROM node:22-bookworm-slim +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/* + +# Install GitHub Copilot CLI (native ACP support via --acp) +RUN npm install -g @githubnext/github-copilot-cli --retry 3 + +# Install gh CLI (used by Copilot for GitHub integration) +RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ + -o /usr/share/keyrings/githubcli-archive-keyring.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \ + > /etc/apt/sources.list.d/github-cli.list && \ + apt-get update && apt-get install -y --no-install-recommends gh && \ + rm -rf /var/lib/apt/lists/* + +ENV HOME=/home/node +WORKDIR /home/node + +COPY --from=builder --chown=node:node /build/target/release/openab /usr/local/bin/openab + +USER node +HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ + CMD pgrep -x openab || exit 1 +ENTRYPOINT ["openab"] +CMD ["/etc/openab/config.toml"] diff --git a/README.md b/README.md index 772f5f72..05b2186c 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ Supports Kiro CLI, Claude Code, Codex, Gemini, and any ACP-compatible CLI. | `codex` | Codex | [@zed-industries/codex-acp](https://github.com/zed-industries/codex-acp) | `codex login --device-auth` | | `claude` | Claude Code | [@agentclientprotocol/claude-agent-acp](https://github.com/agentclientprotocol/claude-agent-acp) | `claude setup-token` | | `gemini` | Gemini CLI | Native `gemini --acp` | Google OAuth or `GEMINI_API_KEY` | +| `copilot` | GitHub Copilot CLI | Native `copilot --acp` | `gh auth login` or `copilot auth` | ### Helm Install (recommended) @@ -116,6 +117,16 @@ helm install openab openab/openab \ --set agents.claude.command=claude-agent-acp \ --set agents.claude.workingDir=/home/node +# Copilot only (native --acp mode) +helm install openab openab/openab \ + --set agents.kiro.enabled=false \ + --set agents.copilot.discord.botToken="$DISCORD_BOT_TOKEN" \ + --set-string 'agents.copilot.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ + --set agents.copilot.image=ghcr.io/openabdev/openab-copilot:latest \ + --set agents.copilot.command=copilot \ + --set 'agents.copilot.args={--acp}' \ + --set agents.copilot.workingDir=/home/node + # Multi-agent (kiro + claude in one release) helm install openab openab/openab \ --set agents.kiro.discord.botToken="$KIRO_BOT_TOKEN" \ @@ -156,6 +167,11 @@ working_dir = "/home/node" [agent] command = "gemini" args = ["--acp"] + +# GitHub Copilot (native ACP — requires copilot CLI in PATH) +[agent] +command = "copilot" +args = ["--acp"] working_dir = "/home/node" env = { GEMINI_API_KEY = "${GEMINI_API_KEY}" } ``` From e4877c6047bafec627722b83c25f879dcf38c37a Mon Sep 17 00:00:00 2001 From: IRISX Date: Mon, 13 Apr 2026 11:04:28 +0800 Subject: [PATCH 2/2] fix: correct npm package, pin version, fix Gemini config example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dockerfile: @githubnext/github-copilot-cli → @github/copilot@1 (the old package is deprecated; the new Copilot CLI v1.x ships native --acp support) - README: fix Gemini config example that lost its working_dir and env fields when the Copilot block was inserted - README: simplify auth to "gh auth login (GitHub OAuth)" --- Dockerfile.copilot | 2 +- README.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile.copilot b/Dockerfile.copilot index 827ee3b7..a20a2972 100644 --- a/Dockerfile.copilot +++ b/Dockerfile.copilot @@ -11,7 +11,7 @@ FROM node:22-bookworm-slim RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/* # Install GitHub Copilot CLI (native ACP support via --acp) -RUN npm install -g @githubnext/github-copilot-cli --retry 3 +RUN npm install -g @github/copilot@1 --retry 3 # Install gh CLI (used by Copilot for GitHub integration) RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ diff --git a/README.md b/README.md index 05b2186c..ec55ac3d 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Supports Kiro CLI, Claude Code, Codex, Gemini, and any ACP-compatible CLI. | `codex` | Codex | [@zed-industries/codex-acp](https://github.com/zed-industries/codex-acp) | `codex login --device-auth` | | `claude` | Claude Code | [@agentclientprotocol/claude-agent-acp](https://github.com/agentclientprotocol/claude-agent-acp) | `claude setup-token` | | `gemini` | Gemini CLI | Native `gemini --acp` | Google OAuth or `GEMINI_API_KEY` | -| `copilot` | GitHub Copilot CLI | Native `copilot --acp` | `gh auth login` or `copilot auth` | +| `copilot` | GitHub Copilot CLI | Native `copilot --acp` | `gh auth login` (GitHub OAuth) | ### Helm Install (recommended) @@ -167,13 +167,14 @@ working_dir = "/home/node" [agent] command = "gemini" args = ["--acp"] +working_dir = "/home/node" +env = { GEMINI_API_KEY = "${GEMINI_API_KEY}" } # GitHub Copilot (native ACP — requires copilot CLI in PATH) [agent] command = "copilot" args = ["--acp"] working_dir = "/home/node" -env = { GEMINI_API_KEY = "${GEMINI_API_KEY}" } ``` ## Configuration Reference