From 82ffbc8e8a03be0e66cdfc68b3fc264e5b7092e9 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Thu, 4 Jun 2026 13:01:35 +0200 Subject: [PATCH] feat: add coder/mux built-in adapter Add `mux` to the built-in agent registry, resolving to `npx -y mux acp` (coder/mux's ACP stdio bridge). Follows the existing npx-backed adapter pattern (kilocode/opencode): no global install required and no core changes, since the command resolves through the generic spawn path. Also adds agents/Mux.md, the docs/agents.md + README + skills registry entries, an install note, a CHANGELOG entry, and a registry test. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 1 + README.md | 1 + agents/Mux.md | 9 +++++++++ agents/README.md | 2 ++ docs/agents.md | 11 +++++++++++ docs/install.md | 2 +- skills/acpx/SKILL.md | 1 + src/agent-registry.ts | 2 ++ test/agent-registry.test.ts | 6 ++++++ 9 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 agents/Mux.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 88cb4831..f3b3a3b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Repo: https://github.com/openclaw/acpx - Agents/built-ins: bump the default Claude ACP adapter range to `@agentclientprotocol/claude-agent-acp@^0.37.0`. Thanks @trumpyla. - Runtime/embedding: surface cost, token usage breakdowns, and advertised command metadata on runtime status/events. Thanks @DaniAkash. - Agents/built-ins: add `fast-agent` as a built-in fast-agent ACP adapter via `uvx fast-agent-mcp acp`. +- Agents/built-ins: add `mux` as a built-in coder/mux ACP adapter via `npx -y mux acp`. ### Breaking diff --git a/README.md b/README.md index 9fe7dc4e..0674f5c5 100644 --- a/README.md +++ b/README.md @@ -356,6 +356,7 @@ Built-ins: | `kilocode` | `npx -y @kilocode/cli acp` | [Kilocode](https://kilocode.ai) | | `kimi` | native (`kimi acp`) | [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) | | `kiro` | native (`kiro-cli-chat acp`) | [Kiro CLI](https://kiro.dev) | +| `mux` | `npx -y mux acp` | [Mux](https://mux.coder.com) | | `opencode` | `npx -y opencode-ai acp` | [OpenCode](https://opencode.ai) | | `qoder` | native (`qodercli --acp`) | [Qoder CLI](https://docs.qoder.com/cli/acp) | | `qwen` | native (`qwen --acp`) | [Qwen Code](https://github.com/QwenLM/qwen-code) | diff --git a/agents/Mux.md b/agents/Mux.md new file mode 100644 index 00000000..42afb5d5 --- /dev/null +++ b/agents/Mux.md @@ -0,0 +1,9 @@ +# Mux + +- Built-in name: `mux` +- Default command: `npx -y mux acp` +- Upstream: https://mux.coder.com/integrations/acp + +`acpx mux` starts coder/mux through its ACP stdio bridge (`mux acp`). `mux acp` auto-starts an in-process mux server, so a separate `mux server` is not required. + +Configure at least one model provider before prompting (for example `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `OPENROUTER_API_KEY`); see https://mux.coder.com/config/providers. To target a remote mux server, override the command with `mux acp --server-url --auth-token ` (or set `MUX_SERVER_URL` / `MUX_SERVER_AUTH_TOKEN`). diff --git a/agents/README.md b/agents/README.md index abc2ea8e..d81ed91f 100644 --- a/agents/README.md +++ b/agents/README.md @@ -15,6 +15,7 @@ Built-in agents: - `kilocode -> npx -y @kilocode/cli acp` - `kimi -> kimi acp` - `kiro -> kiro-cli-chat acp` +- `mux -> npx -y mux acp` - `opencode -> npx -y opencode-ai acp` - `qoder -> qodercli --acp` - `qwen -> qwen --acp` @@ -33,6 +34,7 @@ Harness-specific docs in this directory: - [Kilocode](Kilocode.md): built-in `kilocode -> npx -y @kilocode/cli acp` - [Kimi](Kimi.md): built-in `kimi -> kimi acp` - [Kiro](Kiro.md): built-in `kiro -> kiro-cli-chat acp` +- [Mux](Mux.md): built-in `mux -> npx -y mux acp` - [OpenCode](OpenCode.md): built-in `opencode -> npx -y opencode-ai acp` - [Qoder](Qoder.md): built-in `qoder -> qodercli --acp` - [Qwen](Qwen.md): built-in `qwen -> qwen --acp` diff --git a/docs/agents.md b/docs/agents.md index dcbb4eb3..08e6b5c5 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -24,6 +24,7 @@ The default agent for top-level commands like `acpx exec …` and `acpx prompt | `kilocode` | `npx -y @kilocode/cli acp` | [Kilocode](https://kilocode.ai) | | `kimi` | `kimi acp` | [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) | | `kiro` | `kiro-cli-chat acp` | [Kiro CLI](https://kiro.dev) | +| `mux` | `npx -y mux acp` | [Mux](https://mux.coder.com) | | `opencode` | `npx -y opencode-ai acp` | [OpenCode](https://opencode.ai) | | `qoder` | `qodercli --acp` | [Qoder CLI](https://docs.qoder.com/cli/acp) | | `qwen` | `qwen --acp` | [Qwen Code](https://github.com/QwenLM/qwen-code) | @@ -166,6 +167,16 @@ Configure model/provider settings through fast-agent environment variables, fast - Default command: `kiro-cli-chat acp` - Upstream: [kiro.dev](https://kiro.dev) +### Mux + +- Built-in name: `mux` +- Default command: `npx -y mux acp` +- Upstream: https://mux.coder.com/integrations/acp + +`acpx mux` starts coder/mux through its ACP stdio bridge (`mux acp`). `mux acp` auto-starts an in-process mux server, so a separate `mux server` is not required. + +Configure at least one model provider before prompting (for example `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `OPENROUTER_API_KEY`); see https://mux.coder.com/config/providers. To target a remote mux server, override the command with `mux acp --server-url --auth-token ` (or set `MUX_SERVER_URL` / `MUX_SERVER_AUTH_TOKEN`). + ### OpenCode - Built-in name: `opencode` diff --git a/docs/install.md b/docs/install.md index 45d7d44c..89ccb2ce 100644 --- a/docs/install.md +++ b/docs/install.md @@ -21,7 +21,7 @@ Some older Corepack builds bundled with supported Node.js versions have stale package-signing keys and fail while preparing current pnpm releases. Installing pnpm with npm avoids that bootstrap failure. -`acpx` itself does not need a global install of every adapter. Built-in adapters that ship as npm packages (`pi-acp`, `@agentclientprotocol/codex-acp`, `@agentclientprotocol/claude-agent-acp`, `@kilocode/cli`, `opencode-ai`) are auto-fetched with `npx` on first use. The `fast-agent` built-in uses `uvx fast-agent-mcp acp`, so it requires `uvx` on `PATH`. +`acpx` itself does not need a global install of every adapter. Built-in adapters that ship as npm packages (`pi-acp`, `@agentclientprotocol/codex-acp`, `@agentclientprotocol/claude-agent-acp`, `@kilocode/cli`, `opencode-ai`, `mux`) are auto-fetched with `npx` on first use. The `fast-agent` built-in uses `uvx fast-agent-mcp acp`, so it requires `uvx` on `PATH`. ## Global install (recommended) diff --git a/skills/acpx/SKILL.md b/skills/acpx/SKILL.md index 62ed5d58..0f3b12d3 100644 --- a/skills/acpx/SKILL.md +++ b/skills/acpx/SKILL.md @@ -92,6 +92,7 @@ Friendly agent names resolve to commands: - `kilocode` -> `npx -y @kilocode/cli acp` - `kimi` -> `kimi acp` - `kiro` -> `kiro-cli-chat acp` +- `mux` -> `npx -y mux acp` - `opencode` -> `npx -y opencode-ai acp` - `qoder` -> `qodercli --acp` Forwards Qoder-native `--allowed-tools` and `--max-turns` startup flags from `acpx` session options. diff --git a/src/agent-registry.ts b/src/agent-registry.ts index 52e14421..5e692135 100644 --- a/src/agent-registry.ts +++ b/src/agent-registry.ts @@ -6,6 +6,7 @@ const ACP_ADAPTER_PACKAGE_RANGES = { pi: "^0.0.26", codex: "^0.0.44", claude: "^0.37.0", + mux: "^0.26.0", } as const; type BuiltInAgentPackageSpec = { @@ -49,6 +50,7 @@ export const AGENT_REGISTRY: Record = { kilocode: "npx -y @kilocode/cli acp", kimi: "kimi acp", kiro: "kiro-cli-chat acp", + mux: `npx -y mux@${ACP_ADAPTER_PACKAGE_RANGES.mux} acp`, opencode: "npx -y opencode-ai acp", qoder: "qodercli --acp", qwen: "qwen --acp", diff --git a/test/agent-registry.test.ts b/test/agent-registry.test.ts index 9b389d5f..80ce68c7 100644 --- a/test/agent-registry.test.ts +++ b/test/agent-registry.test.ts @@ -54,6 +54,11 @@ test("fast-agent built-in runs the ACP entrypoint through uvx", () => { assert.equal(resolveAgentCommand("fast-agent"), "uvx fast-agent-mcp acp"); }); +test("mux built-in runs the coder/mux ACP stdio bridge through npx", () => { + assert.equal(AGENT_REGISTRY.mux, "npx -y mux@^0.26.0 acp"); + assert.equal(resolveAgentCommand("mux"), "npx -y mux@^0.26.0 acp"); +}); + test("listBuiltInAgents preserves the required example prefix and alphabetical tail", () => { const agents = listBuiltInAgents(); assert.deepEqual(agents, Object.keys(AGENT_REGISTRY)); @@ -73,6 +78,7 @@ test("listBuiltInAgents preserves the required example prefix and alphabetical t "kilocode", "kimi", "kiro", + "mux", "opencode", "qoder", "qwen",