Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-5581: add Qoder CN CLI runtime (#6232)

Multica Evee4b6f7a31b98
diff --git a/CLI_AND_DAEMON.md b/CLI_AND_DAEMON.md
index 180ee23fcc..bd9c48d23f 100644
--- a/CLI_AND_DAEMON.md
+++ b/CLI_AND_DAEMON.md
@@ -150,6 +150,7 @@ The daemon auto-detects these AI CLIs on your PATH:
| Kimi | `kimi` | Moonshot coding agent |
| Kiro CLI | `kiro-cli` | Kiro ACP coding agent |
| [Qoder CLI](https://docs.qoder.com/) | `qodercli` | Qoder ACP coding agent |
+| [Qoder CN CLI](https://help.aliyun.com/en/lingma/qodercli-cn/product-overview/what-is-qoder-cli-cn) | `qoderclicn` | Qoder CN ACP coding agent |
| [Trae](https://docs.trae.cn/cli) | `traecli` | ByteDance TRAE CLI (ACP via `traecli acp serve`) |
| [Grok Build CLI](https://docs.x.ai/) | `grok` | xAI Grok Build CLI (ACP via `grok agent stdio`) |
| [Qwen Code](https://github.com/QwenLM/qwen-code) | `qwen` | Alibaba Qwen Code (`qwen -p` with stream-json) |
@@ -227,6 +228,8 @@ Agent-specific overrides:
| `MULTICA_KIRO_MODEL` | Override the Kiro model used |
| `MULTICA_QODER_PATH` | Custom path to the `qodercli` binary |
| `MULTICA_QODER_MODEL` | Override the Qoder model used |
+| `MULTICA_QODERCLICN_PATH` | Custom path to the `qoderclicn` binary |
+| `MULTICA_QODERCLICN_MODEL` | Override the Qoder CN model used |
| `MULTICA_TRAECLI_PATH` | Custom path to the `traecli` binary |
| `MULTICA_TRAECLI_MODEL` | Override the Trae model used (a model id from your logged-in traecli catalog, e.g. `Doubao-Seed-2.1-Pro`) |
| `MULTICA_GROK_PATH` | Custom path to the `grok` binary (defaults to `grok` on PATH; often `~/.grok/bin/grok`) |
@@ -237,7 +240,7 @@ Agent-specific overrides:
If a previously generated `~/.multica/hooks` wrapper is first on `PATH` and calls the same command name again, the daemon skips that hooks directory during built-in agent discovery and records the real binary path behind it. If your interactive shell still recurses when you run `claude`, `codex`, or `hermes` manually, remove the hooks entry from your shell startup file or replace the wrapper body with an absolute `exec /path/to/real-binary "$@"`.
-The daemon launches Qoder as `qodercli --yolo --acp`, matching Qoder’s ACP “bypass permissions” mode so tool runs do not block on interactive approval in headless runs.
+The daemon launches Qoder and Qoder CN as `qodercli --yolo --acp` and `qoderclicn --yolo --acp`, respectively, matching their ACP “bypass permissions” mode so tool runs do not block on interactive approval in headless runs.
The daemon launches Qwen Code as `qwen -p <prompt> --output-format stream-json`. It writes the task brief to `QWEN.md`; when an agent has managed `mcp_config`, the daemon writes a 0600 per-run JSON file and passes it through `--mcp-config <path>`, then removes it after the process exits. A null config preserves Qwen Code native MCP settings.
diff --git a/README.md b/README.md
index 7f3ccf54f6..240ef753d6 100644
--- a/README.md
+++ b/README.md
@@ -144,7 +144,7 @@ multica setup # Connect to Multica Cloud, log in, start daemon
multica setup # Configure, authenticate, and start the daemon
```
-The daemon runs in the background and auto-detects agent CLIs (`claude`, `codex`, `codebuddy`, `copilot`, `opencode`, `openclaw`, `hermes`, `pi`, `cursor-agent`, `kimi`, `kiro-cli`, `agy`, `qodercli`, `traecli`) on your PATH.
+The daemon runs in the background and auto-detects agent CLIs (`claude`, `codex`, `codebuddy`, `copilot`, `opencode`, `openclaw`, `hermes`, `pi`, `cursor-agent`, `kimi`, `kiro-cli`, `agy`, `qodercli`, `qoderclicn`, `traecli`) on your PATH.
### 2. Verify your runtime
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 186939398e..b0833d6de3 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -116,7 +116,7 @@ multica setup # 连接 Multica Cloud,登录,启动 daemon
multica setup # 配置、认证、启动 daemon(一条命令搞定)
```
-daemon 在后台运行,保持你的机器与 Multica 的连接。它会自动检测 PATH 中可用的 Agent CLI(`claude`、`codex`、`codebuddy`、`copilot`、`opencode`、`openclaw`、`hermes`、`pi`、`cursor-agent`、`kimi`、`kiro-cli`、`agy`、`qodercli`、`traecli`)。
+daemon 在后台运行,保持你的机器与 Multica 的连接。它会自动检测 PATH 中可用的 Agent CLI(`claude`、`codex`、`codebuddy`、`copilot`、`opencode`、`openclaw`、`hermes`、`pi`、`cursor-agent`、`kimi`、`kiro-cli`、`agy`、`qodercli`、`qoderclicn`、`traecli`)。
### 2. 确认运行时已连接
diff --git a/SELF_HOSTING.md b/SELF_HOSTING.md
index 114a24a233..147554df1c 100644
--- a/SELF_HOSTING.md
+++ b/SELF_HOSTING.md
@@ -120,6 +120,7 @@ You also need at least one AI agent CLI installed:
- Kimi (`kimi` on PATH)
- Kiro CLI (`kiro-cli` on PATH)
- Qoder CLI (`qodercli` on PATH)
+- Qoder CN CLI (`qoderclicn` on PATH)
- Trae CLI (`traecli` on PATH)
- [Grok Build CLI](https://docs.x.ai/) (`grok` on PATH)
- Qwen Code (`qwen` on PATH)
diff --git a/apps/docs/content/docs/install-agent-runtime.ja.mdx b/apps/docs/content/docs/install-agent-runtime.ja.mdx
index 862a1457f2..0c8aab26b0 100644
--- a/apps/docs/content/docs/install-agent-runtime.ja.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.ja.mdx
@@ -30,6 +30,7 @@ Multica は現在、次のコマンドを検出します。
| OpenCode | `opencode` | [OpenCode クイックスタート](https://opencode.ai/en/docs) |
| Pi coding agent | `pi` | [Pi coding agent](https://github.com/earendil-works/pi) |
| Qoder CLI | `qodercli` | [Qoder CLI クイックスタート](https://docs.qoder.com/en/cli/quick-start) |
+| Qoder CN CLI | `qoderclicn` | [Qoder CN CLI クイックスタート](https://help.aliyun.com/en/lingma/qodercli-cn/user-guide/qoder-cli-cn-get-started-quickly) |
| Qwen Code | `qwen` | [Qwen Code](https://github.com/QwenLM/qwen-code) |
| TRAE CLI | `traecli` | [TRAE 公式サイト](https://www.trae.cn/) |
diff --git a/apps/docs/content/docs/install-agent-runtime.ko.mdx b/apps/docs/content/docs/install-agent-runtime.ko.mdx
index 14b37e18ab..b57555edcd 100644
--- a/apps/docs/content/docs/install-agent-runtime.ko.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.ko.mdx
@@ -30,6 +30,7 @@ Multica는 현재 다음 명령을 감지합니다.
| OpenCode | `opencode` | [OpenCode 빠른 시작](https://opencode.ai/en/docs) |
| Pi coding agent | `pi` | [Pi coding agent](https://github.com/earendil-works/pi) |
| Qoder CLI | `qodercli` | [Qoder CLI 빠른 시작](https://docs.qoder.com/en/cli/quick-start) |
+| Qoder CN CLI | `qoderclicn` | [Qoder CN CLI 빠른 시작](https://help.aliyun.com/en/lingma/qodercli-cn/user-guide/qoder-cli-cn-get-started-quickly) |
| Qwen Code | `qwen` | [Qwen Code](https://github.com/QwenLM/qwen-code) |
| TRAE CLI | `traecli` | [TRAE 공식 사이트](https://www.trae.cn/) |
diff --git a/apps/docs/content/docs/install-agent-runtime.mdx b/apps/docs/content/docs/install-agent-runtime.mdx
index 08c5cef6a3..8e5280129a 100644
--- a/apps/docs/content/docs/install-agent-runtime.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.mdx
@@ -30,6 +30,7 @@ Multica currently detects these commands:
| OpenCode | `opencode` | [OpenCode quickstart](https://opencode.ai/en/docs) |
| Pi coding agent | `pi` | [Pi coding agent](https://github.com/earendil-works/pi) |
| Qoder CLI | `qodercli` | [Qoder CLI quickstart](https://docs.qoder.com/en/cli/quick-start) |
+| Qoder CN CLI | `qoderclicn` | [Qoder CN CLI quickstart](https://help.aliyun.com/en/lingma/qodercli-cn/user-guide/qoder-cli-cn-get-started-quickly) |
| Qwen Code | `qwen` | [Qwen Code](https://github.com/QwenLM/qwen-code) |
| TRAE CLI | `traecli` | [TRAE official site](https://www.trae.cn/) |
diff --git a/apps/docs/content/docs/install-agent-runtime.zh.mdx b/apps/docs/content/docs/install-agent-runtime.zh.mdx
index d86d92d871..b1974141fd 100644
--- a/apps/docs/content/docs/install-agent-runtime.zh.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.zh.mdx
@@ -30,6 +30,7 @@ Multica 当前会检测以下命令:
| OpenCode | `opencode` | [OpenCode 快速开始](https://opencode.ai/en/docs) |
| Pi coding agent | `pi` | [Pi coding agent](https://github.com/earendil-works/pi) |
| Qoder CLI | `qodercli` | [Qoder CLI 快速开始](https://docs.qoder.com/en/cli/quick-start) |
+| Qoder CN CLI | `qoderclicn` | [Qoder CN CLI 快速开始](https://help.aliyun.com/zh/lingma/qodercli-cn/user-guide/qoder-cli-cn-get-started-quickly) |
| Qwen Code | `qwen` | [Qwen Code](https://github.com/QwenLM/qwen-code) |
| TRAE CLI | `traecli` | [TRAE 官方站](https://www.trae.cn/) |
diff --git a/apps/docs/content/docs/providers.ja.mdx b/apps/docs/content/docs/providers.ja.mdx
index a90187d0e5..cebd6e9bcd 100644
--- a/apps/docs/content/docs/providers.ja.mdx
+++ b/apps/docs/content/docs/providers.ja.mdx
@@ -35,6 +35,7 @@ Multica は、普段使っている AI コーディングツールの代わり
| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
| Pi | `pi` | ✓ | — | `.pi/skills/` |
| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
diff --git a/apps/docs/content/docs/providers.ko.mdx b/apps/docs/content/docs/providers.ko.mdx
index cf2000c237..9f2ed1318c 100644
--- a/apps/docs/content/docs/providers.ko.mdx
+++ b/apps/docs/content/docs/providers.ko.mdx
@@ -35,6 +35,7 @@ Multica는 사용 중인 AI 코딩 도구를 대체하지 않습니다. 런타
| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
| Pi | `pi` | ✓ | — | `.pi/skills/` |
| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
diff --git a/apps/docs/content/docs/providers.mdx b/apps/docs/content/docs/providers.mdx
index 0255660ea1..8fe3012320 100644
--- a/apps/docs/content/docs/providers.mdx
+++ b/apps/docs/content/docs/providers.mdx
@@ -35,6 +35,7 @@ Install steps are in [Install AI coding tools](/install-agent-runtime).
| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
| Pi | `pi` | ✓ | — | `.pi/skills/` |
| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
diff --git a/apps/docs/content/docs/providers.zh.mdx b/apps/docs/content/docs/providers.zh.mdx
index a1ae53f42a..f92937202c 100644
--- a/apps/docs/content/docs/providers.zh.mdx
+++ b/apps/docs/content/docs/providers.zh.mdx
@@ -35,6 +35,7 @@ Multica 不会替代你使用的 AI 编程工具。运行时会调用电脑上
| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
| Pi | `pi` | ✓ | — | `.pi/skills/` |
| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
diff --git a/docs/product-overview.md b/docs/product-overview.md
index 56c51af9ff..85b0def184 100644
--- a/docs/product-overview.md
+++ b/docs/product-overview.md
@@ -291,7 +291,7 @@ Agent 是 Multica 的灵魂。几乎所有功能都围绕"如何让一个 agent
`multica` CLI 在用户的机器上启动一个后台进程(macOS launchd / Linux systemd / Windows 服务风格),它:
-1. **自动探测** `$PATH` 上安装的 coding CLI(`claude`, `codex`, `opencode`, `openclaw`, `hermes`, `pi`, `cursor-agent`, `kimi`, `kiro-cli`, `qodercli`, `traecli`, `grok`)
+1. **自动探测** `$PATH` 上安装的 coding CLI(`claude`, `codex`, `opencode`, `openclaw`, `hermes`, `pi`, `cursor-agent`, `kimi`, `kiro-cli`, `qodercli`, `qoderclicn`, `traecli`, `grok`)
2. 向 server **注册** 为一组 runtime(一个 CLI = 一个 runtime)
3. 每 3 秒 **轮询** 一次 server,有任务就认领
4. 每 15 秒 **心跳**(keepalive),报告自己还活着
diff --git a/packages/core/agents/mcp-support.test.ts b/packages/core/agents/mcp-support.test.ts
index 4f60297ea7..d3df424095 100644
--- a/packages/core/agents/mcp-support.test.ts
+++ b/packages/core/agents/mcp-support.test.ts
@@ -14,6 +14,7 @@ describe("providerSupportsMcpConfig", () => {
expect(providerSupportsMcpConfig("opencode")).toBe(true);
expect(providerSupportsMcpConfig("openclaw")).toBe(true);
expect(providerSupportsMcpConfig("qoder")).toBe(true);
+ expect(providerSupportsMcpConfig("qoderclicn")).toBe(true);
expect(providerSupportsMcpConfig("qwen")).toBe(true);
expect(providerSupportsMcpConfig("traecli")).toBe(true);
expect(providerSupportsMcpConfig("grok")).toBe(true);
diff --git a/packages/core/agents/mcp-support.ts b/packages/core/agents/mcp-support.ts
index 4a9533173f..94f0a87c2b 100644
--- a/packages/core/agents/mcp-support.ts
+++ b/packages/core/agents/mcp-support.ts
@@ -17,6 +17,7 @@ const MCP_SUPPORTED_PROVIDERS = new Set([
"opencode",
"openclaw",
"qoder",
+ "qoderclicn",
"qwen",
"traecli",
]);
diff --git a/packages/core/runtimes/display.test.ts b/packages/core/runtimes/display.test.ts
index fa6e4ac4e7..6b3bb344dd 100644
--- a/packages/core/runtimes/display.test.ts
+++ b/packages/core/runtimes/display.test.ts
@@ -63,8 +63,15 @@ describe("runtimeDisplayLabel", () => {
});
it("uses the daemon's provider display name for overridden slugs", () => {
- // Trae and Qwen use display names that differ from title-cased slugs;
+ // Qoder CN, Trae, and Qwen use display names that differ from title-cased slugs;
// aliases must match the daemon's no-alias names.
+ expect(
+ runtimeDisplayLabel({
+ name: "Qoder CN (host)",
+ custom_name: "box",
+ provider: "qoderclicn",
+ }),
+ ).toBe("box (Qoder CN)");
expect(
runtimeDisplayLabel({
name: "Trae (host)",
diff --git a/packages/core/runtimes/display.ts b/packages/core/runtimes/display.ts
index 166979d22d..3aa6fc570f 100644
--- a/packages/core/runtimes/display.ts
+++ b/packages/core/runtimes/display.ts
@@ -36,11 +36,12 @@ export function runtimeDisplayLabel(
* slug. This MUST mirror the daemon's `runtimeDisplayNameOverrides`
* (server/internal/daemon/daemon.go): the daemon bakes that display name into
* `name` for the no-alias case (for example, "Trae (host)"), so the aliased label has to use
- * the exact same names or the two paths drift apart (#5260). `traecli` and `qwen`
- * need overrides today — every other provider is a first-letter
+ * the exact same names or the two paths drift apart (#5260). `qoderclicn`,
+ * `traecli`, and `qwen` need overrides today — every other provider is a first-letter
* capitalization of its slug on both sides. Keep in sync with the daemon map.
*/
const PROVIDER_DISPLAY_NAMES: Record<string, string> = {
+ qoderclicn: "Qoder CN",
traecli: "Trae",
qwen: "Qwen Code",
};
diff --git a/packages/core/types/agent.ts b/packages/core/types/agent.ts
index 599b0a1b83..3b49e0181f 100644
--- a/packages/core/types/agent.ts
+++ b/packages/core/types/agent.ts
@@ -118,6 +118,7 @@ export const RUNTIME_PROFILE_PROTOCOL_FAMILIES = [
"kiro",
"antigravity",
"qoder",
+ "qoderclicn",
"traecli",
"grok",
"qwen",
diff --git a/packages/views/runtimes/components/provider-logo.tsx b/packages/views/runtimes/components/provider-logo.tsx
index a157e2afd9..236b490cc7 100644
--- a/packages/views/runtimes/components/provider-logo.tsx
+++ b/packages/views/runtimes/components/provider-logo.tsx
@@ -328,6 +328,7 @@ export function ProviderLogo({
case "kiro":
return <KiroLogo className={className} />;
case "qoder":
+ case "qoderclicn":
return <QoderLogo className={className} />;
case "antigravity":
return <AntigravityLogo className={className} />;
diff --git a/scripts/agent-cli-command-names.txt b/scripts/agent-cli-command-names.txt
index 3645659db3..6a99ab23c8 100644
--- a/scripts/agent-cli-command-names.txt
+++ b/scripts/agent-cli-command-names.txt
@@ -14,4 +14,5 @@ opencode
pi
qwen
qodercli
+qoderclicn
traecli
diff --git a/server/internal/daemon/agents_probe.go b/server/internal/daemon/agents_probe.go
index 96ec406ea8..d0953a6987 100644
--- a/server/internal/daemon/agents_probe.go
+++ b/server/internal/daemon/agents_probe.go
@@ -199,6 +199,13 @@ var probeAgentCLIs = func() map[string]AgentEntry {
if e, ok := probe("MULTICA_QODER_PATH", "qodercli", "MULTICA_QODER_MODEL"); ok {
agents["qoder"] = e
}
+ // Qoder CN CLI exposes the same ACP transport as Qoder CLI under a
+ // separate `qoderclicn` binary and account/config root. Register it as an
+ // independent provider so hosts with either or both editions get the
+ // matching runtime without a custom profile.
+ if e, ok := probe("MULTICA_QODERCLICN_PATH", "qoderclicn", "MULTICA_QODERCLICN_MODEL"); ok {
+ agents["qoderclicn"] = e
+ }
// ByteDance official TRAE CLI (the `traecli` binary from https://docs.trae.cn/cli),
// driven over ACP via `traecli acp serve --yolo`. MULTICA_TRAECLI_MODEL seeds
// the daemon-wide default model (a model id from the user's logged-in traecli
diff --git a/server/internal/daemon/agents_probe_qoder_test.go b/server/internal/daemon/agents_probe_qoder_test.go
index 390894fb6d..55d318da3b 100644
--- a/server/internal/daemon/agents_probe_qoder_test.go
+++ b/server/internal/daemon/agents_probe_qoder_test.go
@@ -40,6 +40,34 @@ func TestProbeAgentCLIs_QoderResolvesViaLoginShell(t *testing.T) {
}
}
+func TestProbeAgentCLIs_QoderCNResolvesIndependently(t *testing.T) {
+ orig := resolveAgentsViaLoginShell
+ t.Cleanup(func() { resolveAgentsViaLoginShell = orig })
+ resolveAgentsViaLoginShell = func([]string) map[string]string {
+ return map[string]string{
+ "qodercli": "/fake/bin/qodercli",
+ "qoderclicn": "/fake/bin/qoderclicn",
+ }
+ }
+ resetShellResolveCacheForTest(t)
+ t.Setenv("PATH", "")
+
+ agents := probeAgentCLIs()
+ entry, ok := agents["qoderclicn"]
+ if !ok {
+ t.Fatal("qoderclicn was not discovered via the login-shell fallback")
+ }
+ if entry.Path != "/fake/bin/qoderclicn" {
+ t.Errorf("qoderclicn path = %q, want /fake/bin/qoderclicn", entry.Path)
+ }
+ if entry.Command != "qoderclicn" {
+ t.Errorf("qoderclicn command = %q, want qoderclicn", entry.Command)
+ }
+ if _, ok := agents["qoder"]; !ok {
+ t.Fatal("qodercli and qoderclicn must be registered independently when both are installed")
+ }
+}
+
// TestProbeAgentCLIs_QoderPinnedPathStaysHardMiss keeps the fallback from
// rescuing an operator-pinned MULTICA_QODER_PATH. A pinned absolute path that
// no longer exists must stay a miss rather than silently resolve a different
@@ -65,11 +93,14 @@ func TestProbeAgentCLIs_QoderPinnedPathStaysHardMiss(t *testing.T) {
// defaultAgentCommandNames, so omitting "qodercli" would leave the fallback
// permanently blind to Qoder even once the probe consults it.
func TestDefaultAgentCommandNamesIncludesQoder(t *testing.T) {
+ found := map[string]bool{}
for _, name := range defaultAgentCommandNames {
- if name == "qodercli" {
- return
+ found[name] = true
+ }
+ for _, name := range []string{"qodercli", "qoderclicn"} {
+ if !found[name] {
+ t.Fatalf("defaultAgentCommandNames is missing %q; the login-shell resolver "+
+ "only pre-fetches names in that list, so Qoder stays undetectable on a GUI-launched daemon", name)
}
}
- t.Fatal(`defaultAgentCommandNames is missing "qodercli"; the login-shell resolver ` +
- "only pre-fetches names in that list, so Qoder stays undetectable on a GUI-launched daemon")
}
diff --git a/server/internal/daemon/config.go b/server/internal/daemon/config.go
index 596f6880a7..19ceda4fe1 100644
--- a/server/internal/daemon/config.go
+++ b/server/internal/daemon/config.go
@@ -90,7 +90,7 @@ type Config struct {
CLIVersion string // multica CLI version (e.g. "0.1.13")
LaunchedBy string // "desktop" when spawned by the Electron app, empty for standalone
Profile string // profile name (empty = default)
- Agents map[string]AgentEntry // keyed by provider: claude, codebuddy, codex, copilot, opencode, openclaw, hermes, pi, cursor, kimi, kiro, antigravity, qoder, traecli, grok, qwen
+ Agents map[string]AgentEntry // keyed by provider: claude, codebuddy, codex, copilot, opencode, openclaw, hermes, pi, cursor, kimi, kiro, antigravity, qoder, qoderclicn, traecli, grok, qwen
WorkspacesRoot string // base path for execution envs (default: ~/multica_workspaces)
KeepEnvAfterTask bool // preserve env after task for debugging
HealthPort int // local HTTP port for health checks (default: 19514)
@@ -217,7 +217,7 @@ func LoadConfig(overrides Overrides) (Config, error) {
// can re-run the same discovery on a live daemon (MUL-5439).
agents := probeAgentCLIs()
if len(agents) == 0 && !overrides.AllowNoAgents {
- return Config{}, fmt.Errorf("no agent CLI found: install claude, codebuddy, codex, copilot, opencode, deveco, openclaw, hermes, pi, cursor-agent, kimi, kiro-cli, agy, qodercli, traecli, grok, or qwen and ensure it is on PATH")
+ return Config{}, fmt.Errorf("no agent CLI found: install claude, codebuddy, codex, copilot, opencode, deveco, openclaw, hermes, pi, cursor-agent, kimi, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, or qwen and ensure it is on PATH")
}
claudeArgs, err := shellArgsFromEnv("MULTICA_CLAUDE_ARGS")
@@ -731,7 +731,7 @@ func isExecutableFile(path string) bool {
// invocation, instead of paying the cost-per-miss.
var defaultAgentCommandNames = []string{
"claude", "codex", "opencode", "deveco", "openclaw", "hermes",
- "pi", "cursor-agent", "copilot", "kimi", "kiro-cli", "codebuddy", "agy", "qodercli", "traecli", "grok", "qwen",
+ "pi", "cursor-agent", "copilot", "kimi", "kiro-cli", "codebuddy", "agy", "qodercli", "qoderclicn", "traecli", "grok", "qwen",
}
// codexDesktopAppBundlePaths returns candidate macOS app-bundle locations for
diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.go
index 989decf770..47610072ea 100644
--- a/server/internal/daemon/daemon.go
+++ b/server/internal/daemon/daemon.go
@@ -4254,9 +4254,10 @@ func gcMetaForTask(task Task) (execenv.GCMeta, bool) {
// name when simple title-casing would read awkwardly. Providers not listed
// here fall back to capitalizing the key (claude → "Claude", codex → "Codex").
var runtimeDisplayNameOverrides = map[string]string{
- "traecli": "Trae",
- "grok": "Grok",
- "qwen": "Qwen Code",
+ "traecli": "Trae",
+ "grok": "Grok",
+ "qoderclicn": "Qoder CN",
+ "qwen": "Qwen Code",
}
// providerDisplayName returns the human-facing runtime name for a provider key.
@@ -5734,7 +5735,7 @@ func shouldRetryWithFreshSession(result agent.Result, priorSessionID string, too
// why this needs its own branch rather than a phrase added to the
// rejection list.
//
- // It applies to all 17 backends, not the ResumeRejectionUndetectable
+ // It applies to all 18 backends, not the ResumeRejectionUndetectable
// subset below, and that is deliberate: this is the one failure class
// where dropping the session is provably the fix without the backend
// having to detect anything. The evidence is in the provider's own error
diff --git a/server/internal/daemon/daemon_test.go b/server/internal/daemon/daemon_test.go
index c3bae715e7..658fdcf45d 100644
--- a/server/internal/daemon/daemon_test.go
+++ b/server/internal/daemon/daemon_test.go
@@ -2432,7 +2432,7 @@ func TestShouldRetryWithFreshSession_CompatPathIsBackendScoped(t *testing.T) {
})
}
- detectable := []string{"claude", "codebuddy", "qwen", "codex", "grok", "hermes", "kimi", "kiro", "qoder", "traecli", "pi", "openclaw"}
+ detectable := []string{"claude", "codebuddy", "qwen", "codex", "grok", "hermes", "kimi", "kiro", "qoder", "qoderclicn", "traecli", "pi", "openclaw"}
for _, provider := range detectable {
t.Run(provider+" does not retry", func(t *testing.T) {
t.Parallel()
diff --git a/server/internal/daemon/execenv/context.go b/server/internal/daemon/execenv/context.go
index 23f0015c71..d923fbd992 100644
--- a/server/internal/daemon/execenv/context.go
+++ b/server/internal/daemon/execenv/context.go
@@ -130,7 +130,7 @@ func writeWorkspacesRootMarkerAtomic(path string, data []byte) error {
// Cursor: skills → {workDir}/.cursor/skills/{name}/SKILL.md (native discovery)
// Kimi: skills → {workDir}/.kimi/skills/{name}/SKILL.md (native discovery)
// Kiro: skills → {workDir}/.kiro/skills/{name}/SKILL.md (native discovery)
-// Qoder: skills → {workDir}/.qoder/skills/{name}/SKILL.md (project-level; see docs.qoder.com/cli/Skills.md)
+// Qoder/Qoder CN: skills → {workDir}/.qoder/skills/{name}/SKILL.md (project-level; see the provider docs)
// Qwen Code: skills → {workDir}/.qwen/skills/{name}/SKILL.md (native project-level discovery)
// Antigravity: skills → {workDir}/.agents/skills/{name}/SKILL.md (native discovery — see https://antigravity.google/docs/gcli-migration "Workspace skills")
// Default: skills → {workDir}/.agent_context/skills/{name}/SKILL.md
@@ -385,9 +385,10 @@ func skillsDirPath(workDir, provider string) string {
// Kiro CLI auto-discovers project-level skills from .kiro/skills/
// in the workdir.
return filepath.Join(workDir, ".kiro", "skills")
- case "qoder":
- // Qoder CLI discovers project-level skills under .qoder/skills/.
- // See https://docs.qoder.com/cli/Skills.md
+ case "qoder", "qoderclicn":
+ // Both Qoder CLI editions discover project-level skills under
+ // .qoder/skills/. Their user-level roots differ, which is handled by
+ // listRuntimeLocalSkills.
return filepath.Join(workDir, ".qoder", "skills")
case "qwen":
// Qwen Code discovers project-level skills from .qwen/skills/ in the workdir.
diff --git a/server/internal/daemon/execenv/execenv_test.go b/server/internal/daemon/execenv/execenv_test.go
index 37b41d95a2..566a714c74 100644
--- a/server/internal/daemon/execenv/execenv_test.go
+++ b/server/internal/daemon/execenv/execenv_test.go
@@ -1558,6 +1558,33 @@ func TestWriteContextFilesQoderNativeSkills(t *testing.T) {
}
}
+func TestWriteContextFilesQoderCNNativeSkills(t *testing.T) {
+ t.Parallel()
+ dir := t.TempDir()
+
+ ctx := TaskContextForEnv{
+ IssueID: "qoderclicn-skill-test",
+ AgentSkills: []SkillContextForEnv{
+ {Name: "Go Conventions", Content: "Follow Go conventions."},
+ },
+ }
+
+ if err := writeContextFiles(dir, "qoderclicn", ctx, nil); err != nil {
+ t.Fatalf("writeContextFiles failed: %v", err)
+ }
+
+ skillMd, err := os.ReadFile(filepath.Join(dir, ".qoder", "skills", "go-conventions", "SKILL.md"))
+ if err != nil {
+ t.Fatalf("failed to read .qoder/skills/go-conventions/SKILL.md: %v", err)
+ }
+ if !strings.Contains(string(skillMd), "Follow Go conventions.") {
+ t.Error("SKILL.md missing content")
+ }
+ if _, err := os.Stat(filepath.Join(dir, ".agent_context", "skills")); !os.IsNotExist(err) {
+ t.Error("expected .agent_context/skills/ to NOT exist for Qoder CN provider")
+ }
+}
+
func TestWriteContextFilesQwenNativeSkills(t *testing.T) {
t.Parallel()
dir := t.TempDir()
@@ -1684,6 +1711,28 @@ func TestInjectRuntimeConfigQoder(t *testing.T) {
}
}
+func TestInjectRuntimeConfigQoderCN(t *testing.T) {
+ t.Parallel()
+ dir := t.TempDir()
+
+ ctx := TaskContextForEnv{
+ IssueID: "test-qoderclicn-issue-id",
+ AgentSkills: []SkillContextForEnv{{Name: "Coding", Content: "Write good code."}},
+ }
+
+ if _, err := InjectRuntimeConfig(dir, "qoderclicn", ctx); err != nil {
+ t.Fatalf("InjectRuntimeConfig failed: %v", err)
+ }
+
+ content, err := os.ReadFile(filepath.Join(dir, "AGENTS.md"))
+ if err != nil {
+ t.Fatalf("failed to read AGENTS.md: %v", err)
+ }
+ if !strings.Contains(string(content), "Multica Agent Runtime") {
+ t.Error("AGENTS.md missing meta skill header")
+ }
+}
+
// TestInjectRuntimeConfigAntigravity pins that AGENTS.md for Antigravity
// advertises native skill discovery (rather than the .agent_context fallback)
// — the CLI inherits Gemini CLI's workspace skill layout at .agents/skills/.
diff --git a/server/internal/daemon/execenv/runtime_config.go b/server/internal/daemon/execenv/runtime_config.go
index 09b82f7c44..dfd8778a56 100644
--- a/server/internal/daemon/execenv/runtime_config.go
+++ b/server/internal/daemon/execenv/runtime_config.go
@@ -168,7 +168,7 @@ func formatProjectResource(r ProjectResourceForEnv) string {
// For Cursor: writes {workDir}/AGENTS.md (skills discovered natively from .cursor/skills/)
// For Kimi: writes {workDir}/AGENTS.md (Kimi Code CLI reads AGENTS.md natively; skills auto-discovered from project skills dirs)
// For Kiro: writes {workDir}/AGENTS.md (Kiro CLI reads AGENTS.md natively; skills auto-discovered from project skills dirs)
-// For Qoder: writes {workDir}/AGENTS.md (skills discovered from .qoder/skills/, user-level ~/.qoder/skills is unaffected)
+// For Qoder/Qoder CN: writes {workDir}/AGENTS.md (skills discovered from .qoder/skills/; user-level roots are unaffected)
// For Antigravity: writes {workDir}/AGENTS.md (agy CLI reads AGENTS.md natively; skills discovered natively from .agents/skills/ — see https://antigravity.google/docs/gcli-migration)
// For Traecli: writes {workDir}/AGENTS.md (traecli reads .trae/rules/ not AGENTS.md, so the brief is delivered inline via providerNeedsInlineSystemPrompt; the file is written for parity/visibility only)
// For Grok: writes {workDir}/AGENTS.md (Grok Build CLI reads AGENTS.md natively from the workdir)
@@ -201,7 +201,7 @@ func runtimeConfigPath(workDir, provider string) string {
return filepath.Join(workDir, "CODEBUDDY.md")
case "qwen":
return filepath.Join(workDir, "QWEN.md")
- case "codex", "copilot", "opencode", "deveco", "openclaw", "hermes", "pi", "cursor", "kimi", "kiro", "antigravity", "qoder", "traecli", "grok":
+ case "codex", "copilot", "opencode", "deveco", "openclaw", "hermes", "pi", "cursor", "kimi", "kiro", "antigravity", "qoder", "qoderclicn", "traecli", "grok":
return filepath.Join(workDir, "AGENTS.md")
default:
return ""
diff --git a/server/internal/daemon/local_skills.go b/server/internal/daemon/local_skills.go
index ffbf3185c6..f6e4a2d24c 100644
--- a/server/internal/daemon/local_skills.go
+++ b/server/internal/daemon/local_skills.go
@@ -164,6 +164,8 @@ func localSkillRootsForProvider(provider string) ([]localSkillRoot, bool, error)
providerRoot = filepath.Join(home, ".kiro", "skills")
case "qoder":
providerRoot = filepath.Join(home, ".qoder", "skills")
+ case "qoderclicn":
+ providerRoot = filepath.Join(home, ".qoder-cn", "skills")
case "traecli":
// Official TRAE CLI global skills live in ~/.traecli/skills.
// See https://docs.trae.cn/cli_skills
diff --git a/server/internal/daemon/local_skills_test.go b/server/internal/daemon/local_skills_test.go
index b231e47023..66d3ada54e 100644
--- a/server/internal/daemon/local_skills_test.go
+++ b/server/internal/daemon/local_skills_test.go
@@ -284,6 +284,12 @@ func TestLocalSkills_DiscoversACPProviderRoots(t *testing.T) {
wantPath: "~/.qoder/skills/review-helper",
wantName: "Qoder Review",
},
+ {
+ provider: "qoderclicn",
+ root: filepath.Join(".qoder-cn", "skills"),
+ wantPath: "~/.qoder-cn/skills/review-helper",
+ wantName: "Qoder CN Review",
+ },
{
provider: "qwen",
root: filepath.Join(".qwen", "skills"),
diff --git a/server/internal/daemon/runtime_profile_test.go b/server/internal/daemon/runtime_profile_test.go
index 4094d3227d..f17e9b0159 100644
--- a/server/internal/daemon/runtime_profile_test.go
+++ b/server/internal/daemon/runtime_profile_test.go
@@ -177,6 +177,30 @@ func TestRegisterRuntimes_IncludesBuiltInQwen(t *testing.T) {
}
}
+func TestRegisterRuntimes_IncludesBuiltInQoderCN(t *testing.T) {
+ t.Cleanup(stubAgentVersion(t))
+ fx := newProfileRegisterFixture(t, nil, http.StatusOK)
+ d := fx.daemon
+ d.cfg.Agents = map[string]AgentEntry{
+ "qoderclicn": {Path: "/usr/bin/true", Command: "qoderclicn"},
+ }
+
+ resp, _, err := d.registerRuntimesForWorkspace(context.Background(), "ws-1")
+ if err != nil {
+ t.Fatalf("registerRuntimesForWorkspace: %v", err)
+ }
+ if len(fx.sentRuntimes) != 1 {
+ t.Fatalf("sent runtimes = %d, want 1: %+v", len(fx.sentRuntimes), fx.sentRuntimes)
+ }
+ sent := fx.sentRuntimes[0]
+ if sent["type"] != "qoderclicn" || sent["name"] != "Qoder CN" || sent["version"] != "9.9.9" || sent["status"] != "online" {
+ t.Fatalf("registered Qoder CN runtime = %+v", sent)
+ }
+ if len(resp.Runtimes) != 1 || resp.Runtimes[0].Provider != "qoderclicn" {
+ t.Fatalf("register response = %+v", resp)
+ }
+}
+
func TestRegisterRuntimes_AppendsProfileRuntime(t *testing.T) {
t.Cleanup(stubAgentVersion(t))
stubLookPath(t, map[string]string{"company-codex": "/opt/bin/company-codex"})
diff --git a/server/internal/metrics/labels.go b/server/internal/metrics/labels.go
index 58fd87d16a..c4cea46027 100644
--- a/server/internal/metrics/labels.go
+++ b/server/internal/metrics/labels.go
@@ -132,7 +132,10 @@ var (
"opencode": "opencode",
"deveco": "deveco",
"pi": "pi",
+ "qoder": "qoder",
+ "qoderclicn": "qoderclicn",
"qwen": "qwen",
+ "traecli": "traecli",
"other": "other",
}
knownTerminalStatuses = map[string]string{
diff --git a/server/internal/metrics/labels_test.go b/server/internal/metrics/labels_test.go
index 120b9842f2..bb8d474b58 100644
--- a/server/internal/metrics/labels_test.go
+++ b/server/internal/metrics/labels_test.go
@@ -12,9 +12,20 @@ func TestBusinessMetricLabelsRejectHighCardinalityNames(t *testing.T) {
}
}
-func TestNormalizeRuntimeProviderRecognizesQwen(t *testing.T) {
- if got := NormalizeRuntimeProvider("QWEN"); got != "qwen" {
- t.Fatalf("NormalizeRuntimeProvider(QWEN) = %q, want qwen", got)
+func TestNormalizeRuntimeProviderRecognizesKnownProviders(t *testing.T) {
+ tests := []struct {
+ input string
+ want string
+ }{
+ {input: "QWEN", want: "qwen"},
+ {input: "Qoder", want: "qoder"},
+ {input: "QODERCLICN", want: "qoderclicn"},
+ {input: "TraeCLI", want: "traecli"},
+ }
+ for _, tt := range tests {
+ if got := NormalizeRuntimeProvider(tt.input); got != tt.want {
+ t.Errorf("NormalizeRuntimeProvider(%q) = %q, want %q", tt.input, got, tt.want)
+ }
}
}
diff --git a/server/migrations/242_runtime_profile_add_qoderclicn.down.sql b/server/migrations/242_runtime_profile_add_qoderclicn.down.sql
new file mode 100644
index 0000000000..537e8a8692
--- /dev/null
+++ b/server/migrations/242_runtime_profile_add_qoderclicn.down.sql
@@ -0,0 +1,25 @@
+-- Restore the pre-242 whitelist (with Qwen Code, without Qoder CN CLI).
+-- NOT VALID keeps rollback compatible with historical rows the prior
+-- migrations allowed.
+ALTER TABLE runtime_profile DROP CONSTRAINT IF EXISTS runtime_profile_protocol_family_check;
+
+ALTER TABLE runtime_profile ADD CONSTRAINT runtime_profile_protocol_family_check
+ CHECK (protocol_family IN (
+ 'claude',
+ 'codebuddy',
+ 'codex',
+ 'copilot',
+ 'opencode',
+ 'openclaw',
+ 'hermes',
+ 'pi',
+ 'cursor',
+ 'kimi',
+ 'kiro',
+ 'antigravity',
+ 'qoder',
+ 'traecli',
+ 'deveco',
+ 'grok',
+ 'qwen'
+ )) NOT VALID;
diff --git a/server/migrations/242_runtime_profile_add_qoderclicn.up.sql b/server/migrations/242_runtime_profile_add_qoderclicn.up.sql
new file mode 100644
index 0000000000..32834ef03a
--- /dev/null
+++ b/server/migrations/242_runtime_profile_add_qoderclicn.up.sql
@@ -0,0 +1,27 @@
+-- Add Qoder CN CLI (`qoderclicn`) as a protocol family. It reuses the Qoder
+-- ACP backend while retaining a distinct command, account, and config root.
+-- NOT VALID preserves the historical-row tolerance used by prior family
+-- additions.
+ALTER TABLE runtime_profile DROP CONSTRAINT IF EXISTS runtime_profile_protocol_family_check;
+
+ALTER TABLE runtime_profile ADD CONSTRAINT runtime_profile_protocol_family_check
+ CHECK (protocol_family IN (
+ 'claude',
+ 'codebuddy',
+ 'codex',
+ 'copilot',
+ 'opencode',
+ 'openclaw',
+ 'hermes',
+ 'pi',
+ 'cursor',
+ 'kimi',
+ 'kiro',
+ 'antigravity',
+ 'qoder',
+ 'qoderclicn',
+ 'traecli',
+ 'deveco',
+ 'grok',
+ 'qwen'
+ )) NOT VALID;
diff --git a/server/pkg/agent/acp_deliverable_test.go b/server/pkg/agent/acp_deliverable_test.go
index 1c2f796b8e..4d43d9ee71 100644
--- a/server/pkg/agent/acp_deliverable_test.go
+++ b/server/pkg/agent/acp_deliverable_test.go
@@ -170,6 +170,7 @@ var acpDeliverableCases = []acpDeliverableCase{
{backend: "grok", binary: "grok", notification: "session/update"},
{backend: "kiro", binary: "kiro-cli", notification: "session/notification", camelUpdates: true},
{backend: "qoder", binary: "qodercli", notification: "session/notification", camelUpdates: true},
+ {backend: "qoderclicn", binary: "qoderclicn", notification: "session/notification", camelUpdates: true},
}
const (
diff --git a/server/pkg/agent/agent.go b/server/pkg/agent/agent.go
index fc8fb93eba..71aa576621 100644
--- a/server/pkg/agent/agent.go
+++ b/server/pkg/agent/agent.go
@@ -206,7 +206,7 @@ type Result struct {
// Config configures a Backend instance.
type Config struct {
- ExecutablePath string // path to CLI binary (claude, codebuddy, codex, copilot, opencode, openclaw, hermes, pi, cursor, kimi, kiro-cli, agy, qodercli, traecli, grok, qwen)
+ ExecutablePath string // path to CLI binary (claude, codebuddy, codex, copilot, opencode, openclaw, hermes, pi, cursor, kimi, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen)
CLIVersion string // detected version paired with ExecutablePath; observation only, never used to choose behavior
Env map[string]string // extra environment variables
Logger *slog.Logger
@@ -217,18 +217,19 @@ type Config struct {
}
// New creates a Backend for the given agent type.
-// Supported types: "claude", "codebuddy", "codex", "copilot", "opencode", "deveco", "openclaw", "hermes", "pi", "cursor", "kimi", "kiro", "antigravity", "qoder", "traecli", "grok", "qwen".
+// Supported types: "claude", "codebuddy", "codex", "copilot", "opencode", "deveco", "openclaw", "hermes", "pi", "cursor", "kimi", "kiro", "antigravity", "qoder", "qoderclicn", "traecli", "grok", "qwen".
//
// SupportedTypes is the canonical whitelist of agent types eligible to back a
// custom runtime profile. It MUST stay in lockstep with the
// runtime_profile.protocol_family CHECK constraint (migration 120, widened by
// migration 134 to add qoder, migration 136 to add traecli, migration 175 to
-// add deveco, migration 179 to add grok, and migration 202 to add qwen): a
+// add deveco, migration 179 to add grok, migration 202 to add qwen, and
+// migration 242 to add qoderclicn): a
// custom runtime profile may only
// be based on a backend Multica officially supports.
-// qoder is exposed here so Qoder CN (`qoderclicn`) users can point the Qoder
-// backend at a non-default binary instead of misrouting through Kiro/ACP with
-// incompatible arguments (#4883). traecli (Trae) has a New backend, launch
+// qoder and qoderclicn share the same ACP backend; keeping both provider keys
+// lets the daemon auto-detect and register the international and China-region
+// binaries independently. traecli (Trae) has a New backend, launch
// header and provider branding but was previously missing from this whitelist,
// so the family picker rejected it (#4945). grok is the xAI Grok Build CLI
// ACP backend (`grok agent --always-approve stdio`). qwen is Qwen Code's
@@ -248,6 +249,7 @@ var SupportedTypes = []string{
"kiro",
"antigravity",
"qoder",
+ "qoderclicn",
"traecli",
"grok",
"qwen",
@@ -324,8 +326,8 @@ func New(agentType string, cfg Config) (Backend, error) {
return &kiroBackend{cfg: cfg}, nil
case "antigravity":
return &antigravityBackend{cfg: cfg}, nil
- case "qoder":
- return &qoderBackend{cfg: cfg}, nil
+ case "qoder", "qoderclicn":
+ return &qoderBackend{cfg: cfg, defaultExecutable: qoderDefaultBinary(agentType)}, nil
case "traecli":
return &traecliBackend{cfg: cfg}, nil
case "grok":
@@ -333,7 +335,7 @@ func New(agentType string, cfg Config) (Backend, error) {
case "qwen":
return &qwenBackend{cfg: cfg}, nil
default:
- return nil, fmt.Errorf("unknown agent type: %q (supported: claude, codebuddy, codex, copilot, opencode, deveco, openclaw, hermes, pi, cursor, kimi, kiro, antigravity, qoder, traecli, grok, qwen)", agentType)
+ return nil, fmt.Errorf("unknown agent type: %q (supported: claude, codebuddy, codex, copilot, opencode, deveco, openclaw, hermes, pi, cursor, kimi, kiro, antigravity, qoder, qoderclicn, traecli, grok, qwen)", agentType)
}
}
@@ -363,6 +365,7 @@ var launchHeaders = map[string]string{
"opencode": "opencode run (json)",
"pi": "pi (json mode)",
"qoder": "qodercli --acp",
+ "qoderclicn": "qoderclicn --acp",
"traecli": "traecli acp serve",
"grok": "grok agent stdio",
"qwen": "qwen -p (stream-json)",
diff --git a/server/pkg/agent/agent_supported_types_test.go b/server/pkg/agent/agent_supported_types_test.go
index 6ca5d4184a..0ff2183351 100644
--- a/server/pkg/agent/agent_supported_types_test.go
+++ b/server/pkg/agent/agent_supported_types_test.go
@@ -40,7 +40,7 @@ func TestSupportedTypesMatchesMigrationWhitelist(t *testing.T) {
"claude": true, "codebuddy": true, "codex": true, "copilot": true,
"opencode": true, "deveco": true, "openclaw": true, "hermes": true,
"pi": true, "cursor": true, "kimi": true, "kiro": true, "antigravity": true,
- "qoder": true, "traecli": true, "grok": true, "qwen": true,
+ "qoder": true, "qoderclicn": true, "traecli": true, "grok": true, "qwen": true,
}
if len(SupportedTypes) != len(want) {
t.Fatalf("SupportedTypes has %d entries, migration whitelist has %d; keep them in lockstep", len(SupportedTypes), len(want))
diff --git a/server/pkg/agent/agent_test.go b/server/pkg/agent/agent_test.go
index 1f03e64bba..f04ef4cb5b 100644
--- a/server/pkg/agent/agent_test.go
+++ b/server/pkg/agent/agent_test.go
@@ -62,9 +62,28 @@ func TestNewReturnsQoderBackend(t *testing.T) {
if err != nil {
t.Fatalf("New(qoder) error: %v", err)
}
- if _, ok := b.(*qoderBackend); !ok {
+ qoder, ok := b.(*qoderBackend)
+ if !ok {
t.Fatalf("expected *qoderBackend, got %T", b)
}
+ if qoder.defaultExecutable != "qodercli" {
+ t.Fatalf("default executable = %q, want qodercli", qoder.defaultExecutable)
+ }
+}
+
+func TestNewReturnsQoderCNBackend(t *testing.T) {
+ t.Parallel()
+ b, err := New("qoderclicn", Config{})
+ if err != nil {
+ t.Fatalf("New(qoderclicn) error: %v", err)
+ }
+ qoder, ok := b.(*qoderBackend)
+ if !ok {
+ t.Fatalf("expected *qoderBackend, got %T", b)
+ }
+ if qoder.defaultExecutable != "qoderclicn" {
+ t.Fatalf("default executable = %q, want qoderclicn", qoder.defaultExecutable)
+ }
}
func TestNewReturnsAntigravityBackend(t *testing.T) {
diff --git a/server/pkg/agent/models.go b/server/pkg/agent/models.go
index 01b2dec7b1..ba787539e7 100644
--- a/server/pkg/agent/models.go
+++ b/server/pkg/agent/models.go
@@ -173,9 +173,9 @@ func ListModels(ctx context.Context, providerType, executablePath string) (Catal
return cachedDiscovery(providerType, func() (Catalog, error) {
return discovered(discoverKiroModels(ctx, executablePath))
})
- case "qoder":
+ case "qoder", "qoderclicn":
return cachedDiscovery(providerType, func() (Catalog, error) {
- return discovered(discoverQoderModels(ctx, executablePath))
+ return discovered(discoverQoderModels(ctx, executablePath, qoderDefaultBinary(providerType)))
})
case "opencode":
return cachedDiscovery(discoveryCacheKey(providerType, executablePath), func() (Catalog, error) {
@@ -927,10 +927,11 @@ func discoverCopilotModels(ctx context.Context, executablePath string) (Catalog,
return Catalog{Models: models}, nil
}
-// discoverQoderModels spins up `qodercli --yolo --acp` and parses models from session/new.
-func discoverQoderModels(ctx context.Context, executablePath string) ([]Model, error) {
+// discoverQoderModels spins up a Qoder CLI binary with `--yolo --acp` and
+// parses models from session/new.
+func discoverQoderModels(ctx context.Context, executablePath, defaultBin string) ([]Model, error) {
return discoverACPModels(ctx, executablePath, acpDiscoveryProvider{
- defaultBin: "qodercli",
+ defaultBin: defaultBin,
clientName: "multica-model-discovery",
acpArgs: []string{"--yolo", "--acp"},
tmpdirPrefix: "multica-qoder-discovery-",
diff --git a/server/pkg/agent/models_test.go b/server/pkg/agent/models_test.go
index 3712c8a49f..d46364a197 100644
--- a/server/pkg/agent/models_test.go
+++ b/server/pkg/agent/models_test.go
@@ -408,6 +408,21 @@ func TestListModelsQoderWithoutBinary(t *testing.T) {
}
}
+func TestListModelsQoderCNWithoutBinary(t *testing.T) {
+ ctx := context.Background()
+ modelCacheMu.Lock()
+ delete(modelCache, "qoderclicn")
+ modelCacheMu.Unlock()
+
+ got, err := ListModels(ctx, "qoderclicn", missingAgentExecutable(t, "qoderclicn"))
+ if err != nil {
+ t.Fatalf("ListModels(qoderclicn) error: %v", err)
+ }
+ if got.Models == nil {
+ t.Error("expected non-nil slice even when binary is missing")
+ }
+}
+
func TestListModelsUnknownProvider(t *testing.T) {
ctx := context.Background()
_, err := ListModels(ctx, "nonexistent", "")
diff --git a/server/pkg/agent/qoder.go b/server/pkg/agent/qoder.go
index bdc5bce64c..ef96d6c079 100644
--- a/server/pkg/agent/qoder.go
+++ b/server/pkg/agent/qoder.go
@@ -24,16 +24,24 @@ var qoderBlockedArgs = map[string]blockedArgMode{
"--yolo": blockedStandalone,
}
-// qoderBackend implements Backend by spawning `qodercli --yolo --acp` and
-// communicating via the ACP (Agent Communication Protocol) JSON-RPC 2.0
-// transport over stdin/stdout.
+// qoderBackend implements Backend for both Qoder CLI binaries by spawning
+// `<binary> --yolo --acp` and communicating via the ACP (Agent Communication
+// Protocol) JSON-RPC 2.0 transport over stdin/stdout.
//
// Qoder CLI uses global flags (`--yolo`, `--acp`), not an `acp` subcommand. We
// reuse hermesClient like Hermes/Kimi/Kiro and mirror their streaming gate so
// history replay flushed during session/setup does not corrupt the streamed
// output or leave the UI stuck on a stale assistant chunk.
type qoderBackend struct {
- cfg Config
+ cfg Config
+ defaultExecutable string
+}
+
+func qoderDefaultBinary(providerType string) string {
+ if providerType == "qoderclicn" {
+ return "qoderclicn"
+ }
+ return "qodercli"
}
var qoderReaderDrainGrace = 2 * time.Second
@@ -70,10 +78,10 @@ func (s *qoderMessageStream) close() {
func (b *qoderBackend) Execute(ctx context.Context, prompt string, opts ExecOptions) (*Session, error) {
execPath := b.cfg.ExecutablePath
if execPath == "" {
- execPath = "qodercli"
+ execPath = b.defaultExecutable
}
if _, err := exec.LookPath(execPath); err != nil {
- return nil, fmt.Errorf("qoder executable not found at %q: %w", execPath, err)
+ return nil, fmt.Errorf("%s executable not found at %q: %w", b.defaultExecutable, execPath, err)
}
// Translate the agent's mcp_config (Claude-style object of objects) into
diff --git a/server/pkg/agent/qoder_test.go b/server/pkg/agent/qoder_test.go
index b309448fcd..9f2fd416b3 100644
--- a/server/pkg/agent/qoder_test.go
+++ b/server/pkg/agent/qoder_test.go
@@ -129,6 +129,24 @@ done
`
}
+func TestQoderCNBackendMissingExecutableNamesQoderCNBinary(t *testing.T) {
+ t.Parallel()
+
+ missingPath := missingAgentExecutable(t, "qoderclicn")
+ backend, err := New("qoderclicn", Config{ExecutablePath: missingPath})
+ if err != nil {
+ t.Fatalf("new Qoder CN backend: %v", err)
+ }
+
+ _, err = backend.Execute(context.Background(), "hello", ExecOptions{})
+ if err == nil {
+ t.Fatal("Execute() error = nil, want missing executable error")
+ }
+ if !strings.Contains(err.Error(), "qoderclicn executable not found") {
+ t.Fatalf("Execute() error = %q, want qoderclicn executable label", err)
+ }
+}
+
func fakeQoderACPScriptWithLeakedStdout() string {
return `#!/bin/sh
# Fake qodercli that returns session/prompt but leaves stdout open via a child
diff --git a/server/pkg/agent/version_test.go b/server/pkg/agent/version_test.go
index 95915ea4c4..040e3e0b15 100644
--- a/server/pkg/agent/version_test.go
+++ b/server/pkg/agent/version_test.go
@@ -171,6 +171,7 @@ func TestCheckMinVersion(t *testing.T) {
{"grok", "0.2.89", false},
{"grok", "0.2.0", true},
{"grok", "0.1.9", true},
+ {"qoderclicn", "unverified-version-format", false},
{"qwen", "0.20.0", false},
{"qwen", "qwen 0.20.1", false},
{"qwen", "0.19.9", true},