Skip to content

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

Go

feat(agent): add Huawei Cloud CodeArts support (#6985)

mikyanfe5926218820
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 01e6b56d31..8f5378a993 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -655,7 +655,7 @@ jobs:
# still reports cleanup as unconfirmed, and that a descendant holding
# inherited stdout neither keeps Result blocked nor survives cleanup.
# -v makes RUN/PASS evidence explicit in CI logs.
- run: go test ./pkg/agent -v -run '^(TestStartOwnedProcessTreeCapturesImmediateDescendants|TestStartOwnedProcessTreeLeavesNoSuspendedChild|TestWaitProcessGroupGoneWithoutOwnershipReportsUnconfirmed|TestCodexInitializeRetrySupportedWithOwnedProcessTree|TestCodexWindowsDescendantsDieWithTheOwnedProcessTree)$' -count=1 -timeout=5m
+ run: go test ./pkg/agent -v -run '^(TestStartOwnedProcessTreeCapturesImmediateDescendants|TestStartOwnedProcessTreeLeavesNoSuspendedChild|TestWaitProcessGroupGoneWithoutOwnershipReportsUnconfirmed|TestCodexInitializeRetrySupportedWithOwnedProcessTree|TestCodexWindowsDescendantsDieWithTheOwnedProcessTree|TestCodeArtsWindowsCancellationTerminatesDescendants)$' -count=1 -timeout=5m
- name: Test bounded CLI output collection on Windows
if: ${{ needs.changes.outputs.backend == 'true' }}
diff --git a/CLI_AND_DAEMON.md b/CLI_AND_DAEMON.md
index d177b1b8d3..39fbe045da 100644
--- a/CLI_AND_DAEMON.md
+++ b/CLI_AND_DAEMON.md
@@ -207,6 +207,7 @@ The daemon auto-detects these AI CLIs on your PATH:
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `claude` | Anthropic's coding agent |
| [Antigravity CLI](https://antigravity.google/docs/cli-install) | `agy` | Google Antigravity CLI |
| [CodeBuddy Code](https://www.codebuddy.ai/docs/cli/quickstart) | `codebuddy` | Tencent CodeBuddy Code (reads `CODEBUDDY.md`, not `CLAUDE.md`) |
+| [Huawei Cloud CodeArts](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0001.html) | `codearts` | Huawei Cloud coding agent (OpenCode-compatible JSON protocol) |
| [DevEco Code](https://gitcode.com/openharmony-sig/deveco-code) | `deveco` | OpenHarmony DevEco Code |
| [Codex](https://github.com/openai/codex) | `codex` | OpenAI's coding agent |
| [GitHub Copilot CLI](https://docs.github.com/en/copilot) | `copilot` | GitHub's coding agent (model routed by your GitHub entitlement) |
@@ -308,6 +309,8 @@ Agent-specific overrides:
| `MULTICA_CODEBUDDY_PATH` | Custom path to the `codebuddy` binary |
| `MULTICA_CODEBUDDY_MODEL` | Override the CodeBuddy model used |
| `MULTICA_CODEBUDDY_ARGS` | Default extra arguments for CodeBuddy runs |
+| `MULTICA_CODEARTS_PATH` | Custom path to the `codearts` launcher or binary |
+| `MULTICA_CODEARTS_MODEL` | Override the CodeArts model used |
| `MULTICA_DEVECO_PATH` | Custom path to the `deveco` binary |
| `MULTICA_DEVECO_MODEL` | Override the DevEco Code model used |
| `MULTICA_CODEX_PATH` | Custom path to the `codex` binary |
diff --git a/README.md b/README.md
index ad8f28c0cc..4dbb6e0e3e 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
Multica is an open-source workspace where you assign work to AI coding agents the way you'd
assign it to a teammate — they pick up the issue, report progress, raise blockers, and hand it
-back for review. Self-hostable, works with 23 agent CLIs, no lock-in.
+back for review. Self-hostable, works with 26 agent CLIs, no lock-in.
[![CI](https://github.com/multica-ai/multica/actions/workflows/ci.yml/badge.svg)](https://github.com/multica-ai/multica/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/multica-ai/multica?style=flat)](https://github.com/multica-ai/multica/releases)
@@ -52,7 +52,7 @@ issue — so nobody reconstructs context, and nothing ships without a human sayi
*Claude Code, Codex, Cursor, Kimi — you don't pick one. You hire them all.*
-- **[23 agent CLIs](#runtimes) →** Claude Code, Codex, Cursor, Copilot, Kimi, OpenCode, and more.
+- **[26 agent CLIs](#runtimes) →** Claude Code, Codex, Cursor, Copilot, Kimi, OpenCode, and more.
- **[Agents as teammates](https://multica.ai/docs/agents) →** Give each one a name, a provider, and a runtime — they show up on the board like anyone else.
- **[Squads](https://multica.ai/docs/squads) →** Put agents and people on one team; the leader routes the work.
- **[Skills](https://multica.ai/docs/skills) →** Turn a solved problem into a playbook every agent reuses.
@@ -162,8 +162,8 @@ authenticated, so switching providers is a dropdown, not a migration.
| Qwen Code | `qwen` | QwenPaw | `qwenpaw` |
| Reasonix | `reasonix` | Trae CLI | `traecli` |
| DeepSeek Harness | `dsh` | Oh-My-Pi | `omp` |
-| MiniMax Code | `mcode` | — | — |
-| Dim | `dim` | | |
+| MiniMax Code | `mcode` | Dim | `dim` |
+| Huawei Cloud CodeArts | `codearts` | — | — |
Installing and authenticating them: [Install an agent runtime](https://multica.ai/docs/install-agent-runtime) ·
[Providers](https://multica.ai/docs/providers)
@@ -204,7 +204,7 @@ Installing and authenticating them: [Install an agent runtime](https://multica.a
│ spawns
┌──────┴───────────────────────────────┐
│ Claude Code · Codex · Cursor · … │
- │ (any of the 23 runtimes above) │
+ │ (any of the 26 runtimes above) │
└──────────────────────────────────────┘
```
@@ -215,7 +215,7 @@ Installing and authenticating them: [Install an agent runtime](https://multica.a
| Mobile | Expo / React Native (iOS) |
| Backend | Go (Chi router, sqlc, gorilla/websocket) |
| Database | PostgreSQL 17 (`pgcrypto` + `pg_trgm`) |
-| Agent runtime | Local daemon executing any of the 23 agent CLIs above |
+| Agent runtime | Local daemon executing any of the 26 agent CLIs above |
---
diff --git a/README.zh.md b/README.zh.md
index 733e5ad8d3..13245642e2 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -11,7 +11,7 @@
**智能体,也在看板上。**
Multica 是一个开源的团队工作区。你像给同事派活一样,把任务交给 AI 编码智能体——它自己接手、边做边
-汇报、卡住了主动说,做完交回来给你审。可自部署,支持 23 种智能体 CLI,不绑定任何厂商。
+汇报、卡住了主动说,做完交回来给你审。可自部署,支持 26 种智能体 CLI,不绑定任何厂商。
[![CI](https://github.com/multica-ai/multica/actions/workflows/ci.yml/badge.svg)](https://github.com/multica-ai/multica/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/multica-ai/multica?style=flat)](https://github.com/multica-ai/multica/releases)
@@ -49,7 +49,7 @@ diff,全都挂在同一个任务下——没人需要重新捋一遍上下文
*Claude Code、Codex、Cursor、Kimi——不用挑一个,全都招进来。*
-- **[23 种智能体 CLI](#运行时) →** Claude Code、Codex、Cursor、Copilot、Kimi、OpenCode 等等。
+- **[26 种智能体 CLI](#运行时) →** Claude Code、Codex、Cursor、Copilot、Kimi、OpenCode 等等。
- **[智能体也是队友](https://multica.ai/docs/agents) →** 起个名字、选个提供方、配台运行时,它就上了看板,跟其他同事没两样。
- **[小队](https://multica.ai/docs/squads) →** 人和智能体混编成队,leader 决定谁来接活。
- **[Skills](https://multica.ai/docs/skills) →** 解决过一次的问题沉淀下来,全团队的智能体都能复用。
@@ -155,7 +155,8 @@ Multica 不自带模型。它驱动的是你本来就装好、登录好的那些
| Qwen Code | `qwen` | QwenPaw | `qwenpaw` |
| Reasonix | `reasonix` | Trae CLI | `traecli` |
| DeepSeek Harness | `dsh` | Oh-My-Pi | `omp` |
-| Dim | `dim` | | |
+| MiniMax Code | `mcode` | Dim | `dim` |
+| 华为云 CodeArts | `codearts` | | |
怎么装、怎么登录:[安装智能体运行时](https://multica.ai/docs/install-agent-runtime) ·
[AI 编程工具对照](https://multica.ai/docs/providers)
@@ -195,7 +196,7 @@ Multica 不自带模型。它驱动的是你本来就装好、登录好的那些
│ 拉起
┌──────┴───────────────────────────────┐
│ Claude Code · Codex · Cursor · … │
- │ (上面 23 种运行时里的任意一种) │
+ │ (上面 26 种运行时里的任意一种) │
└──────────────────────────────────────┘
```
@@ -206,7 +207,7 @@ Multica 不自带模型。它驱动的是你本来就装好、登录好的那些
| 移动端 | Expo / React Native (iOS) |
| 后端 | Go (Chi router, sqlc, gorilla/websocket) |
| 数据库 | PostgreSQL 17(`pgcrypto` + `pg_trgm`) |
-| 智能体运行时 | 本地守护进程拉起上面 23 种智能体 CLI 中的任意一个 |
+| 智能体运行时 | 本地守护进程拉起上面 26 种智能体 CLI 中的任意一个 |
---
diff --git a/SELF_HOSTING.md b/SELF_HOSTING.md
index 7542eba08a..2392c5a44e 100644
--- a/SELF_HOSTING.md
+++ b/SELF_HOSTING.md
@@ -117,6 +117,7 @@ You also need at least one AI agent CLI installed:
- [GitHub Copilot CLI](https://docs.github.com/en/copilot) (`copilot` on PATH)
- [OpenClaw](https://github.com/openclaw/openclaw) (`openclaw` on PATH)
- [OpenCode](https://github.com/anomalyco/opencode) (`opencode` on PATH)
+- [Huawei Cloud CodeArts](https://support.huaweicloud.com/qs-codeartssnap/codeartsagent_qs_0004.html) (`codearts` on PATH)
- [Hermes](https://github.com/NousResearch/hermes) (`hermes` on PATH)
- [Pi](https://pi.dev/) (`pi` on PATH)
- [Cursor Agent](https://cursor.com/) (`cursor-agent` on PATH)
diff --git a/SELF_HOSTING_ADVANCED.md b/SELF_HOSTING_ADVANCED.md
index 4c7d87c610..a56dd14626 100644
--- a/SELF_HOSTING_ADVANCED.md
+++ b/SELF_HOSTING_ADVANCED.md
@@ -219,6 +219,8 @@ Agent-specific overrides:
| `MULTICA_COPILOT_MODEL` | Override the Copilot model used (note: GitHub Copilot routes models through your account entitlement, so this may not be honoured) |
| `MULTICA_OPENCODE_PATH` | Custom path to the `opencode` binary |
| `MULTICA_OPENCODE_MODEL` | Override the OpenCode model used |
+| `MULTICA_CODEARTS_PATH` | Custom path to the `codearts` launcher or binary |
+| `MULTICA_CODEARTS_MODEL` | Override the CodeArts model used |
| `MULTICA_OPENCLAW_PATH` | Custom path to the `openclaw` binary |
| `MULTICA_OPENCLAW_MODEL` | Override the OpenClaw model used |
| `MULTICA_OPENCLAW_CLI_TIMEOUT` | Deadline for each `openclaw config ...` call during task preparation (default 30s; accepts `45s` or `45`). Raise it when the local CLI is slow to start; the daemon also reads it from `backends.openclaw.cli_timeout` in the CLI config |
diff --git a/apps/docs/content/docs/install-agent-runtime.ja.mdx b/apps/docs/content/docs/install-agent-runtime.ja.mdx
index af1d506589..a0c0a93434 100644
--- a/apps/docs/content/docs/install-agent-runtime.ja.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.ja.mdx
@@ -18,6 +18,7 @@ Multica は現在、次のコマンドを検出します。
| Antigravity CLI | `agy` | [Antigravity のインストールとログイン](https://antigravity.google/docs/cli-install) |
| Claude Code | `claude` | [Claude Code クイックスタート](https://code.claude.com/docs/en/quickstart) |
| CodeBuddy Code | `codebuddy` | [CodeBuddy クイックスタート](https://www.codebuddy.ai/docs/cli/quickstart) |
+| CodeArts | `codearts` | [CodeArts CLI クイックスタート](https://support.huaweicloud.com/qs-codeartssnap/codeartsagent_qs_0004.html) |
| Codex CLI | `codex` | [Codex CLI](https://developers.openai.com/codex/cli/) |
| GitHub Copilot CLI | `copilot` | [Copilot CLI のインストール](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli) |
| Cursor Agent | `cursor-agent` | [Cursor CLI のインストール](https://docs.cursor.com/en/cli/installation) |
@@ -46,6 +47,8 @@ Multica は現在、次のコマンドを検出します。
インストール後、まずターミナルからツールを単独で起動し、各ツールの手順に従ってログインするか、モデルプロバイダーを設定してください。ターミナル上でリクエストを実行できない場合は、デーモンから呼び出しても失敗します。
+CodeArts では、TUI だけでなく `codearts run --model provider/model "OK とだけ返してください"` で非対話モードを確認してください。現在の CodeArts CLI では、カスタム provider が TUI で動作しても、`run`、`models`、`serve` には引き続き [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html) が必要な場合があります。Multica は `~/.codeartsdoer/codearts_cli.json` または `.jsonc` からカスタムモデルを検出できますが、タスク実行には `codearts run` を使用するため、その認証要件に従います。
+
Reasonix を使う場合は、デーモンを起動する前に `reasonix setup` を実行し、デフォルトのプロバイダーとモデルを設定してください。
QwenPaw を使う場合は、QwenPaw 側の設定でプロバイダーとモデルを選んでください。Multica が実行時に QwenPaw のモデルを上書きすることはできません。
diff --git a/apps/docs/content/docs/install-agent-runtime.ko.mdx b/apps/docs/content/docs/install-agent-runtime.ko.mdx
index 66ed27bcea..b9ffa959ea 100644
--- a/apps/docs/content/docs/install-agent-runtime.ko.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.ko.mdx
@@ -18,6 +18,7 @@ Multica는 현재 다음 명령을 감지합니다.
| Antigravity CLI | `agy` | [Antigravity 설치 및 로그인](https://antigravity.google/docs/cli-install) |
| Claude Code | `claude` | [Claude Code 빠른 시작](https://code.claude.com/docs/en/quickstart) |
| CodeBuddy Code | `codebuddy` | [CodeBuddy 빠른 시작](https://www.codebuddy.ai/docs/cli/quickstart) |
+| CodeArts | `codearts` | [CodeArts CLI 빠른 시작](https://support.huaweicloud.com/qs-codeartssnap/codeartsagent_qs_0004.html) |
| Codex CLI | `codex` | [Codex CLI](https://developers.openai.com/codex/cli/) |
| GitHub Copilot CLI | `copilot` | [Copilot CLI 설치](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli) |
| Cursor Agent | `cursor-agent` | [Cursor CLI 설치](https://docs.cursor.com/en/cli/installation) |
@@ -46,6 +47,8 @@ Multica는 현재 다음 명령을 감지합니다.
설치 후 터미널에서 도구를 한 번 직접 실행하고 도구 자체의 절차에 따라 로그인하거나 모델 서비스를 설정합니다. 터미널에서 요청을 완료하지 못하면 데몬이 호출할 때도 실패합니다.
+CodeArts는 TUI뿐 아니라 `codearts run --model provider/model "OK만 응답하세요"`로 비대화형 모드도 확인하세요. 현재 CodeArts CLI에서는 사용자 지정 provider가 TUI에서 동작하더라도 `run`, `models`, `serve`에 여전히 [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html)가 필요할 수 있습니다. Multica는 `~/.codeartsdoer/codearts_cli.json` 또는 `.jsonc`에서 사용자 지정 모델을 찾을 수 있지만, 작업 실행에는 `codearts run`을 사용하므로 해당 인증 요구 사항을 따릅니다.
+
Reasonix를 사용할 때는 데몬을 시작하기 전에 `reasonix setup`을 실행해 기본 공급자와 모델을 설정하세요.
QwenPaw를 사용할 때는 QwenPaw 자체 설정에서 공급자와 모델을 선택하세요. Multica는 실행 시 QwenPaw의 모델을 덮어쓸 수 없습니다.
diff --git a/apps/docs/content/docs/install-agent-runtime.mdx b/apps/docs/content/docs/install-agent-runtime.mdx
index 5de9f366e0..8c485aa446 100644
--- a/apps/docs/content/docs/install-agent-runtime.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.mdx
@@ -18,6 +18,7 @@ Multica currently detects these commands:
| Antigravity CLI | `agy` | [Antigravity install and sign-in](https://antigravity.google/docs/cli-install) |
| Claude Code | `claude` | [Claude Code quickstart](https://code.claude.com/docs/en/quickstart) |
| CodeBuddy Code | `codebuddy` | [CodeBuddy quickstart](https://www.codebuddy.ai/docs/cli/quickstart) |
+| CodeArts | `codearts` | [CodeArts CLI quickstart](https://support.huaweicloud.com/qs-codeartssnap/codeartsagent_qs_0004.html) |
| Codex CLI | `codex` | [Codex CLI](https://developers.openai.com/codex/cli/) |
| GitHub Copilot CLI | `copilot` | [Install Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli) |
| Cursor Agent | `cursor-agent` | [Install Cursor CLI](https://docs.cursor.com/en/cli/installation) |
@@ -46,6 +47,8 @@ Multica currently detects these commands:
After installing, launch the tool once in a terminal on its own and complete its sign-in or model provider setup. If the tool cannot complete requests in the terminal, the daemon's invocations fail the same way.
+For CodeArts, verify the non-interactive path with `codearts run --model provider/model "Reply OK"`, not only the TUI. The current CodeArts CLI can let a custom provider work in the TUI while `run`, `models`, and `serve` still require [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html). Multica can discover custom models from `~/.codeartsdoer/codearts_cli.json` or `.jsonc`, but task execution uses `codearts run` and therefore follows its authorization requirements.
+
For Reasonix, run `reasonix setup` and configure a default provider and model before starting the daemon.
For QwenPaw, choose the provider and model in QwenPaw's own configuration. Multica cannot override a QwenPaw model at run time.
diff --git a/apps/docs/content/docs/install-agent-runtime.zh.mdx b/apps/docs/content/docs/install-agent-runtime.zh.mdx
index 53cf1c988c..c6ec98c6fd 100644
--- a/apps/docs/content/docs/install-agent-runtime.zh.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.zh.mdx
@@ -18,6 +18,7 @@ Multica 当前会检测以下命令:
| Antigravity CLI | `agy` | [Antigravity 安装与登录](https://antigravity.google/docs/cli-install) |
| Claude Code | `claude` | [Claude Code 快速开始](https://code.claude.com/docs/en/quickstart) |
| CodeBuddy Code | `codebuddy` | [CodeBuddy 快速开始](https://www.codebuddy.ai/docs/cli/quickstart) |
+| CodeArts | `codearts` | [CodeArts CLI 快速开始](https://support.huaweicloud.com/qs-codeartssnap/codeartsagent_qs_0004.html) |
| Codex CLI | `codex` | [Codex CLI](https://developers.openai.com/codex/cli/) |
| GitHub Copilot CLI | `copilot` | [安装 Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli) |
| Cursor Agent | `cursor-agent` | [安装 Cursor CLI](https://docs.cursor.com/en/cli/installation) |
@@ -46,6 +47,8 @@ Multica 当前会检测以下命令:
安装后,先在终端中单独启动一次工具,并按照它自己的流程登录或配置模型服务。工具在终端中无法完成请求时,守护进程调用它同样会失败。
+使用 CodeArts 时,请用 `codearts run --model provider/model "只回复 OK"` 验证非交互模式,而不只是验证 TUI。当前 CodeArts CLI 可能允许自定义 provider 在 TUI 中工作,但 `run`、`models` 和 `serve` 仍要求配置 [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html)。Multica 可以从 `~/.codeartsdoer/codearts_cli.json` 或 `.jsonc` 发现自定义模型,但任务执行使用 `codearts run`,因此仍遵循该命令的授权要求。
+
使用 Reasonix 时,请先运行 `reasonix setup`,配置默认的模型服务和模型,再启动守护进程。
使用 QwenPaw 时,请在 QwenPaw 自身的配置里选择模型服务和模型。Multica 无法在执行时覆盖 QwenPaw 的模型。
diff --git a/apps/docs/content/docs/providers.ja.mdx b/apps/docs/content/docs/providers.ja.mdx
index 91538bc743..7dba35a53b 100644
--- a/apps/docs/content/docs/providers.ja.mdx
+++ b/apps/docs/content/docs/providers.ja.mdx
@@ -23,6 +23,7 @@ Multica は、普段使っている AI コーディングツールの代わり
| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
diff --git a/apps/docs/content/docs/providers.ko.mdx b/apps/docs/content/docs/providers.ko.mdx
index 312319440d..28983eb250 100644
--- a/apps/docs/content/docs/providers.ko.mdx
+++ b/apps/docs/content/docs/providers.ko.mdx
@@ -23,6 +23,7 @@ Multica는 사용 중인 AI 코딩 도구를 대체하지 않습니다. 런타
| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
diff --git a/apps/docs/content/docs/providers.mdx b/apps/docs/content/docs/providers.mdx
index 82d22bf91c..1f471f9824 100644
--- a/apps/docs/content/docs/providers.mdx
+++ b/apps/docs/content/docs/providers.mdx
@@ -23,6 +23,7 @@ Install steps are in [Install AI coding tools](/install-agent-runtime).
| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
diff --git a/apps/docs/content/docs/providers.zh.mdx b/apps/docs/content/docs/providers.zh.mdx
index 744cbab199..9fb2c1a0eb 100644
--- a/apps/docs/content/docs/providers.zh.mdx
+++ b/apps/docs/content/docs/providers.zh.mdx
@@ -23,6 +23,7 @@ Multica 不会替代你使用的 AI 编程工具。运行时会调用电脑上
| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
diff --git a/apps/web/features/landing/i18n/en.ts b/apps/web/features/landing/i18n/en.ts
index 92d714a457..c918abb075 100644
--- a/apps/web/features/landing/i18n/en.ts
+++ b/apps/web/features/landing/i18n/en.ts
@@ -101,7 +101,7 @@ export function createEnDict(allowSignup: boolean): LandingDict {
label: "RUNTIMES",
title: "One dashboard for all your compute",
description:
- "Local daemons and cloud runtimes, managed from a single panel. Real-time monitoring of online/offline status, usage charts, and activity heatmaps. Auto-detects 23 supported coding tools on your machine.",
+ "Local daemons and cloud runtimes, managed from a single panel. Real-time monitoring of online/offline status, usage charts, and activity heatmaps. Auto-detects 26 supported coding tools on your machine.",
cards: [
{
title: "Unified runtime panel",
@@ -116,7 +116,7 @@ export function createEnDict(allowSignup: boolean): LandingDict {
{
title: "Auto-detection on first run",
description:
- "Multica scans for 23 supported coding tools \u2014 Antigravity, Claude Code, CodeBuddy, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, and Trae CLI \u2014 and registers a runtime for each one it finds.",
+ "Multica scans for 26 supported coding tools \u2014 Antigravity, Claude Code, CodeBuddy, CodeArts, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, MiniMax Code, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI, and ZeroClaw \u2014 and registers a runtime for each one it finds.",
},
],
},
@@ -136,7 +136,7 @@ export function createEnDict(allowSignup: boolean): LandingDict {
{
title: "Install the CLI & connect your machine",
description:
- "Run multica setup \u2014 it walks you through OAuth, starts the daemon, and scans for the 23 supported coding tools (Antigravity, Claude Code, CodeBuddy, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI). Whichever ones you already have installed get registered as runtimes automatically.",
+ "Run multica setup \u2014 it walks you through OAuth, starts the daemon, and scans for the 26 supported coding tools (Antigravity, Claude Code, CodeBuddy, CodeArts, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, MiniMax Code, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI, ZeroClaw). Whichever ones you already have installed get registered as runtimes automatically.",
},
{
title: "Create your first agent",
@@ -192,7 +192,7 @@ export function createEnDict(allowSignup: boolean): LandingDict {
{
question: "What coding agents does Multica support?",
answer:
- "Multica supports 23 coding tools out of the box: Antigravity, Claude Code, CodeBuddy, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, and Trae CLI. The daemon auto-detects whichever CLIs you already have installed and registers a runtime for each one. Since it's open source, you can also add your own backends.",
+ "Multica supports 26 coding tools out of the box: Antigravity, Claude Code, CodeBuddy, CodeArts, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, MiniMax Code, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI, and ZeroClaw. The daemon auto-detects whichever CLIs you already have installed and registers a runtime for each one. Since it's open source, you can also add your own backends.",
},
{
question: "Do I need to self-host, or is there a cloud version?",
diff --git a/apps/web/features/landing/i18n/ja.ts b/apps/web/features/landing/i18n/ja.ts
index 17ebf2035a..aa7cad2f06 100644
--- a/apps/web/features/landing/i18n/ja.ts
+++ b/apps/web/features/landing/i18n/ja.ts
@@ -118,7 +118,7 @@ export function createJaDict(allowSignup: boolean): LandingDict {
{
title: "初回起動時に自動検出",
description:
- "Multica は Antigravity、Claude Code、CodeBuddy、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI という23種類の対応ツールをスキャンし、見つかったものをそれぞれランタイムとして登録します。",
+ "Multica は Antigravity、Claude Code、CodeBuddy、CodeArts、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、MiniMax Code、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI、ZeroClaw という26種類の対応ツールをスキャンし、見つかったものをそれぞれランタイムとして登録します。",
},
],
},
@@ -139,7 +139,7 @@ export function createJaDict(allowSignup: boolean): LandingDict {
{
title: "CLI をインストールしてマシンを接続",
description:
- "multica setup を実行すると、OAuth の手順を案内し、デーモンを起動し、23種類の対応コーディングツール(Antigravity、Claude Code、CodeBuddy、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI)をスキャンします。すでにインストール済みのものは、自動的にランタイムとして登録されます。",
+ "multica setup を実行すると、OAuth の手順を案内し、デーモンを起動し、26種類の対応コーディングツール(Antigravity、Claude Code、CodeBuddy、CodeArts、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、MiniMax Code、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI、ZeroClaw)をスキャンします。すでにインストール済みのものは、自動的にランタイムとして登録されます。",
},
{
title: "最初のエージェントを作成",
@@ -193,7 +193,7 @@ export function createJaDict(allowSignup: boolean): LandingDict {
{
question: "Multica はどのコーディングエージェントに対応していますか?",
answer:
- "Multica は、Antigravity、Claude Code、CodeBuddy、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI の23種類のコーディングツールに標準対応しています。デーモンが、すでにインストール済みの CLI を自動検出し、それぞれをランタイムとして登録します。オープンソースなので、独自のバックエンドを追加することもできます。",
+ "Multica は、Antigravity、Claude Code、CodeBuddy、CodeArts、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、MiniMax Code、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI、ZeroClaw の26種類のコーディングツールに標準対応しています。デーモンが、すでにインストール済みの CLI を自動検出し、それぞれをランタイムとして登録します。オープンソースなので、独自のバックエンドを追加することもできます。",
},
{
question: "セルフホストが必須ですか、それともクラウド版もありますか?",
diff --git a/apps/web/features/landing/i18n/ko.ts b/apps/web/features/landing/i18n/ko.ts
index a234299018..460e58900a 100644
--- a/apps/web/features/landing/i18n/ko.ts
+++ b/apps/web/features/landing/i18n/ko.ts
@@ -118,7 +118,7 @@ export function createKoDict(allowSignup: boolean): LandingDict {
{
title: "처음 실행할 때 자동 등록",
description:
- "Multica는 Antigravity, Claude Code, CodeBuddy, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI 등 23개 지원 도구를 스캔해 이미 설치된 것을 런타임으로 자동 등록합니다.",
+ "Multica는 Antigravity, Claude Code, CodeBuddy, CodeArts, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, MiniMax Code, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI, ZeroClaw 등 26개 지원 도구를 스캔해 이미 설치된 것을 런타임으로 자동 등록합니다.",
},
],
},
@@ -193,7 +193,7 @@ export function createKoDict(allowSignup: boolean): LandingDict {
{
question: "Multica는 어떤 코딩 에이전트를 지원하나요?",
answer:
- "Multica는 Antigravity, Claude Code, CodeBuddy, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI 등 23개 코딩 도구를 기본 지원합니다. 데몬이 이미 설치된 CLI를 자동으로 찾아 각각 런타임으로 등록합니다. 오픈소스이므로 직접 백엔드를 추가할 수도 있습니다.",
+ "Multica는 Antigravity, Claude Code, CodeBuddy, CodeArts, Codex, Copilot, Cursor, DeepSeek Harness, DevEco Code, Dim, Grok, Hermes, Kimi, Kiro CLI, MiniMax Code, Oh-My-Pi, OpenClaw, OpenCode, Pi, Qoder, Qoder CN, Qwen Code, QwenPaw, Reasonix, Trae CLI, ZeroClaw 등 26개 코딩 도구를 기본 지원합니다. 데몬이 이미 설치된 CLI를 자동으로 찾아 각각 런타임으로 등록합니다. 오픈소스이므로 직접 백엔드를 추가할 수도 있습니다.",
},
{
question: "셀프 호스팅만 가능한가요, 클라우드 버전도 있나요?",
diff --git a/apps/web/features/landing/i18n/zh.ts b/apps/web/features/landing/i18n/zh.ts
index c49ddc1621..e61a19bad1 100644
--- a/apps/web/features/landing/i18n/zh.ts
+++ b/apps/web/features/landing/i18n/zh.ts
@@ -101,7 +101,7 @@ export function createZhDict(allowSignup: boolean): LandingDict {
label: "\u8fd0\u884c\u65f6",
title: "\u4e00\u4e2a\u63a7\u5236\u53f0\u7ba1\u7406\u6240\u6709\u7b97\u529b",
description:
- "\u672c\u5730\u5b88\u62a4\u8fdb\u7a0b\u548c\u4e91\u7aef\u8fd0\u884c\u65f6\uff0c\u5728\u540c\u4e00\u4e2a\u9762\u677f\u4e2d\u7ba1\u7406\u3002\u5b9e\u65f6\u76d1\u63a7\u5728\u7ebf/\u79bb\u7ebf\u72b6\u6001\u3001\u4f7f\u7528\u91cf\u56fe\u8868\u548c\u6d3b\u52a8\u70ed\u529b\u56fe\u3002\u81ea\u52a8\u68c0\u6d4b\u672c\u673a\u5df2\u5b89\u88c5\u7684 23 \u6b3e\u652f\u6301\u7684 AI \u7f16\u7a0b\u5de5\u5177\u3002",
+ "\u672c\u5730\u5b88\u62a4\u8fdb\u7a0b\u548c\u4e91\u7aef\u8fd0\u884c\u65f6\uff0c\u5728\u540c\u4e00\u4e2a\u9762\u677f\u4e2d\u7ba1\u7406\u3002\u5b9e\u65f6\u76d1\u63a7\u5728\u7ebf/\u79bb\u7ebf\u72b6\u6001\u3001\u4f7f\u7528\u91cf\u56fe\u8868\u548c\u6d3b\u52a8\u70ed\u529b\u56fe\u3002\u81ea\u52a8\u68c0\u6d4b\u672c\u673a\u5df2\u5b89\u88c5\u7684 26 \u6b3e\u652f\u6301\u7684 AI \u7f16\u7a0b\u5de5\u5177\u3002",
cards: [
{
title: "\u7edf\u4e00\u8fd0\u884c\u65f6\u9762\u677f",
@@ -116,7 +116,7 @@ export function createZhDict(allowSignup: boolean): LandingDict {
{
title: "\u9996\u6b21\u542f\u52a8\u81ea\u52a8\u6ce8\u518c",
description:
- "Multica \u626b\u63cf\u672c\u673a\u7684 23 \u6b3e\u652f\u6301\u7684 AI \u7f16\u7a0b\u5de5\u5177\u2014\u2014Antigravity\u3001Claude Code\u3001CodeBuddy\u3001Codex\u3001Copilot\u3001Cursor\u3001DeepSeek Harness\u3001DevEco Code\u3001Dim\u3001Grok\u3001Hermes\u3001Kimi\u3001Kiro CLI\u3001Oh-My-Pi\u3001OpenClaw\u3001OpenCode\u3001Pi\u3001Qoder\u3001Qoder CN\u3001Qwen Code\u3001QwenPaw\u3001Reasonix\u3001Trae CLI\u2014\u2014\u5e76\u4e3a\u6bcf\u6b3e\u5df2\u5b89\u88c5\u7684\u5de5\u5177\u6ce8\u518c\u4e00\u4e2a\u8fd0\u884c\u65f6\u3002",
+ "Multica \u626b\u63cf\u672c\u673a\u7684 26 \u6b3e\u652f\u6301\u7684 AI \u7f16\u7a0b\u5de5\u5177\u2014\u2014Antigravity\u3001Claude Code\u3001CodeBuddy\u3001CodeArts\u3001Codex\u3001Copilot\u3001Cursor\u3001DeepSeek Harness\u3001DevEco Code\u3001Dim\u3001Grok\u3001Hermes\u3001Kimi\u3001Kiro CLI\u3001MiniMax Code\u3001Oh-My-Pi\u3001OpenClaw\u3001OpenCode\u3001Pi\u3001Qoder\u3001Qoder CN\u3001Qwen Code\u3001QwenPaw\u3001Reasonix\u3001Trae CLI\u3001ZeroClaw\u2014\u2014\u5e76\u4e3a\u6bcf\u6b3e\u5df2\u5b89\u88c5\u7684\u5de5\u5177\u6ce8\u518c\u4e00\u4e2a\u8fd0\u884c\u65f6\u3002",
},
],
},
@@ -136,7 +136,7 @@ export function createZhDict(allowSignup: boolean): LandingDict {
{
title: "\u5b89\u88c5 CLI \u5e76\u8fde\u63a5\u4f60\u7684\u673a\u5668",
description:
- "运行 multica setup——它会引导你完成 OAuth 登录、启动守护进程、并扫描 23 款支持的 AI 编程工具(Antigravity、Claude Code、CodeBuddy、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI)。本机已安装的工具会被自动注册成运行时。",
+ "运行 multica setup——它会引导你完成 OAuth 登录、启动守护进程、并扫描 26 款支持的 AI 编程工具(Antigravity、Claude Code、CodeBuddy、CodeArts、Codex、Copilot、Cursor、DeepSeek Harness、DevEco Code、Dim、Grok、Hermes、Kimi、Kiro CLI、MiniMax Code、Oh-My-Pi、OpenClaw、OpenCode、Pi、Qoder、Qoder CN、Qwen Code、QwenPaw、Reasonix、Trae CLI、ZeroClaw)。本机已安装的工具会被自动注册成运行时。",
},
{
title: "\u521b\u5efa\u4f60\u7684\u7b2c\u4e00\u4e2a 智能体",
@@ -192,7 +192,7 @@ export function createZhDict(allowSignup: boolean): LandingDict {
{
question: "Multica \u652f\u6301\u54ea\u4e9b\u7f16\u7801 智能体\uff1f",
answer:
- "Multica \u5f00\u7bb1\u5373\u7528\u652f\u6301 23 \u6b3e AI \u7f16\u7a0b\u5de5\u5177\uff1aAntigravity\u3001Claude Code\u3001CodeBuddy\u3001Codex\u3001Copilot\u3001Cursor\u3001DeepSeek Harness\u3001DevEco Code\u3001Dim\u3001Grok\u3001Hermes\u3001Kimi\u3001Kiro CLI\u3001Oh-My-Pi\u3001OpenClaw\u3001OpenCode\u3001Pi\u3001Qoder\u3001Qoder CN\u3001Qwen Code\u3001QwenPaw\u3001Reasonix\u3001Trae CLI\u3002\u5b88\u62a4\u8fdb\u7a0b\u4f1a\u81ea\u52a8\u68c0\u6d4b\u672c\u673a\u5df2\u5b89\u88c5\u7684 CLI \u5e76\u4e3a\u6bcf\u6b3e\u6ce8\u518c\u4e00\u4e2a\u8fd0\u884c\u65f6\u3002\u56e0\u4e3a\u5f00\u6e90\uff0c\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5df1\u6dfb\u52a0\u540e\u7aef\u3002",
+ "Multica \u5f00\u7bb1\u5373\u7528\u652f\u6301 26 \u6b3e AI \u7f16\u7a0b\u5de5\u5177\uff1aAntigravity\u3001Claude Code\u3001CodeBuddy\u3001CodeArts\u3001Codex\u3001Copilot\u3001Cursor\u3001DeepSeek Harness\u3001DevEco Code\u3001Dim\u3001Grok\u3001Hermes\u3001Kimi\u3001Kiro CLI\u3001MiniMax Code\u3001Oh-My-Pi\u3001OpenClaw\u3001OpenCode\u3001Pi\u3001Qoder\u3001Qoder CN\u3001Qwen Code\u3001QwenPaw\u3001Reasonix\u3001Trae CLI\u3001ZeroClaw\u3002\u5b88\u62a4\u8fdb\u7a0b\u4f1a\u81ea\u52a8\u68c0\u6d4b\u672c\u673a\u5df2\u5b89\u88c5\u7684 CLI \u5e76\u4e3a\u6bcf\u6b3e\u6ce8\u518c\u4e00\u4e2a\u8fd0\u884c\u65f6\u3002\u56e0\u4e3a\u5f00\u6e90\uff0c\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5df1\u6dfb\u52a0\u540e\u7aef\u3002",
},
{
question: "\u9700\u8981\u81ea\u6258\u7ba1\u5417\uff0c\u8fd8\u662f\u6709\u4e91\u7248\u672c\uff1f",
diff --git a/packages/core/agents/mcp-support.test.ts b/packages/core/agents/mcp-support.test.ts
index fa1d4c4824..36ae3d985a 100644
--- a/packages/core/agents/mcp-support.test.ts
+++ b/packages/core/agents/mcp-support.test.ts
@@ -6,6 +6,7 @@ describe("providerSupportsMcpConfig", () => {
it("matches providers whose runtime consumes mcp_config", () => {
expect(providerSupportsMcpConfig("claude")).toBe(true);
expect(providerSupportsMcpConfig("codebuddy")).toBe(true);
+ expect(providerSupportsMcpConfig("codearts")).toBe(true);
expect(providerSupportsMcpConfig("codex")).toBe(true);
expect(providerSupportsMcpConfig("cursor")).toBe(true);
expect(providerSupportsMcpConfig("hermes")).toBe(true);
diff --git a/packages/core/agents/mcp-support.ts b/packages/core/agents/mcp-support.ts
index 86c4e7e0cb..67bbf2e1bc 100644
--- a/packages/core/agents/mcp-support.ts
+++ b/packages/core/agents/mcp-support.ts
@@ -8,6 +8,7 @@
const MCP_SUPPORTED_PROVIDERS = new Set([
"claude",
"codebuddy",
+ "codearts",
"codex",
"cursor",
"grok",
diff --git a/packages/core/runtimes/display.test.ts b/packages/core/runtimes/display.test.ts
index 7336181587..d454b1f930 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", () => {
- // DSH, Qoder CN, Trae, Qwen Code, and QwenPaw use display names that differ from
+ // CodeArts, DSH, Qoder CN, Trae, Qwen Code, and QwenPaw use display names that differ from
// title-cased slugs; aliases must match the daemon's no-alias names.
+ expect(
+ runtimeDisplayLabel({
+ name: "CodeArts (host)",
+ custom_name: "box",
+ provider: "codearts",
+ }),
+ ).toBe("box (CodeArts)");
expect(
runtimeDisplayLabel({
name: "DeepSeek Harness (host)",
diff --git a/packages/core/runtimes/display.ts b/packages/core/runtimes/display.ts
index 4b7545a9a5..79893d84cb 100644
--- a/packages/core/runtimes/display.ts
+++ b/packages/core/runtimes/display.ts
@@ -37,10 +37,11 @@ export function runtimeDisplayLabel(
* (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). `qoderclicn`,
- * `dsh`, `traecli`, `qwen`, `qwenpaw`, `mcode`, and `zeroclaw` need overrides today — every other provider is a
+ * `codearts`, `dsh`, `traecli`, `qwen`, `qwenpaw`, `mcode`, and `zeroclaw` 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> = {
+ codearts: "CodeArts",
dsh: "DeepSeek Harness",
qoderclicn: "Qoder CN",
traecli: "Trae",
diff --git a/packages/core/types/agent.ts b/packages/core/types/agent.ts
index 66c7982dc2..0bbc8422d6 100644
--- a/packages/core/types/agent.ts
+++ b/packages/core/types/agent.ts
@@ -112,6 +112,7 @@ export const RUNTIME_PROFILE_PROTOCOL_FAMILIES = [
"codex",
"copilot",
"opencode",
+ "codearts",
"deveco",
"openclaw",
"hermes",
diff --git a/packages/views/runtimes/components/codearts-logo.svg b/packages/views/runtimes/components/codearts-logo.svg
new file mode 100644
index 0000000000..3eba124ff6
--- /dev/null
+++ b/packages/views/runtimes/components/codearts-logo.svg
@@ -0,0 +1,3 @@
+<svg viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" width="28" height="28">
+ <image width="28" height="28" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAvYklEQVR42u19eZhdVZXvb629z51qSmWCTEKYBILI5KwkUXFAPxS1SkGcnwMO7dOHDSpaFNpiA4rSNor62hGUKpVWRG3sfpW0ihAjAkJE5kGZkpDUdOvee/Ze6/2x9zn3VMSBSlIJdk6+892hcu89Z//2midgz7Hn2HPsOfYce449x55j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ub0Cj2sbvkhdKggw6Zu+effO2pt/Az5k36DyUt3AdbMZ4TIyBS7z28c/Dq4STwVSFVgar3Kt6riKhIiHSLQkVJPbEISETJi/dOu01itvp7l9YWvpVAmJELow+iCr598p2faW0u/RAdvhSGQ4gLRYgisZl2HBahhTPr0ayhNayIiPcCcS58XhSJZ9TUOrWtZr1nqOEPeEatf9N5qp5mEnWYveKWgn/yJVsv6V2PLa+dSFp9ntOnS8WWgtRrRQkYohQQn7NZaMgVzbwwHIteiBRkCcYD5XFas//k3Lf8fJ/BO7fHH5p5Ptavvzg57MEPX1BK6u+iavCmTGduNN2A1yK7LFChiZ+rE1Jnb1Wu/HBSlnx17ok3/xaQndJvjXZeF4phBoWSLwPgkI0XH/xQaewZjtwRgD+8Sc1l0LTq2SeqWalLOMn5QG9QZVVlUcfMUzUp31RB8u07Fp5/GYF0hzizc2pg1H+077MZ46830ngWiXQTSaKqDBLKu4yqFo17FWUH5gaQbPJS2gClG8R0X7sm+dz6448/vpnHGGPm9+OtwDMAiX4pBmENgG8N3VT65uprytcl9yVbJ8cZmIh/7QR1lhTjQI80tVfLuqRZ9m9u9TVec9hhLXkUSt8h3YEDkAIQBlT4nWv6a6Wtt1pKN3NP9xjG6krdXcD4lBLGw7VqtUu9e5obXfDa5vLV/6sx3VERIh24GUq7aavKx85aRwYsdMDmDpjHvtIM7TMz/jz+WjU4zEyTiygCpiOwOgSjOjsNJHZhpyY8Rg06mwkwS/26H+Mv7Q6N7/Yce449x55jz7Hn+J90/H/JVJWzkxEjjQAAAABJRU5ErkJggg==" />
+</svg>
diff --git a/packages/views/runtimes/components/provider-logo.test.tsx b/packages/views/runtimes/components/provider-logo.test.tsx
index d8002cd944..1253e8820d 100644
--- a/packages/views/runtimes/components/provider-logo.test.tsx
+++ b/packages/views/runtimes/components/provider-logo.test.tsx
@@ -4,6 +4,17 @@ import { describe, expect, it } from "vitest";
import { ProviderLogo } from "./provider-logo";
describe("ProviderLogo", () => {
+ it("renders the dedicated CodeArts icon", () => {
+ const { container } = render(
+ <ProviderLogo provider="codearts" className="runtime-logo" />,
+ );
+
+ const logo = container.querySelector('img[alt="CodeArts"]');
+
+ expect(logo?.getAttribute("src")).toBeTruthy();
+ expect(logo?.classList.contains("runtime-logo")).toBe(true);
+ });
+
it("keeps the official Reasonix artwork", () => {
const logoSvg = readFileSync("runtimes/components/reasonix-logo.svg", "utf8");
diff --git a/packages/views/runtimes/components/provider-logo.tsx b/packages/views/runtimes/components/provider-logo.tsx
index 229abe81af..10836099e6 100644
--- a/packages/views/runtimes/components/provider-logo.tsx
+++ b/packages/views/runtimes/components/provider-logo.tsx
@@ -1,5 +1,6 @@
import { useId } from "react";
import { Monitor } from "lucide-react";
+import codeartsLogo from "./codearts-logo.svg";
import qwenLogo from "./qwen-logo.svg";
import reasonixLogo from "./reasonix-logo.svg";
import dimLogo from "./dim-logo.png";
@@ -94,6 +95,14 @@ function DevecoLogo({ className }: { className: string }) {
return <img src={DEVECO_ICON} alt="DevEco Code" className={className} />;
}
+// CodeArts — official product icon supplied from the Huawei Cloud CodeArts
+// documentation site favicon.
+const codeartsLogoSrc = staticAssetSrc(codeartsLogo);
+
+function CodeArtsLogo({ className }: { className: string }) {
+ return <img src={codeartsLogoSrc} alt="CodeArts" className={className} />;
+}
+
// OpenClaw — lobster mascot, vector version based on official branding
function OpenClawLogo({ className }: { className: string }) {
return (
@@ -385,6 +394,8 @@ export function ProviderLogo({
return <OpenCodeLogo className={className} />;
case "deveco":
return <DevecoLogo className={className} />;
+ case "codearts":
+ return <CodeArtsLogo className={className} />;
case "openclaw":
return <OpenClawLogo className={className} />;
case "hermes":
diff --git a/packages/views/runtimes/components/runtime-profile-catalog.test.ts b/packages/views/runtimes/components/runtime-profile-catalog.test.ts
index cab94f34ee..e1ff16a517 100644
--- a/packages/views/runtimes/components/runtime-profile-catalog.test.ts
+++ b/packages/views/runtimes/components/runtime-profile-catalog.test.ts
@@ -31,6 +31,10 @@ function profile(
}
describe("buildRuntimeCatalog", () => {
+ it("offers CodeArts as an independent protocol family", () => {
+ expect(PROTOCOL_FAMILIES).toContain("codearts");
+ });
+
it("keeps custom profiles separate from built-in protocol families", () => {
const catalog = buildRuntimeCatalog([
profile("prof-1", "Team Codex", "2026-01-02T00:00:00Z"),
diff --git a/scripts/agent-cli-command-names.txt b/scripts/agent-cli-command-names.txt
index 1b364dcd12..88dbe7e846 100644
--- a/scripts/agent-cli-command-names.txt
+++ b/scripts/agent-cli-command-names.txt
@@ -1,6 +1,7 @@
agy
claude
codebuddy
+codearts
codex
copilot
cursor-agent
diff --git a/server/internal/daemon/agents_probe.go b/server/internal/daemon/agents_probe.go
index 8c5bbdb803..3b590ea018 100644
--- a/server/internal/daemon/agents_probe.go
+++ b/server/internal/daemon/agents_probe.go
@@ -5,6 +5,7 @@ import (
"encoding/json"
"os"
"os/exec"
+ "path/filepath"
"strings"
"sync"
"time"
@@ -161,6 +162,30 @@ var probeAgentCLIs = func() map[string]AgentEntry {
if e, ok := probe("MULTICA_OPENCODE_PATH", "opencode", "MULTICA_OPENCODE_MODEL"); ok {
agents["opencode"] = e
}
+ if e, ok := probe("MULTICA_CODEARTS_PATH", "codearts", "MULTICA_CODEARTS_MODEL"); ok {
+ agents["codearts"] = e
+ } else if strings.TrimSpace(os.Getenv("MULTICA_CODEARTS_PATH")) == "" {
+ // The native CodeArts installer may update PATH only for future
+ // terminals. A GUI-launched daemon can still discover its stable
+ // user-level launcher. An explicit but invalid override remains a hard
+ // miss and never falls back here.
+ home, err := os.UserHomeDir()
+ if err == nil {
+ for _, name := range []string{"codearts.cmd", "codearts"} {
+ candidate := filepath.Join(home, ".codeartsdoer", "installers", name)
+ path, resolveErr := resolveAgentExecutablePath(candidate)
+ if resolveErr != nil {
+ continue
+ }
+ agents["codearts"] = AgentEntry{
+ Path: path,
+ Command: "codearts",
+ Model: strings.TrimSpace(os.Getenv("MULTICA_CODEARTS_MODEL")),
+ }
+ break
+ }
+ }
+ }
if e, ok := probe("MULTICA_DEVECO_PATH", "deveco", "MULTICA_DEVECO_MODEL"); ok {
agents["deveco"] = e
}
diff --git a/server/internal/daemon/agents_probe_codearts_test.go b/server/internal/daemon/agents_probe_codearts_test.go
new file mode 100644
index 0000000000..622049f10d
--- /dev/null
+++ b/server/internal/daemon/agents_probe_codearts_test.go
@@ -0,0 +1,51 @@
+package daemon
+
+import (
+ "os"
+ "path/filepath"
+ "runtime"
+ "testing"
+)
+
+func TestProbeAgentCLIsDiscoversCodeArtsDefaultInstallPath(t *testing.T) {
+ home := t.TempDir()
+ installDir := filepath.Join(home, ".codeartsdoer", "installers")
+ if err := os.MkdirAll(installDir, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ name := "codearts"
+ content := []byte("#!/bin/sh\nexit 0\n")
+ if runtime.GOOS == "windows" {
+ name = "codearts.cmd"
+ content = []byte("@echo off\r\nexit /b 0\r\n")
+ }
+ executable := filepath.Join(installDir, name)
+ if err := os.WriteFile(executable, content, 0o755); err != nil {
+ t.Fatal(err)
+ }
+
+ origResolve := resolveAgentsViaLoginShell
+ t.Cleanup(func() { resolveAgentsViaLoginShell = origResolve })
+ resolveAgentsViaLoginShell = func([]string) map[string]string { return map[string]string{} }
+ resetShellResolveCacheForTest(t)
+
+ t.Setenv("HOME", home)
+ t.Setenv("USERPROFILE", home)
+ t.Setenv("PATH", t.TempDir())
+ t.Setenv("MULTICA_CODEARTS_PATH", "")
+ t.Setenv("MULTICA_CODEARTS_MODEL", "mimo/mimo-v2.5")
+
+ entry, ok := probeAgentCLIs()["codearts"]
+ if !ok {
+ t.Fatal("CodeArts was not discovered from its default user install path")
+ }
+ if filepath.Clean(entry.Path) != filepath.Clean(executable) {
+ t.Fatalf("CodeArts path = %q, want %q", entry.Path, executable)
+ }
+ if entry.Command != "codearts" || entry.Model != "mimo/mimo-v2.5" {
+ t.Fatalf("unexpected CodeArts entry: %+v", entry)
+ }
+ if got := providerDisplayName("codearts"); got != "CodeArts" {
+ t.Fatalf("CodeArts display name = %q, want CodeArts", got)
+ }
+}
diff --git a/server/internal/daemon/codearts_models.go b/server/internal/daemon/codearts_models.go
new file mode 100644
index 0000000000..7e0116b1e5
--- /dev/null
+++ b/server/internal/daemon/codearts_models.go
@@ -0,0 +1,73 @@
+package daemon
+
+import (
+ "os"
+ "sort"
+ "strings"
+
+ "github.com/multica-ai/multica/server/pkg/agent"
+)
+
+// loadCodeArtsConfiguredModels reads OpenCode-compatible custom providers
+// from CodeArts' user configuration. CodeArts can use these providers in its
+// TUI even when its `models` command is blocked by the Huawei Cloud login
+// preflight, so they are the daemon's non-network discovery fallback.
+func loadCodeArtsConfiguredModels(home string) ([]agent.Model, error) {
+ raw, err := os.ReadFile(codeArtsUserConfigPath(home))
+ if os.IsNotExist(err) {
+ return []agent.Model{}, nil
+ }
+ if err != nil {
+ return nil, err
+ }
+ document, err := unmarshalRuntimeMcpConfig(raw, "jsonc")
+ if err != nil {
+ return nil, err
+ }
+ providers, ok := document["provider"].(map[string]any)
+ if !ok {
+ return []agent.Model{}, nil
+ }
+
+ providerNames := make([]string, 0, len(providers))
+ for name := range providers {
+ providerNames = append(providerNames, name)
+ }
+ sort.Strings(providerNames)
+
+ models := make([]agent.Model, 0)
+ for _, rawProviderName := range providerNames {
+ providerName := strings.TrimSpace(rawProviderName)
+ providerConfig, ok := providers[rawProviderName].(map[string]any)
+ if !ok || providerName == "" {
+ continue
+ }
+ configuredModels, ok := providerConfig["models"].(map[string]any)
+ if !ok {
+ continue
+ }
+ modelNames := make([]string, 0, len(configuredModels))
+ for name := range configuredModels {
+ modelNames = append(modelNames, name)
+ }
+ sort.Strings(modelNames)
+ for _, rawModelName := range modelNames {
+ modelName := strings.TrimSpace(rawModelName)
+ if modelName == "" {
+ continue
+ }
+ label := modelName
+ if modelConfig, ok := configuredModels[rawModelName].(map[string]any); ok {
+ if configuredLabel, ok := modelConfig["name"].(string); ok && strings.TrimSpace(configuredLabel) != "" {
+ label = strings.TrimSpace(configuredLabel)
+ }
+ }
+ models = append(models, agent.Model{
+ ID: providerName + "/" + modelName,
+ Label: label,
+ Provider: providerName,
+ })
+ }
+ }
+ return models, nil
+}
diff --git a/server/internal/daemon/codearts_models_test.go b/server/internal/daemon/codearts_models_test.go
new file mode 100644
index 0000000000..6100662cd3
--- /dev/null
+++ b/server/internal/daemon/codearts_models_test.go
@@ -0,0 +1,43 @@
+package daemon
+
+import (
+ "os"
+ "path/filepath"
+ "testing"
+)
+
+func TestLoadCodeArtsConfiguredModelsSupportsJSONC(t *testing.T) {
+ home := t.TempDir()
+ configDir := filepath.Join(home, ".codeartsdoer")
+ if err := os.MkdirAll(configDir, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ config := `{
+ // A custom OpenCode-compatible provider remains useful in CodeArts TUI.
+ "provider": {
+ "mimo": {
+ "models": {
+ "mimo-v2.5-pro": { "name": "MiMo V2.5 Pro", },
+ "mimo-v2.5": { "name": "MiMo V2.5" }
+ }
+ }
+ }
+}`
+ if err := os.WriteFile(filepath.Join(configDir, "codearts_cli.jsonc"), []byte(config), 0o600); err != nil {
+ t.Fatal(err)
+ }
+
+ models, err := loadCodeArtsConfiguredModels(home)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if len(models) != 2 {
+ t.Fatalf("models = %+v", models)
+ }
+ if models[0].ID != "mimo/mimo-v2.5" || models[0].Label != "MiMo V2.5" || models[0].Provider != "mimo" {
+ t.Fatalf("first model = %+v", models[0])
+ }
+ if models[1].ID != "mimo/mimo-v2.5-pro" || models[1].Label != "MiMo V2.5 Pro" {
+ t.Fatalf("second model = %+v", models[1])
+ }
+}
diff --git a/server/internal/daemon/config.go b/server/internal/daemon/config.go
index fba0c88e3f..422bb88353 100644
--- a/server/internal/daemon/config.go
+++ b/server/internal/daemon/config.go
@@ -102,7 +102,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, reasonix, dsh, kiro, antigravity, qoder, qoderclicn, traecli, grok, qwen, qwenpaw, mcode, dim, zeroclaw (plus built-in runtime identities from agent.BuiltinRuntimes, e.g. omp)
+ Agents map[string]AgentEntry // keyed by provider: claude, codebuddy, codex, copilot, opencode, codearts, deveco, openclaw, hermes, pi, cursor, kimi, reasonix, dsh, kiro, antigravity, qoder, qoderclicn, traecli, grok, qwen, qwenpaw, mcode, dim, zeroclaw (plus built-in runtime identities from agent.BuiltinRuntimes, e.g. omp)
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)
@@ -249,7 +249,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, omp, cursor-agent, kimi, reasonix, dsh, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen, qwenpaw, mcode, dim, or zeroclaw and ensure it is on PATH")
+ return Config{}, fmt.Errorf("no agent CLI found: install claude, codebuddy, codearts, codex, copilot, opencode, deveco, openclaw, hermes, pi, omp, cursor-agent, kimi, reasonix, dsh, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen, qwenpaw, mcode, dim, or zeroclaw and ensure it is on PATH")
}
claudeArgs, err := shellArgsFromEnv("MULTICA_CLAUDE_ARGS")
@@ -915,7 +915,7 @@ func isExecutableFile(path string) bool {
// descriptor registry (agent.BuiltinRuntimeCommands) so adding a new fork
// doesn't require editing this list by hand.
var defaultAgentCommandNames = append([]string{
- "claude", "codex", "opencode", "deveco", "openclaw", "hermes",
+ "claude", "codex", "opencode", "codearts", "deveco", "openclaw", "hermes",
"pi", "cursor-agent", "copilot", "kimi", "reasonix", "dsh", "kiro-cli", "codebuddy", "agy", "qodercli", "qoderclicn", "traecli", "grok", "qwen", "qwenpaw", "mcode", "dim", "zeroclaw",
}, agent.BuiltinRuntimeCommands()...)
diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.go
index 3881e8aaaf..082bc93e43 100644
--- a/server/internal/daemon/daemon.go
+++ b/server/internal/daemon/daemon.go
@@ -2644,7 +2644,8 @@ func (d *Daemon) registerRuntimesForWorkspaceBatchLocked(ctx context.Context, wo
// this host (MUL-3284). This is best-effort: a fetch error (e.g. an older
// server returning 404) must never fail registration — the daemon simply
// continues with the built-in runtimes it already collected. A profile
- // whose command_name is not on PATH is skipped (the host doesn't have it).
+ // whose command_name is neither on PATH nor already discovered for the same
+ // protocol family is skipped (the host doesn't have it).
//
// profileSig is a content hash of the workspace's profile list captured
// here so an on-demand server notification can skip re-registration when
@@ -2733,14 +2734,14 @@ func (d *Daemon) registerBuiltinRuntimesForWorkspaceLocked(ctx context.Context,
// appendProfileRuntimes fetches the workspace's enabled custom runtime
// profiles (MUL-3284) and appends a runtime registration entry for each one
-// whose command_name resolves on this host's PATH. For each resolved profile
+// whose command_name resolves on this host. For each resolved profile
// it records the absolute command path and fixed args keyed by profile_id (via
// recordProfileLaunch) so runTask can later launch the custom executable for a
// claimed task.
//
// Best-effort by contract: any error fetching profiles (older server, network
// blip) is logged and swallowed — registration proceeds with the built-in
-// runtimes already collected. A profile whose command is not on PATH is
+// runtimes already collected. A profile whose command cannot be resolved is
// skipped with an Info log (this host simply doesn't have that command).
//
// The registration entry mirrors the built-in shape: name = display_name
@@ -2795,9 +2796,11 @@ func (d *Daemon) appendProfileRuntimes(ctx context.Context, workspaceID string,
// that isn't on the daemon's PATH, or selects between multiple
// installs on the same host. A configured-but-unusable override
// (deleted/moved/non-executable) is logged and falls back to PATH
- // rather than registering a runtime that can't launch. When neither
- // the override nor PATH resolves, the profile is skipped (existing
- // behavior).
+ // and then to the matching provider command already discovered at
+ // daemon startup. The latter matters for GUI-launched daemons whose
+ // environment cannot resolve a CLI directly even though built-in
+ // discovery found it through a login shell or provider install path.
+ // When none of those sources resolves, the profile is skipped.
var resolved string
var failureReason string
if override := strings.TrimSpace(d.cfg.ProfileCommandOverrides[profile.ID]); override != "" {
@@ -2815,23 +2818,31 @@ func (d *Daemon) appendProfileRuntimes(ctx context.Context, workspaceID string,
if resolved == "" {
r, err := lookPath(profile.CommandName)
if err != nil {
- // Host doesn't have this command — expected on hosts that aren't
- // provisioned for this profile. Skip without failing.
- d.logger.Info("skip custom runtime profile: command not found on PATH",
- "workspace_id", workspaceID, "profile_id", profile.ID,
- "command_name", profile.CommandName, "error", err)
- if failureReason != "" {
- failureReason += "; "
+ if discovered, ok := d.agents()[profile.ProtocolFamily]; ok && discovered.Command == profile.CommandName && discovered.Path != "" {
+ resolved = discovered.Path
+ d.logger.Info("custom runtime profile: using discovered provider command path",
+ "workspace_id", workspaceID, "profile_id", profile.ID,
+ "protocol_family", profile.ProtocolFamily, "command_path", resolved)
+ } else {
+ // Host doesn't have this command — expected on hosts that aren't
+ // provisioned for this profile. Skip without failing.
+ d.logger.Info("skip custom runtime profile: command not found on PATH or provider discovery",
+ "workspace_id", workspaceID, "profile_id", profile.ID,
+ "command_name", profile.CommandName, "error", err)
+ if failureReason != "" {
+ failureReason += "; "
+ }
+ failureReason += "command not found on PATH or provider discovery: " + profile.CommandName
+ *failedProfiles = append(*failedProfiles, map[string]string{
+ "profile_id": profile.ID,
+ "command_name": profile.CommandName,
+ "reason": failureReason,
+ })
+ continue
}
- failureReason += "command not found on PATH: " + profile.CommandName
- *failedProfiles = append(*failedProfiles, map[string]string{
- "profile_id": profile.ID,
- "command_name": profile.CommandName,
- "reason": failureReason,
- })
- continue
+ } else {
+ resolved = r
}
- resolved = r
}
// Best-effort version detection; an empty version is acceptable. The
// probe carries the profile's fixed_args so a wrapper reports the
@@ -4132,6 +4143,19 @@ func (d *Daemon) handleModelList(ctx context.Context, rt Runtime, requestID stri
d.logger.Warn("model discovery fell back to a static catalog; reporting it as non-authoritative",
"runtime_id", rt.ID, "provider", rt.Provider, "path", execPath, "count", len(models))
}
+ if rt.Provider == "codearts" && len(models) == 0 {
+ if home, homeErr := os.UserHomeDir(); homeErr == nil {
+ configuredModels, configErr := loadCodeArtsConfiguredModels(home)
+ if configErr != nil {
+ d.logger.Warn("CodeArts custom model discovery failed",
+ "runtime_id", rt.ID, "path", codeArtsUserConfigPath(home), "error", configErr)
+ } else if len(configuredModels) > 0 {
+ models = configuredModels
+ d.logger.Info("CodeArts model discovery used user-configured providers",
+ "runtime_id", rt.ID, "path", codeArtsUserConfigPath(home), "count", len(models))
+ }
+ }
+ }
// Wire format matches handler.ModelEntry. Use a struct (not
// map[string]string) so the Default bool and the per-model
@@ -5664,6 +5688,7 @@ func taskRootDirParams(workspacesRoot string, task Task) execenv.RootDirParams {
// this map at init so their display names stay in lockstep with the
// descriptor.
var runtimeDisplayNameOverrides = map[string]string{
+ "codearts": "CodeArts",
"dsh": "DeepSeek Harness",
"traecli": "Trae",
"grok": "Grok",
@@ -7559,7 +7584,7 @@ func (d *Daemon) runTask(ctx context.Context, task Task, provider string, slot i
model, thinkingLevel, serviceTier = selection.Model, selection.ThinkingLevel, selection.ServiceTier
var idleWatchdogTimeout time.Duration
- if provider == "opencode" {
+ if provider == "opencode" || provider == "codearts" {
idleWatchdogTimeout = d.cfg.OpenCodeIdleWatchdog
}
execOpts := agent.ExecOptions{
@@ -7999,7 +8024,7 @@ func (d *Daemon) runTask(ctx context.Context, task Task, provider string, slot i
// Not every backend can answer, though, and a false ResumeRejected means
// different things depending on who produced it: "checked, not a
// rejection" from a capable backend, "could not tell" from one of the
-// five in agent.ResumeRejectionUndetectable. That is why provider is a
+// backends in agent.ResumeRejectionUndetectable. That is why provider is a
// parameter — without it the compatibility branch below would silently
// apply to every backend, second-guessing capable ones by exclusion.
//
@@ -8078,14 +8103,14 @@ func shouldRetryWithFreshSession(result agent.Result, priorSessionID string, too
if !agent.ResumeRejectionUndetectable(provider) {
return false
}
- // antigravity, copilot, cursor, deveco and opencode scrape SessionID out
+ // antigravity, codearts, copilot, cursor, deveco and opencode scrape SessionID out
// of stream output and have no rejection string captured anywhere, so an
// empty SessionID is the only thing they can offer. It proves no session
// was established this run, which is exactly what the gate relied on for
// every backend before ResumeRejected existed; keeping it preserves their
// recovery instead of silently removing it.
//
- // Inventing rejection phrases for these five would be the alternative,
+ // Inventing rejection phrases for these backends would be the alternative,
// and it is worse: no real output has been captured for any of them, and
// a false positive discards a recoverable session pointer.
return result.SessionID == "" && freshSessionMayHelp(result.Error)
diff --git a/server/internal/daemon/daemon_test.go b/server/internal/daemon/daemon_test.go
index 67c1c35d26..10ab55288a 100644
--- a/server/internal/daemon/daemon_test.go
+++ b/server/internal/daemon/daemon_test.go
@@ -2993,7 +2993,7 @@ func TestShouldRetryWithFreshSession_CompatPathIsBackendScoped(t *testing.T) {
// the compat path exists to catch.
result := agent.Result{Status: "failed", Error: "exit status 1"}
- undetectable := []string{"antigravity", "copilot", "cursor", "deveco", "opencode"}
+ undetectable := []string{"antigravity", "codearts", "copilot", "cursor", "deveco", "opencode"}
for _, provider := range undetectable {
t.Run(provider+" retries", func(t *testing.T) {
t.Parallel()
@@ -5506,8 +5506,8 @@ func TestExecuteAndDrain_RedactsNestedToolInputBeforeSending(t *testing.T) {
// session-shaped (a fresh session resolves it), yet it must NOT count as one
// of the "fresh session is not the answer" buckets — in particular not
// missing-config — or the in-turn fresh-session retry on the five
-// ResumeRejectionUndetectable backends (antigravity, copilot, cursor, deveco,
-// opencode) would silently stop firing and the dead session would be resumed
+// ResumeRejectionUndetectable backends (antigravity, codearts, copilot, cursor,
+// deveco, opencode) would silently stop firing and the dead session would be resumed
// into the same provider error forever.
func TestFreshSessionMayHelp(t *testing.T) {
t.Parallel()
diff --git a/server/internal/daemon/execenv/context.go b/server/internal/daemon/execenv/context.go
index 62139b708a..fc89f805c4 100644
--- a/server/internal/daemon/execenv/context.go
+++ b/server/internal/daemon/execenv/context.go
@@ -368,6 +368,10 @@ func skillsDirPath(workDir, provider string) string {
// without those, OpenCode walks from the daemon's inherited PWD and
// misses .opencode/skills + AGENTS.md entirely (MUL-2416).
return filepath.Join(workDir, ".opencode", "skills")
+ case "codearts":
+ // CodeArts Agent discovers project skills from its provider-owned
+ // .codeartsdoer/skills directory.
+ return filepath.Join(workDir, ".codeartsdoer", "skills")
case "deveco":
// DevEco Code (Huawei's OpenCode fork) natively discovers project
// skills from .deveco/skills/ in the workdir, mirroring OpenCode's
diff --git a/server/internal/daemon/execenv/execenv_test.go b/server/internal/daemon/execenv/execenv_test.go
index 03915c341a..2fd27539f9 100644
--- a/server/internal/daemon/execenv/execenv_test.go
+++ b/server/internal/daemon/execenv/execenv_test.go
@@ -1365,6 +1365,7 @@ func TestInjectRuntimeConfigBackgroundTaskSafetyProviderAgnostic(t *testing.T) {
{"claude", "CLAUDE.md"},
{"codex", "AGENTS.md"},
{"opencode", "AGENTS.md"},
+ {"codearts", "AGENTS.md"},
{"hermes", "AGENTS.md"},
}
diff --git a/server/internal/daemon/execenv/runtime_config.go b/server/internal/daemon/execenv/runtime_config.go
index a51178da75..096c5266dd 100644
--- a/server/internal/daemon/execenv/runtime_config.go
+++ b/server/internal/daemon/execenv/runtime_config.go
@@ -163,6 +163,7 @@ func formatProjectResource(r ProjectResourceForEnv) string {
// For Codex: writes {workDir}/AGENTS.md (skills discovered natively via CODEX_HOME)
// For Copilot: writes {workDir}/AGENTS.md (skills discovered natively from .github/skills/)
// For OpenCode: writes {workDir}/AGENTS.md (skills discovered natively from .opencode/skills/)
+// For CodeArts: writes {workDir}/AGENTS.md (skills discovered natively from .codeartsdoer/skills/)
// For DevEco Code: writes {workDir}/AGENTS.md (skills discovered natively from .deveco/skills/)
// For OpenClaw: writes {workDir}/AGENTS.md (skills discovered natively from {workDir}/skills/ via per-task openclaw-config.json that pins agents.defaults.workspace)
// For Hermes: writes {workDir}/AGENTS.md (skills discovered natively from a per-task HERMES_HOME/skills seeded by the daemon; see hermes_home.go)
@@ -214,7 +215,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", "reasonix", "dsh", "kiro", "antigravity", "qoder", "qoderclicn", "traecli", "grok", "qwenpaw", "mcode", "dim", "zeroclaw":
+ case "codex", "copilot", "opencode", "codearts", "deveco", "openclaw", "hermes", "pi", "cursor", "kimi", "reasonix", "dsh", "kiro", "antigravity", "qoder", "qoderclicn", "traecli", "grok", "qwenpaw", "mcode", "dim", "zeroclaw":
return filepath.Join(workDir, "AGENTS.md")
default:
return ""
diff --git a/server/internal/daemon/execenv/runtime_config_test.go b/server/internal/daemon/execenv/runtime_config_test.go
index 75290a5937..c8ec84fce8 100644
--- a/server/internal/daemon/execenv/runtime_config_test.go
+++ b/server/internal/daemon/execenv/runtime_config_test.go
@@ -1000,6 +1000,7 @@ func TestInjectRuntimeConfigPreservesUserContent(t *testing.T) {
{"codex", "AGENTS.md"},
{"copilot", "AGENTS.md"},
{"opencode", "AGENTS.md"},
+ {"codearts", "AGENTS.md"},
{"openclaw", "AGENTS.md"},
{"hermes", "AGENTS.md"},
{"pi", "AGENTS.md"},
@@ -1379,6 +1380,7 @@ func TestCleanupRuntimeConfigByProvider(t *testing.T) {
{"codex", "AGENTS.md"},
{"copilot", "AGENTS.md"},
{"opencode", "AGENTS.md"},
+ {"codearts", "AGENTS.md"},
{"openclaw", "AGENTS.md"},
{"hermes", "AGENTS.md"},
{"pi", "AGENTS.md"},
diff --git a/server/internal/daemon/execenv/sidecar_manifest.go b/server/internal/daemon/execenv/sidecar_manifest.go
index 05c1a0cab8..02c9383cb2 100644
--- a/server/internal/daemon/execenv/sidecar_manifest.go
+++ b/server/internal/daemon/execenv/sidecar_manifest.go
@@ -267,8 +267,8 @@ func writeSidecarManifest(envRoot string, m *sidecarManifest) error {
// path: that function handles the runtime brief inside CLAUDE.md /
// AGENTS.md, this one handles the sidecar tree
// (.agent_context/, .multica/, .claude/skills/, .github/skills/,
-// .opencode/skills/, skills/, .pi/skills/, .omp/mcp.json,
-// .omp/skills/, .cursor/skills/,
+// .opencode/skills/, .codeartsdoer/skills/, skills/, .pi/skills/,
+// .omp/mcp.json, .omp/skills/, .cursor/skills/,
// .kimi/skills/, .reasonix/skills/, .kiro/skills/, .agents/skills/, fallback
// .agent_context/skills/). The two together restore the workdir to
// byte-exact pre-task state.
diff --git a/server/internal/daemon/execenv/sidecar_manifest_test.go b/server/internal/daemon/execenv/sidecar_manifest_test.go
index 75c5ab2546..b895b80a25 100644
--- a/server/internal/daemon/execenv/sidecar_manifest_test.go
+++ b/server/internal/daemon/execenv/sidecar_manifest_test.go
@@ -148,6 +148,7 @@ var allFileBasedProviders = []string{
"codex",
"copilot",
"opencode",
+ "codearts",
"openclaw",
"hermes",
"pi",
@@ -633,6 +634,7 @@ var sameSlugSkillProviderCases = []struct {
{"codebuddy", filepath.Join(".codebuddy", "skills", "issue-review")},
{"copilot", filepath.Join(".github", "skills", "issue-review")},
{"opencode", filepath.Join(".opencode", "skills", "issue-review")},
+ {"codearts", filepath.Join(".codeartsdoer", "skills", "issue-review")},
{"openclaw", filepath.Join("skills", "issue-review")},
{"pi", filepath.Join(".pi", "skills", "issue-review")},
{"omp", filepath.Join(".omp", "skills", "issue-review")},
diff --git a/server/internal/daemon/local_skills.go b/server/internal/daemon/local_skills.go
index 6fddf23e25..b7fa631b73 100644
--- a/server/internal/daemon/local_skills.go
+++ b/server/internal/daemon/local_skills.go
@@ -159,6 +159,8 @@ func localSkillRootsForProvider(provider string) ([]localSkillRoot, bool, error)
providerRoot = filepath.Join(home, ".copilot", "skills")
case "opencode":
providerRoot = filepath.Join(home, ".config", "opencode", "skills")
+ case "codearts":
+ providerRoot = filepath.Join(home, ".codeartsdoer", "skills")
case "deveco":
providerRoot = filepath.Join(home, ".config", "deveco", "skills")
case "openclaw":
diff --git a/server/internal/daemon/repocache/cache.go b/server/internal/daemon/repocache/cache.go
index 25b4d0d2ad..09827f401d 100644
--- a/server/internal/daemon/repocache/cache.go
+++ b/server/internal/daemon/repocache/cache.go
@@ -61,6 +61,7 @@ var agentGitExcludePatterns = []string{
"AGENTS.md",
".claude",
".opencode",
+ ".codeartsdoer",
".deveco",
"CODEBUDDY.md",
".codebuddy",
diff --git a/server/internal/daemon/repocache/cache_test.go b/server/internal/daemon/repocache/cache_test.go
index b2a04945b4..9541048570 100644
--- a/server/internal/daemon/repocache/cache_test.go
+++ b/server/internal/daemon/repocache/cache_test.go
@@ -1100,6 +1100,9 @@ func TestCreateWorktreeExcludesOpenCodeSkills(t *testing.T) {
if !strings.Contains(exclude, ".opencode\n") {
t.Fatalf("expected .git/info/exclude to contain .opencode, got:\n%s", exclude)
}
+ if !strings.Contains(exclude, ".codeartsdoer\n") {
+ t.Fatalf("expected .git/info/exclude to contain .codeartsdoer, got:\n%s", exclude)
+ }
if strings.Contains(exclude, ".config/opencode") {
t.Fatalf("expected .git/info/exclude to not contain stale .config/opencode, got:\n%s", exclude)
}
diff --git a/server/internal/daemon/runtime_mcp.go b/server/internal/daemon/runtime_mcp.go
index c0dc383dac..4bb5765ee6 100644
--- a/server/internal/daemon/runtime_mcp.go
+++ b/server/internal/daemon/runtime_mcp.go
@@ -54,7 +54,7 @@ func mergeRuntimeAndAgentMcpConfig(provider string, agentConfig json.RawMessage)
agentServers := map[string]any{}
if servers, ok := nestedRuntimeMcpMap(agentDocument, "mcpServers"); ok {
agentServers = servers
- } else if provider == "opencode" {
+ } else if provider == "opencode" || provider == "codearts" {
// Older OpenCode agents may store the provider-native top-level `mcp`
// map. Its individual entries can still flow through the existing
// OpenCode adapter when placed under the canonical mcpServers envelope.
@@ -78,6 +78,22 @@ func mergeRuntimeAndAgentMcpConfig(provider string, agentConfig json.RawMessage)
return raw, nil
}
+// codeArtsUserConfigPath returns the first CodeArts user config file present,
+// following the official launcher's codearts_cli.json/codearts_cli.jsonc order.
+func codeArtsUserConfigPath(home string) string {
+ configDir := filepath.Join(home, ".codeartsdoer")
+ candidates := []string{
+ filepath.Join(configDir, "codearts_cli.json"),
+ filepath.Join(configDir, "codearts_cli.jsonc"),
+ }
+ for _, candidate := range candidates {
+ if info, err := os.Stat(candidate); err == nil && !info.IsDir() {
+ return candidate
+ }
+ }
+ return candidates[0]
+}
+
// codebuddyUserMcpConfigPath returns the user-scope MCP config file CodeBuddy
// actually reads.
//
@@ -253,6 +269,8 @@ func loadRuntimeMcpServerConfigs(provider string) (map[string]any, bool, error)
switch provider {
case "claude":
path, key, format = filepath.Join(home, ".claude.json"), "mcpServers", "json"
+ case "codearts":
+ path, key, format = codeArtsUserConfigPath(home), "mcp", "jsonc"
// codebuddy is deliberately absent. CodeBuddy loads its own user, project
// and local scopes on every launch (codebuddy.go never passes
// --strict-mcp-config), and a managed entry already wins a same-name
@@ -379,6 +397,8 @@ func listRuntimeLocalMcpServers(provider string) ([]runtimeLocalMcpServerSummary
switch provider {
case "claude":
path, key, source, format = filepath.Join(home, ".claude.json"), "mcpServers", "User config", "json"
+ case "codearts":
+ path, key, source, format = codeArtsUserConfigPath(home), "mcp", "User config", "jsonc"
case "codebuddy":
path, key, source, format = codebuddyUserMcpConfigPath(home), "mcpServers", "User config", "jsonc"
case "kimi":
diff --git a/server/internal/daemon/runtime_mcp_test.go b/server/internal/daemon/runtime_mcp_test.go
index 552485270d..3c42f28f59 100644
--- a/server/internal/daemon/runtime_mcp_test.go
+++ b/server/internal/daemon/runtime_mcp_test.go
@@ -224,6 +224,73 @@ func TestMergeRuntimeAndAgentMcpConfigNullKeepsNativeInheritance(t *testing.T) {
}
}
+func TestCodeArtsMcpConfigLoadsJSONCAndAgentWins(t *testing.T) {
+ home := t.TempDir()
+ t.Setenv("HOME", home)
+ t.Setenv("USERPROFILE", home)
+ configDir := filepath.Join(home, ".codeartsdoer")
+ if err := os.MkdirAll(configDir, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ config := `{
+ // CodeArts uses the OpenCode-compatible top-level key.
+ "mcp": {
+ "runtime-only": {"command": "runtime-cmd"},
+ "shared": {"url": "https://runtime.example/mcp"},
+ },
+}`
+ if err := os.WriteFile(filepath.Join(configDir, "codearts_cli.jsonc"), []byte(config), 0o600); err != nil {
+ t.Fatal(err)
+ }
+
+ merged, err := mergeRuntimeAndAgentMcpConfig("codearts", json.RawMessage(`{"mcp":{"shared":{"command":"agent-shared"},"agent-only":{"command":"agent-cmd"}}}`))
+ if err != nil {
+ t.Fatal(err)
+ }
+ var document struct {
+ McpServers map[string]map[string]any `json:"mcpServers"`
+ }
+ if err := json.Unmarshal(merged, &document); err != nil {
+ t.Fatal(err)
+ }
+ if len(document.McpServers) != 3 {
+ t.Fatalf("merged servers = %#v", document.McpServers)
+ }
+ if got := document.McpServers["shared"]["command"]; got != "agent-shared" {
+ t.Fatalf("shared command = %#v, want agent-shared", got)
+ }
+
+ servers, supported, err := listRuntimeLocalMcpServers("codearts")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if !supported || len(servers) != 2 {
+ t.Fatalf("supported=%v servers=%#v", supported, servers)
+ }
+}
+
+func TestCodeArtsMcpConfigPrefersJSONOverJSONC(t *testing.T) {
+ home := t.TempDir()
+ configDir := filepath.Join(home, ".codeartsdoer")
+ if err := os.MkdirAll(configDir, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ jsonPath := filepath.Join(configDir, "codearts_cli.json")
+ jsoncPath := filepath.Join(configDir, "codearts_cli.jsonc")
+ if err := os.WriteFile(jsoncPath, []byte(`{"mcp":{}}`), 0o600); err != nil {
+ t.Fatal(err)
+ }
+ if got := codeArtsUserConfigPath(home); got != jsoncPath {
+ t.Fatalf("JSONC-only path = %q, want %q", got, jsoncPath)
+ }
+ if err := os.WriteFile(jsonPath, []byte(`{"mcp":{}}`), 0o600); err != nil {
+ t.Fatal(err)
+ }
+ if got := codeArtsUserConfigPath(home); got != jsonPath {
+ t.Fatalf("JSON path = %q, want %q", got, jsonPath)
+ }
+}
+
// CodeBuddy resolves its own config: `$CODEBUDDY_CONFIG_DIR` (default
// `~/.codebuddy`), user-scope MCP from the first existing of
// `<configDir>/.mcp.json` -> `<configDir>/mcp.json` -> `~/.codebuddy.json`,
diff --git a/server/internal/daemon/runtime_profile_test.go b/server/internal/daemon/runtime_profile_test.go
index a81909421e..3e832392fa 100644
--- a/server/internal/daemon/runtime_profile_test.go
+++ b/server/internal/daemon/runtime_profile_test.go
@@ -258,6 +258,48 @@ func TestRegisterRuntimes_AppendsProfileRuntime(t *testing.T) {
}
}
+// TestRegisterRuntimes_ProfileReusesDiscoveredProviderCommand verifies that a
+// bare profile command can use the matching provider path already found by the
+// daemon's richer discovery logic. GUI-launched daemons may not have a CLI on
+// PATH even when discovery found it through a login shell or a provider's
+// stable user install directory.
+func TestRegisterRuntimes_ProfileReusesDiscoveredProviderCommand(t *testing.T) {
+ t.Cleanup(stubAgentVersion(t))
+ stubLookPath(t, map[string]string{})
+
+ profiles := []RuntimeProfile{{
+ ID: "prof-codearts",
+ WorkspaceID: "ws-1",
+ DisplayName: "CodeArts Profile",
+ ProtocolFamily: "codearts",
+ CommandName: "codearts",
+ Enabled: true,
+ }}
+ fx := newProfileRegisterFixture(t, profiles, http.StatusOK)
+ d := fx.daemon
+ d.cfg.Agents = map[string]AgentEntry{
+ "codearts": {
+ Path: `C:\Users\tester\.codeartsdoer\installers\codearts.cmd`,
+ Command: "codearts",
+ },
+ }
+
+ if _, _, _, err := d.registerRuntimesForWorkspaceLocked(context.Background(), "ws-1"); err != nil {
+ t.Fatalf("registerRuntimesForWorkspace: %v", err)
+ }
+
+ got := d.profileLaunchSpecs["prof-codearts"]
+ if got.path != `C:\Users\tester\.codeartsdoer\installers\codearts.cmd` {
+ t.Errorf("profileLaunchSpecs[prof-codearts].path = %q, want discovered CodeArts path", got.path)
+ }
+ if len(fx.sentRuntimes) != 2 {
+ t.Fatalf("sent runtimes = %d, want built-in plus profile: %+v", len(fx.sentRuntimes), fx.sentRuntimes)
+ }
+ if fx.sentRuntimes[1]["profile_id"] != "prof-codearts" || fx.sentRuntimes[1]["type"] != "codearts" {
+ t.Fatalf("profile runtime = %+v, want CodeArts prof-codearts", fx.sentRuntimes[1])
+ }
+}
+
// TestRegisterRuntimes_ReportsProfileNotOnPath verifies a profile whose command
// is missing on this host is reported to the server as a failed profile so the
// UI can show an actionable registration error.
diff --git a/server/internal/metrics/labels.go b/server/internal/metrics/labels.go
index 31a08d1e6d..4b7e76ef62 100644
--- a/server/internal/metrics/labels.go
+++ b/server/internal/metrics/labels.go
@@ -142,6 +142,7 @@ var (
knownRuntimeProviders = map[string]string{
"antigravity": "antigravity",
"claude": "claude",
+ "codearts": "codearts",
"codebuddy": "codebuddy",
"codex": "codex",
"copilot": "copilot",
diff --git a/server/internal/metrics/labels_test.go b/server/internal/metrics/labels_test.go
index a8e3d67b04..d4b1343907 100644
--- a/server/internal/metrics/labels_test.go
+++ b/server/internal/metrics/labels_test.go
@@ -25,6 +25,7 @@ func TestNormalizeRuntimeProviderRecognizesKnownProviders(t *testing.T) {
{input: "DSH", want: "dsh"},
{input: "Dim", want: "dim"},
{input: "ZeroClaw", want: "zeroclaw"},
+ {input: "CodeArts", want: "codearts"},
}
for _, tt := range tests {
if got := NormalizeRuntimeProvider(tt.input); got != tt.want {
diff --git a/server/migrations/441_runtime_profile_add_codearts.down.sql b/server/migrations/441_runtime_profile_add_codearts.down.sql
new file mode 100644
index 0000000000..5917827cef
--- /dev/null
+++ b/server/migrations/441_runtime_profile_add_codearts.down.sql
@@ -0,0 +1,32 @@
+-- Restore the pre-441 whitelist. Existing CodeArts rows remain valid because
+-- the replacement constraint is NOT VALID, but new CodeArts profiles are
+-- blocked.
+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',
+ 'reasonix',
+ 'dsh',
+ 'kiro',
+ 'antigravity',
+ 'qoder',
+ 'qoderclicn',
+ 'traecli',
+ 'deveco',
+ 'grok',
+ 'qwen',
+ 'qwenpaw',
+ 'mcode',
+ 'dim',
+ 'zeroclaw'
+ )) NOT VALID;
diff --git a/server/migrations/441_runtime_profile_add_codearts.up.sql b/server/migrations/441_runtime_profile_add_codearts.up.sql
new file mode 100644
index 0000000000..40354cb531
--- /dev/null
+++ b/server/migrations/441_runtime_profile_add_codearts.up.sql
@@ -0,0 +1,33 @@
+-- Add Huawei Cloud CodeArts Agent as a first-party protocol family. NOT VALID
+-- preserves historical-row tolerance while enforcing the expanded whitelist
+-- for new rows.
+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',
+ 'codearts',
+ 'openclaw',
+ 'hermes',
+ 'pi',
+ 'cursor',
+ 'kimi',
+ 'reasonix',
+ 'dsh',
+ 'kiro',
+ 'antigravity',
+ 'qoder',
+ 'qoderclicn',
+ 'traecli',
+ 'deveco',
+ 'grok',
+ 'qwen',
+ 'qwenpaw',
+ 'mcode',
+ 'dim',
+ 'zeroclaw'
+ )) NOT VALID;
diff --git a/server/pkg/agent/agent.go b/server/pkg/agent/agent.go
index 8a4ed83ada..ea8d8dad3f 100644
--- a/server/pkg/agent/agent.go
+++ b/server/pkg/agent/agent.go
@@ -243,7 +243,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, reasonix, dsh, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen, qwenpaw, mcode, dim, zeroclaw)
+ ExecutablePath string // path to CLI binary (claude, codebuddy, codex, copilot, opencode, codearts, openclaw, hermes, pi, cursor, kimi, reasonix, dsh, kiro-cli, agy, qodercli, qoderclicn, traecli, grok, qwen, qwenpaw, mcode, dim, zeroclaw)
CLIVersion string // detected version paired with ExecutablePath; observation only, never used to choose behavior
Env map[string]string // extra environment variables
Logger *slog.Logger
@@ -278,7 +278,7 @@ 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", "reasonix", "dsh", "kiro", "antigravity", "qoder", "qoderclicn", "traecli", "grok", "qwen", "qwenpaw", "mcode".
+// Supported types: "claude", "codebuddy", "codex", "copilot", "opencode", "codearts", "deveco", "openclaw", "hermes", "pi", "cursor", "kimi", "reasonix", "dsh", "kiro", "antigravity", "qoder", "qoderclicn", "traecli", "grok", "qwen", "qwenpaw", "mcode".
//
// SupportedTypes is the canonical whitelist of agent types eligible to back a
// custom runtime profile. It MUST stay in lockstep with the
@@ -286,10 +286,10 @@ type Config struct {
// migration 134 to add qoder, migration 136 to add traecli, migration 175 to
// add deveco, migration 179 to add grok, migration 202 to add qwen,
// migration 242 to add qoderclicn, migration 253 to add qwenpaw,
-// migration 254 to add reasonix, migration 313 to add dsh, migration 327 to
-// add mcode, migration 370 to add dim, migration 403 to add zeroclaw): a
-// custom runtime profile may only
-// be based on a backend Multica officially supports.
+// migration 254 to add reasonix, migration 313 to add dsh, migration 342 to
+// add mcode, migration 370 to add dim, migration 403 to add zeroclaw, and
+// migration 441 to add codearts): a custom runtime profile may
+// only be based on a backend Multica officially supports.
// 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
@@ -303,6 +303,7 @@ var SupportedTypes = []string{
"codex",
"copilot",
"opencode",
+ "codearts",
"deveco",
"openclaw",
"hermes",
@@ -353,6 +354,7 @@ var resumeRejectionUndetectable = map[string]bool{
"cursor": true,
"deveco": true,
"opencode": true,
+ "codearts": true,
}
// ResumeRejectionUndetectable reports whether agentType is a backend that
@@ -388,6 +390,8 @@ func New(agentType string, cfg Config) (Backend, error) {
return &copilotBackend{cfg: cfg}, nil
case "opencode":
return &opencodeBackend{cfg: cfg}, nil
+ case "codearts":
+ return newCodeArtsBackend(cfg)
case "deveco":
return &devecoBackend{cfg: cfg}, nil
case "openclaw":
@@ -452,6 +456,7 @@ var launchHeaders = map[string]string{
"codex": "codex app-server",
"copilot": "copilot (json)",
"cursor": "cursor-agent (stream-json)",
+ "codearts": "codearts run (json)",
"deveco": "deveco run (json)",
"hermes": "hermes acp",
"kimi": "kimi acp",
diff --git a/server/pkg/agent/agent_supported_types_test.go b/server/pkg/agent/agent_supported_types_test.go
index d1b5f8b6fb..f4dfcb143c 100644
--- a/server/pkg/agent/agent_supported_types_test.go
+++ b/server/pkg/agent/agent_supported_types_test.go
@@ -38,7 +38,7 @@ func TestSupportedTypesLockstepWithNew(t *testing.T) {
func TestSupportedTypesMatchesMigrationWhitelist(t *testing.T) {
want := map[string]bool{
"claude": true, "codebuddy": true, "codex": true, "copilot": true,
- "opencode": true, "deveco": true, "openclaw": true, "hermes": true,
+ "opencode": true, "codearts": true, "deveco": true, "openclaw": true, "hermes": true,
"pi": true, "cursor": true, "kimi": true, "reasonix": true, "dsh": true, "kiro": true, "antigravity": true,
"qoder": true, "qoderclicn": true, "traecli": true, "grok": true, "qwen": true, "qwenpaw": true, "mcode": true,
"dim": true, "zeroclaw": true,
diff --git a/server/pkg/agent/claude.go b/server/pkg/agent/claude.go
index c85ed7d2e3..14d9c20ddd 100644
--- a/server/pkg/agent/claude.go
+++ b/server/pkg/agent/claude.go
@@ -10,6 +10,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "runtime"
"strings"
"sync"
"sync/atomic"
@@ -1105,6 +1106,11 @@ var detectVersionTimeout = 10 * time.Second
func detectCLIVersion(ctx context.Context, runtimeCmd Command) (string, error) {
ctx, cancel := context.WithTimeout(ctx, detectVersionTimeout)
defer cancel()
+ if runtime.GOOS == "windows" {
+ if native := resolveCodeArtsNativeFromShim(runtimeCmd.Path, os.Stat); native != "" {
+ runtimeCmd.Path = native
+ }
+ }
// outputOwned, not the collector in run_collect_quiet.go, and the difference
// is which signal means "the answer is in". A broken CLI (node/bun shim) can
diff --git a/server/pkg/agent/claude_deadlock_test.go b/server/pkg/agent/claude_deadlock_test.go
index 886a62edaf..83a8929b1a 100644
--- a/server/pkg/agent/claude_deadlock_test.go
+++ b/server/pkg/agent/claude_deadlock_test.go
@@ -20,6 +20,10 @@ import (
// invoked with a real agent CLI's argv: TestMain runs before the testing
// package parses flags, so arguments like `run --format json` never reach it.
func TestMain(m *testing.M) {
+ if os.Getenv(codeartsModelHelperEnv) == "1" {
+ runFakeCodeArtsModelHelper()
+ os.Exit(0)
+ }
if os.Getenv(opencodeStdinHelperEnv) == "1" {
runFakeOpencodeStdinHelper()
os.Exit(0)
diff --git a/server/pkg/agent/codearts.go b/server/pkg/agent/codearts.go
new file mode 100644
index 0000000000..857924938a
--- /dev/null
+++ b/server/pkg/agent/codearts.go
@@ -0,0 +1,807 @@
+package agent
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "log/slog"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "regexp"
+ "runtime"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "syscall"
+ "time"
+)
+
+// codeartsTerminateGraceNanos optionally overrides, in nanoseconds, how long a
+// cancelled codearts process is given to exit after SIGTERM before it (and its
+// whole process group) is SIGKILLed. Zero means use the default. It is atomic
+// so tests can shorten the grace without racing the cancellation goroutine that
+// reads it. See the cancellation handler in Execute for why termination must
+// precede closing the stdout pipe (#4533).
+var codeartsTerminateGraceNanos atomic.Int64
+
+func codeartsTerminateGrace() time.Duration {
+ if n := codeartsTerminateGraceNanos.Load(); n > 0 {
+ return time.Duration(n)
+ }
+ return 5 * time.Second
+}
+
+// codeartsBlockedArgs are flags hardcoded by the daemon that must not be
+// overridden by user-configured custom_args.
+var codeartsBlockedArgs = map[string]blockedArgMode{
+ "--format": blockedWithValue, // JSON output format for daemon communication
+ "--auto": blockedStandalone, // daemon-owned non-interactive permission mode
+ "--sandbox": blockedStandalone, // daemon-owned sandbox policy
+ "--dir": blockedWithValue, // unsupported; cmd.Dir owns the workdir
+ "--variant": blockedWithValue, // unsupported by CodeArts
+ "--dangerously-skip-permissions": blockedStandalone, // OpenCode-only permission flag
+}
+
+// codeartsBackend is an independent adapter for Huawei Cloud CodeArts CLI.
+// CodeArts is derived from OpenCode, but its command surface, launcher
+// environment, authentication behavior, and event evolution are owned here so
+// changes to the OpenCode backend cannot silently change CodeArts execution.
+type codeartsBackend struct {
+ cfg Config
+}
+
+func newCodeArtsBackend(cfg Config) (Backend, error) {
+ if cfg.Logger == nil {
+ cfg.Logger = slog.Default()
+ }
+ return &codeartsBackend{cfg: cfg}, nil
+}
+
+func (b *codeartsBackend) Execute(ctx context.Context, prompt string, opts ExecOptions) (*Session, error) {
+ execPath := b.cfg.ExecutablePath
+ if execPath == "" {
+ execPath = "codearts"
+ }
+ resolved, err := exec.LookPath(execPath)
+ if err != nil {
+ return nil, fmt.Errorf("codearts executable not found at %q: %w", execPath, err)
+ }
+ if runtime.GOOS == "windows" {
+ if native := resolveCodeArtsNativeFromShim(resolved, os.Stat); native != "" {
+ b.cfg.Logger.Info("codearts resolved to native binary to avoid .cmd shim argv truncation", "shim", resolved, "native", native)
+ resolved = native
+ }
+ }
+ execPath = resolved
+
+ timeout := opts.Timeout
+ runCtx, cancel := runContext(ctx, timeout)
+
+ args := []string{"run", "--format", "json", "--auto"}
+ // CodeArts does not expose OpenCode's --dir flag. cmd.Dir and PWD below
+ // independently anchor its project and skill discovery at the task workdir.
+ if opts.Model != "" {
+ args = append(args, "--model", opts.Model)
+ }
+ if opts.ThinkingLevel != "" {
+ b.cfg.Logger.Warn("codearts does not support thinking-level overrides; ignoring", "thinkingLevel", opts.ThinkingLevel)
+ }
+ // CodeArts's `run` subcommand has no --prompt flag. The runtime brief reaches
+ // the agent through the per-task AGENTS.md the daemon writes into the
+ // workdir, and the task prompt is delivered on stdin below.
+ if opts.MaxTurns > 0 {
+ b.cfg.Logger.Warn("codearts does not support --max-turns; ignoring", "maxTurns", opts.MaxTurns)
+ }
+ if opts.ResumeSessionID != "" {
+ args = append(args, "--session", opts.ResumeSessionID)
+ }
+ args = append(args, filterCustomArgs(opts.CustomArgs, codeartsBlockedArgs, b.cfg.Logger)...)
+ // The task prompt is delivered on stdin, never argv — see the StdinPipe
+ // wiring below. `codearts run` merges its variadic [message..] positional
+ // with whatever is piped in, so an invocation that passes no positional
+ // makes the piped text the entire run message. Inlining it instead fails
+ // hard on Windows: CreateProcess caps lpCommandLine at 32,767 characters
+ // (8,191 when a .cmd shim routes the call through cmd.exe), and a prompt
+ // carrying the workspace's models and skills clears that on its own — the
+ // process then never starts and Go surfaces the misleading "The filename or
+ // extension is too long" (#6538). Keeping the prompt off argv also keeps it
+ // out of OS process listings; the shared command logger separately redacts
+ // argv values.
+
+ runtimeCmd := b.cfg.commandAt(execPath)
+ cmd := runtimeCmd.exec(runCtx, args...)
+ hideAgentWindow(cmd)
+ // Run codearts in its own process group so cancellation can reach the
+ // whole tree (codearts plus any tool subprocess it spawns), not just the
+ // direct child — otherwise a cancelled or restarted run can orphan a
+ // descendant that keeps spinning (#4533).
+ configureProcessGroup(cmd)
+ // Take over context cancellation. The default CommandContext behaviour
+ // SIGKILLs only the leader the instant runCtx is done; we instead drive a
+ // graceful, group-wide SIGTERM→SIGKILL from the cancellation goroutine
+ // below and close the stdout read end only after the tree has been
+ // signalled. Returning nil here keeps os/exec from racing us with its own
+ // kill; WaitDelay remains the hard backstop.
+ cmd.Cancel = func() error { return nil }
+ b.cfg.logAgentCommandWithPrompt(cmd, newAgentCommandLogArgs(args, trustAgentCommandPositional(0, "run")), len(prompt))
+ cmd.WaitDelay = 10 * time.Second
+ if opts.Cwd != "" {
+ cmd.Dir = opts.Cwd
+ }
+
+ env := buildCodeArtsEnv(b.cfg.Env)
+ // Override PWD as well as cmd.Dir because the underlying CodeArts engine
+ // consults it while resolving project configuration and skills.
+ if opts.Cwd != "" {
+ env = append(env, "PWD="+opts.Cwd)
+ }
+ // Project agent.mcp_config into CodeArts via OPENCODE_CONFIG_CONTENT —
+ // CodeArts's general inline-config injection mechanism that merges at
+ // "local" scope (after the project-config loop, before remote / managed
+ // configs). MCP is the only field we currently project there; if a
+ // future Multica field needs the same channel it would assemble a
+ // combined CodeArts config slice before the env append.
+ //
+ // This deliberately leaves project configuration untouched because the
+ // workdir is reused across turns for the same (agent, issue).
+ mcpContent, err := buildCodeArtsMCPConfigContent(opts.McpConfig)
+ if err != nil {
+ cancel()
+ return nil, err
+ }
+ if mcpContent != "" {
+ if _, dup := b.cfg.Env["OPENCODE_CONFIG_CONTENT"]; dup {
+ b.cfg.Logger.Warn("agent.custom_env sets OPENCODE_CONFIG_CONTENT but agent.mcp_config takes precedence and overrides it")
+ }
+ env = append(env, "OPENCODE_CONFIG_CONTENT="+mcpContent)
+ }
+ cmd.Env = env
+
+ stdout, err := cmd.StdoutPipe()
+ if err != nil {
+ cancel()
+ return nil, fmt.Errorf("codearts stdout pipe: %w", err)
+ }
+ stdin, err := cmd.StdinPipe()
+ if err != nil {
+ cancel()
+ return nil, fmt.Errorf("codearts stdin pipe: %w", err)
+ }
+ var closeStdinOnce sync.Once
+ closeStdin := func() { closeStdinOnce.Do(func() { _ = stdin.Close() }) }
+ cmd.Stderr = newLogWriter(b.cfg.Logger, "[codearts:stderr] ")
+
+ if err := startOwnedProcessTree(cmd, b.cfg.Logger); err != nil {
+ closeStdin()
+ cancel()
+ return nil, fmt.Errorf("start codearts: %w", err)
+ }
+
+ b.cfg.Logger.Info("codearts started", "pid", cmd.Process.Pid, "cwd", opts.Cwd, "model", opts.Model)
+
+ msgCh := make(chan Message, 256)
+ resCh := make(chan Result, 1)
+
+ // procDone closes once cmd.Wait() returns, letting the cancellation handler
+ // skip a process that already exited and avoid signalling a dead pid.
+ procDone := make(chan struct{})
+
+ // Write the prompt from its own goroutine so it cannot deadlock against the
+ // stdout reader below: a prompt larger than the OS pipe buffer (~64 KiB)
+ // blocks mid-write until CodeArts drains it, and CodeArts cannot drain while
+ // nobody is consuming its stdout. Closing stdin is what ends the prompt —
+ // CodeArts reads it to EOF (`await Bun.stdin.text()`), so a stdin left open
+ // hangs the run forever. Close on every path, success or error.
+ writeErrCh := make(chan error, 1)
+ go func() {
+ _, err := io.WriteString(stdin, prompt)
+ closeStdin()
+ writeErrCh <- err
+ }()
+
+ // On cancellation / timeout, terminate codearts (and the tool subprocesses
+ // it spawned) BEFORE unblocking the scanner. The previous implementation
+ // closed the stdout read end immediately, which can leave the child writing
+ // into a closed pipe and spinning on EPIPE. Instead we SIGTERM the whole
+ // process group, give it a grace period to exit cleanly, then SIGKILL it.
+ // SIGKILL is uncatchable, so once it is delivered no group member can run
+ // (or write) again — only then is it safe to close the stdout read end as a
+ // last-resort unblock for a scanner that a wedged descendant still keeps
+ // open. WaitDelay is the final backstop (#4533).
+ go func() {
+ select {
+ case <-procDone:
+ return // finished on its own; nothing to terminate
+ case <-runCtx.Done():
+ }
+ // Release a prompt write still blocked on a full stdin pipe — an
+ // CodeArts that stopped reading before draining it would otherwise
+ // strand that goroutine for the lifetime of the daemon.
+ closeStdin()
+ if cmd.Process != nil {
+ signalProcessGroup(cmd, syscall.SIGTERM)
+ select {
+ case <-procDone: // exited within the grace window
+ case <-time.After(codeartsTerminateGrace()):
+ signalProcessGroup(cmd, syscall.SIGKILL)
+ }
+ }
+ _ = stdout.Close()
+ }()
+
+ go func() {
+ defer cancel()
+ defer close(msgCh)
+ defer close(resCh)
+
+ startTime := time.Now()
+ scanResult := b.processEvents(stdout, msgCh)
+
+ // Wait for process exit, then release the cancellation handler.
+ exitErr := cmd.Wait()
+ close(procDone)
+ releaseProcessGroup(cmd)
+ duration := time.Since(startTime)
+
+ // Wait closes the process pipes, so a prompt write still blocked when
+ // CodeArts exited has returned by now. The writer sends exactly once.
+ writeErr := <-writeErrCh
+
+ if runCtx.Err() == context.DeadlineExceeded {
+ scanResult.status = "timeout"
+ scanResult.errMsg = fmt.Sprintf("codearts timed out after %s", timeout)
+ } else if runCtx.Err() == context.Canceled {
+ scanResult.status = "aborted"
+ scanResult.errMsg = "execution cancelled"
+ } else if exitErr != nil && scanResult.status == "completed" {
+ scanResult.status = "failed"
+ scanResult.errMsg = fmt.Sprintf("codearts exited with error: %v", exitErr)
+ } else if exitErr != nil && scanResult.noTerminalSignal {
+ // Status is already "failed" from the terminal-signal guard; append
+ // the process exit detail so a mid-step crash still surfaces the
+ // signal / exit code that killed it.
+ scanResult.errMsg = fmt.Sprintf("%s; codearts exited with error: %v", scanResult.errMsg, exitErr)
+ } else if writeErr != nil && !scanResult.sawTerminalSignal {
+ // A failed prompt write is only benign once the run is PROVEN to have
+ // finished: CodeArts reads stdin to EOF before it does any work, so a
+ // run that reached a terminal signal necessarily received the whole
+ // prompt, and an EPIPE recorded after that just means the pipe closed
+ // on its way out — failing on it would discard a successful result.
+ //
+ // Absence of failure is not that proof. status starts at "completed"
+ // and processEvents only fails closed on structural evidence, so a
+ // child that emits nothing and exits 0 still reports "completed". If
+ // the prompt never landed, that is precisely the run we must not pass
+ // off as a clean success, so key on sawTerminalSignal instead.
+ // Append rather than overwrite so the stream's own diagnosis survives.
+ if scanResult.errMsg == "" {
+ scanResult.errMsg = fmt.Sprintf("codearts prompt write failed: %v", writeErr)
+ } else {
+ scanResult.errMsg = fmt.Sprintf("%s; codearts prompt write failed: %v", scanResult.errMsg, writeErr)
+ }
+ scanResult.status = "failed"
+ }
+
+ b.cfg.Logger.Info("codearts finished", "pid", cmd.Process.Pid, "status", scanResult.status, "duration", duration.Round(time.Millisecond).String())
+
+ // Build usage map. CodeArts doesn't report model per-step, so we
+ // attribute all usage to the configured model (or "unknown").
+ var usage map[string]TokenUsage
+ u := scanResult.usage
+ if u.InputTokens > 0 || u.OutputTokens > 0 || u.CacheReadTokens > 0 || u.CacheWriteTokens > 0 {
+ model := opts.Model
+ if model == "" {
+ model = "unknown"
+ }
+ usage = map[string]TokenUsage{model: u}
+ }
+
+ resCh <- Result{
+ Status: scanResult.status,
+ Output: scanResult.output,
+ Error: scanResult.errMsg,
+ DurationMs: duration.Milliseconds(),
+ SessionID: scanResult.sessionID,
+ Usage: usage,
+ }
+ }()
+
+ return &Session{Messages: msgCh, Result: resCh}, nil
+}
+
+// ── Event handlers ──
+
+// codeArtsEventResult holds the accumulated state from processing the event stream.
+type codeArtsEventResult struct {
+ status string
+ errMsg string
+ output string
+ sessionID string
+ usage TokenUsage // accumulated token usage across all steps
+ noTerminalSignal bool // guard fired: the stream ended without evidence the run actually finished
+ // sawTerminalSignal is positive evidence that the run actually finished: a
+ // step_finish closed the last step with no continuation pending and with
+ // something to show for it. It is NOT the negation of noTerminalSignal — a
+ // stream with no events at all sets neither, because there is nothing to
+ // fail closed on and nothing that proves completion either. Callers that
+ // need "this run really completed" must test this field; status defaults to
+ // "completed" and cannot carry that meaning on its own.
+ sawTerminalSignal bool
+}
+
+// processEvents reads JSON lines from r, dispatches events to ch, and returns
+// the accumulated result. This is the core scanner loop, extracted for testability.
+func (b *codeartsBackend) processEvents(r io.Reader, ch chan<- Message) codeArtsEventResult {
+ var output strings.Builder
+ var unparsedOutput strings.Builder
+ var sessionID string
+ var usage TokenUsage
+ parsedEvents := 0
+ finalStatus := "completed"
+ var finalError string
+
+ // Track step bracketing so a stream that ends mid-step is not mistaken for a
+ // clean completion. CodeArts's JSON stream has no terminal result event
+ // (unlike Claude's type:"result"), so "no error seen" is not proof the run
+ // finished. codearts emits tool_use only on terminal states (completed or
+ // error), so a dangling tool call implies an unclosed step — step bracketing
+ // is the positive terminal signal. Recovered tool errors (state.status ==
+ // "error") are normal in healthy runs and must not affect status.
+ //
+ // Step bracketing alone is not enough: step_finish carries a reason
+ // (FinishReason: "stop", "tool-calls", …), and a run that still has tool
+ // results to feed back normally closes its step with reason "tool-calls"
+ // before the next step_start. Some providers return "stop" despite emitting
+ // tool calls, though, and CodeArts deliberately continues those runs when a
+ // non-provider-executed tool result must be fed back to the model. Track both
+ // signals so EOF in either continuation gap fails closed. A missing reason
+ // retains the older step-bracketing behavior for protocol compatibility.
+ openStep := false // between a step_start and its step_finish
+ stepHasContinuationTool := false // current step has a local tool result CodeArts must feed back
+ awaitingContinuation := false // the last step_finish still required another step
+ sawStepFinish := false // at least one step closed; see codeArtsEventResult.sawTerminalSignal
+
+ // Step bracketing still misses a third shape: a step that opens and closes
+ // cleanly while carrying nothing at all — no text, no tool call, and no
+ // reported usage whatsoever (#6522, observed as step_finish reason "unknown"
+ // with every token counter and the cost at 0). No usage means the provider
+ // round-trip never happened, so that step is a dead stream wearing a clean
+ // finish, and ending a run on one is another false-green completion.
+ //
+ // The criterion is deliberately "this step produced nothing", NOT "the run
+ // produced no text": a task whose only deliverable is a tool side effect is
+ // legitimate and must stay green. Any single sign of life — text, a tool
+ // call, or any usage field the protocol reports — keeps the step productive.
+ // This is also why the reason itself is not consulted: a missing or
+ // unrecognised reason stays terminal for protocol compatibility (see the
+ // back-compat regression), and voidness is orthogonal to it.
+ stepProducedOutput := false // current step emitted text, a tool call, or reported usage
+ lastStepVoid := false // the most recently closed step produced nothing at all
+
+ scanner := newAgentStreamScanner(r)
+
+ for scanner.Scan() {
+ line := strings.TrimSpace(scanner.Text())
+ if line == "" {
+ continue
+ }
+
+ var event codeartsEvent
+ if err := json.Unmarshal([]byte(line), &event); err != nil {
+ if unparsedOutput.Len() < 4096 {
+ if unparsedOutput.Len() > 0 {
+ unparsedOutput.WriteByte('\n')
+ }
+ remaining := 4096 - unparsedOutput.Len()
+ if len(line) > remaining {
+ line = line[:remaining]
+ }
+ unparsedOutput.WriteString(line)
+ }
+ continue
+ }
+ parsedEvents++
+
+ if event.SessionID != "" {
+ sessionID = event.SessionID
+ }
+
+ switch event.Type {
+ case "text":
+ b.handleTextEvent(event, ch, &output)
+ if event.Part.Text != "" {
+ stepProducedOutput = true
+ }
+ case "tool_use":
+ b.handleToolUseEvent(event, ch)
+ stepProducedOutput = true
+ if event.Part.Metadata == nil || !event.Part.Metadata.ProviderExecuted {
+ stepHasContinuationTool = true
+ }
+ case "error":
+ b.handleErrorEvent(event, ch, &finalStatus, &finalError)
+ case "step_start":
+ openStep = true
+ stepHasContinuationTool = false
+ awaitingContinuation = false
+ stepProducedOutput = false
+ trySend(ch, Message{Type: MessageStatus, Status: "running"})
+ case "step_finish":
+ openStep = false
+ sawStepFinish = true
+ awaitingContinuation = event.Part.Reason == "tool-calls" ||
+ (event.Part.Reason != "" && stepHasContinuationTool)
+ stepHasContinuationTool = false
+ // Accumulate token usage from step_finish events. Only the fields
+ // TokenUsage models are billed; every reported field additionally
+ // counts as proof the provider round-trip happened, which is what
+ // keeps a productive step out of the void-step guard below.
+ if t := event.Part.Tokens; t != nil {
+ usage.InputTokens += t.Input
+ usage.OutputTokens += t.Output
+ if t.Cache != nil {
+ usage.CacheReadTokens += t.Cache.Read
+ usage.CacheWriteTokens += t.Cache.Write
+ }
+ }
+ if codeArtsStepReportedUsage(&event.Part) {
+ stepProducedOutput = true
+ }
+ lastStepVoid = !stepProducedOutput
+ }
+ }
+
+ // Check for scanner errors (e.g. broken pipe, read errors).
+ if scanErr := scanner.Err(); scanErr != nil {
+ b.cfg.Logger.Warn("codearts stdout scanner error", "error", scanErr)
+ if finalStatus == "completed" {
+ finalStatus = "failed"
+ finalError = fmt.Sprintf("stdout read error: %v", scanErr)
+ }
+ }
+
+ // Require a positive terminal signal. A clean EOF while a step is still
+ // open — right after a step that finished with reason "tool-calls", whose
+ // continuation step never started — or on a step that carried nothing at
+ // all means the run did not finish: its provider stream died and
+ // `codearts run` exited without emitting an error event. Fail closed on
+ // that structural evidence rather than reporting a false-green completion.
+ noTerminalSignal := false
+ if finalStatus == "completed" && parsedEvents == 0 {
+ finalStatus = "failed"
+ finalError = "codearts returned no parseable JSON events"
+ if detail := sanitizeCLIOutput(unparsedOutput.String()); detail != "" {
+ finalError += ": " + detail
+ }
+ noTerminalSignal = true
+ }
+ if finalStatus == "completed" {
+ switch {
+ case openStep:
+ finalStatus = "failed"
+ finalError = "codearts stream ended without a terminal signal (step still open at EOF)"
+ noTerminalSignal = true
+ case awaitingContinuation:
+ finalStatus = "failed"
+ finalError = "codearts stream ended without a terminal signal (last step required a continuation that never started)"
+ noTerminalSignal = true
+ case lastStepVoid:
+ finalStatus = "failed"
+ finalError = "codearts stream ended on an empty step (no text, no tool call, no reported usage) — the provider produced nothing"
+ noTerminalSignal = true
+ }
+ }
+
+ return codeArtsEventResult{
+ status: finalStatus,
+ errMsg: finalError,
+ output: output.String(),
+ sessionID: sessionID,
+ usage: usage,
+ noTerminalSignal: noTerminalSignal,
+ sawTerminalSignal: sawStepFinish && !noTerminalSignal,
+ }
+}
+
+// codeArtsStepReportedUsage reports whether a step_finish part carries any evidence
+// that the provider round-trip actually happened.
+//
+// CodeArts's protocol keeps reasoning and the aggregate total in fields of
+// their own alongside input/output/cache, and reports cost as a sibling of the
+// whole token block — a step can legitimately land with reasoning or cost
+// positive while input and output are both zero. Checking only input/output
+// would therefore call such a step void and fail a healthy run, so every field
+// the protocol reports counts. Only an across-the-board zero means no model
+// call happened.
+//
+// The reasoning and total counters are read as evidence only, deliberately not
+// folded into TokenUsage: total is derived (adding it would double-count) and
+// TokenUsage has no reasoning bucket, so recording either here would change
+// billing figures rather than fix this bug.
+func codeArtsStepReportedUsage(part *codeartsEventPart) bool {
+ if part.Cost > 0 {
+ return true
+ }
+ t := part.Tokens
+ if t == nil {
+ return false
+ }
+ if t.Input > 0 || t.Output > 0 || t.Reasoning > 0 || t.Total > 0 {
+ return true
+ }
+ return t.Cache != nil && (t.Cache.Read > 0 || t.Cache.Write > 0)
+}
+
+func (b *codeartsBackend) handleTextEvent(event codeartsEvent, ch chan<- Message, output *strings.Builder) {
+ text := event.Part.Text
+ if text != "" {
+ output.WriteString(text)
+ trySend(ch, Message{Type: MessageText, Content: text})
+ }
+}
+
+// handleToolUseEvent processes "tool_use" events from codearts. A single
+// tool_use event contains both the call and result in part.state when the
+// tool reaches a terminal state (state.status is "completed" or "error").
+func (b *codeartsBackend) handleToolUseEvent(event codeartsEvent, ch chan<- Message) {
+ // Extract input from state.input (the tool invocation parameters).
+ var input map[string]any
+ if event.Part.State != nil && event.Part.State.Input != nil {
+ _ = json.Unmarshal(event.Part.State.Input, &input)
+ }
+
+ // Emit the tool-use message.
+ trySend(ch, Message{
+ Type: MessageToolUse,
+ Tool: event.Part.Tool,
+ CallID: event.Part.CallID,
+ Input: input,
+ })
+
+ // Pair every terminal tool-use with a tool-result. The daemon uses this
+ // pair to track in-flight tools, so dropping error results would leave its
+ // counter permanently elevated and suppress the normal idle watchdog.
+ state := event.Part.State
+ if state != nil && (state.Status == "completed" || state.Status == "error") {
+ outputStr := codeArtsExtractToolOutput(state.Output)
+ if state.Status == "error" && state.Error != "" {
+ outputStr = state.Error
+ }
+ trySend(ch, Message{
+ Type: MessageToolResult,
+ Tool: event.Part.Tool,
+ CallID: event.Part.CallID,
+ Output: outputStr,
+ })
+ }
+}
+
+// handleErrorEvent processes "error" events from codearts. CodeArts can exit
+// with RC=0 even on errors (e.g. invalid model), so error events are the
+// reliable signal for failures.
+func (b *codeartsBackend) handleErrorEvent(event codeartsEvent, ch chan<- Message, finalStatus, finalError *string) {
+ errMsg := ""
+ if event.Error != nil {
+ errMsg = event.Error.Message()
+ }
+ if errMsg == "" {
+ errMsg = "unknown codearts error"
+ }
+
+ b.cfg.Logger.Warn("codearts error event", "error", errMsg)
+ trySend(ch, Message{Type: MessageError, Content: errMsg})
+
+ *finalStatus = "failed"
+ *finalError = errMsg
+}
+
+// resolveCodeArtsNativeFromShim returns the native executable bundled next to
+// the Windows launcher. The launcher is a batch file and cannot be spawned
+// reliably by the daemon when prompts contain newlines or large payloads.
+func resolveCodeArtsNativeFromShim(shimPath string, statFn func(string) (os.FileInfo, error)) string {
+ if !strings.EqualFold(filepath.Base(shimPath), "codearts.cmd") {
+ return ""
+ }
+ candidate := filepath.Join(filepath.Dir(shimPath), "bin", "codearts.exe")
+ if _, err := statFn(candidate); err != nil {
+ return ""
+ }
+ return candidate
+}
+
+// codeArtsExtractToolOutput converts the tool state output (which may be a string or
+// structured object) into a string.
+func codeArtsExtractToolOutput(output any) string {
+ if output == nil {
+ return ""
+ }
+ if s, ok := output.(string); ok {
+ return s
+ }
+ data, _ := json.Marshal(output)
+ return string(data)
+}
+
+// ── JSON types for `codearts run --format json` stdout events ──
+
+// codeartsEvent represents a single JSON line from `codearts run --format json`.
+//
+// Event types observed in real output:
+//
+// "step_start" — agent step begins
+// "text" — text output from agent (part.text)
+// "tool_use" — tool invocation with call and result (part.tool, part.callID, part.state)
+// "error" — error from codearts (error.name, error.data.message)
+// "step_finish" — agent step completes (includes token usage)
+type codeartsEvent struct {
+ Type string `json:"type"`
+ Timestamp int64 `json:"timestamp,omitempty"`
+ SessionID string `json:"sessionID,omitempty"`
+ Part codeartsEventPart `json:"part"`
+ Error *codeartsError `json:"error,omitempty"`
+}
+
+// codeartsEventPart represents the part field in an codearts event.
+type codeartsEventPart struct {
+ ID string `json:"id,omitempty"`
+ MessageID string `json:"messageID,omitempty"`
+ SessionID string `json:"sessionID,omitempty"`
+ Type string `json:"type,omitempty"`
+
+ // Text events
+ Text string `json:"text,omitempty"`
+
+ // Tool use events
+ Tool string `json:"tool,omitempty"`
+ CallID string `json:"callID,omitempty"`
+ State *codeartsToolState `json:"state,omitempty"`
+ // CodeArts excludes provider-executed tools when deciding whether a tool
+ // result requires another model step.
+ Metadata *codeartsPartMetadata `json:"metadata,omitempty"`
+
+ // step_finish token usage
+ Tokens *codeartsTokens `json:"tokens,omitempty"`
+
+ // step_finish cost, a sibling of the token block rather than a member of
+ // it. Read only as round-trip evidence by codeArtsStepReportedUsage; codearts's
+ // billing figures come from the token counters above.
+ Cost float64 `json:"cost,omitempty"`
+
+ // step_finish reason (FinishReason: "stop", "tool-calls", …). Absent on
+ // older codearts versions whose step-finish parts predate the field.
+ Reason string `json:"reason,omitempty"`
+}
+
+type codeartsPartMetadata struct {
+ ProviderExecuted bool `json:"providerExecuted,omitempty"`
+}
+
+// codeartsTokens represents token usage in a step_finish event. Reasoning and
+// Total are separate counters in the protocol, not components of Input/Output,
+// so a step can report either while both of those are zero; they are parsed so
+// codeArtsStepReportedUsage can see them.
+type codeartsTokens struct {
+ Input int64 `json:"input"`
+ Output int64 `json:"output"`
+ Reasoning int64 `json:"reasoning,omitempty"`
+ Total int64 `json:"total,omitempty"`
+ Cache *codeartsCacheTokens `json:"cache,omitempty"`
+}
+
+type codeartsCacheTokens struct {
+ Read int64 `json:"read"`
+ Write int64 `json:"write"`
+}
+
+// codeartsToolState represents the state of a tool invocation.
+type codeartsToolState struct {
+ Status string `json:"status,omitempty"`
+ Input json.RawMessage `json:"input,omitempty"`
+ Output any `json:"output,omitempty"`
+ Error string `json:"error,omitempty"`
+}
+
+// codeartsError represents an error event from codearts.
+type codeartsError struct {
+ Name string `json:"name,omitempty"`
+ Data *codeartsErrData `json:"data,omitempty"`
+}
+
+// Message returns the human-readable error message.
+func (e *codeartsError) Message() string {
+ if e.Data != nil && e.Data.Message != "" {
+ return e.Data.Message
+ }
+ if e.Name != "" {
+ return e.Name
+ }
+ return ""
+}
+
+type codeartsErrData struct {
+ Message string `json:"message,omitempty"`
+}
+
+// buildCodeArtsEnv reproduces the environment set by the official CodeArts
+// launcher when the daemon bypasses its Windows batch shim. Agent custom_env
+// wins over these defaults, matching the rest of the backend contract.
+func buildCodeArtsEnv(extra map[string]string) []string {
+ defaults := map[string]string{
+ "package_tag": "undefined",
+ "CODEAGENT_USE_MESSAGE_FEEDBACK": "false",
+ "OMO_SEND_ANONYMOUS_TELEMETRY": "0",
+ "SCENARIO": "codeartsdoer",
+ "OPENCODE_CHANNEL": "latest",
+ "OPENCODE_CONFIG_FILE": "codearts_cli.json,codearts_cli.jsonc",
+ "OPENCODE_MODE": "tui",
+ "PLUGIN_ENV": "hc",
+ "OPENCODE_DISABLE_MODELS_FETCH": "1",
+ "OPENCODE_DISABLE_AUTOUPDATE": "true",
+ "OPENCODE_ALWAYS_NOTIFY_UPDATE": "false",
+ }
+ if home, err := os.UserHomeDir(); err == nil && home != "" {
+ configDir := filepath.Join(home, ".codeartsdoer")
+ defaults["KERNEL_DATA_DIR"] = filepath.Join(configDir, "cli-data")
+ defaults["KERNEL_CONFIG_DIR"] = configDir
+ defaults["OPENCODE_CONFIG"] = filepath.Join(configDir, "codearts_cli.json")
+ }
+ for key, value := range extra {
+ defaults[key] = value
+ }
+ return mergeEnv(os.Environ(), defaults)
+}
+
+// buildCodeArtsMCPConfigContent uses the configuration schema shared by the
+// CodeArts engine and OpenCode. Only this schema translation is shared; the
+// CodeArts process and event adapter remain independent.
+func buildCodeArtsMCPConfigContent(raw json.RawMessage) (string, error) {
+ return buildOpenCodeMCPConfigContent(raw)
+}
+
+// discoverCodeArtsModels uses the model catalog command exposed by CodeArts.
+// CodeArts does not expose OpenCode variants, so variant metadata is removed.
+func discoverCodeArtsModels(ctx context.Context, runtimeCmd Command) ([]Model, error) {
+ if runtimeCmd.Path == "" {
+ runtimeCmd.Path = "codearts"
+ }
+ resolved, err := exec.LookPath(runtimeCmd.Path)
+ if err != nil {
+ return []Model{}, nil
+ }
+ runtimeCmd.Path = resolved
+ if runtime.GOOS == "windows" {
+ if native := resolveCodeArtsNativeFromShim(runtimeCmd.Path, os.Stat); native != "" {
+ runtimeCmd.Path = native
+ }
+ }
+
+ runCtx, cancel := context.WithTimeout(ctx, 15*time.Second)
+ defer cancel()
+ run := func(args ...string) []Model {
+ cmd := runtimeCmd.exec(runCtx, args...)
+ hideAgentWindow(cmd)
+ cmd.Env = buildCodeArtsEnv(nil)
+ out, _ := outputOwned(cmd, runtimeCmd.logger)
+ models := parseOpenCodeModels(string(out))
+ for i := range models {
+ models[i].Thinking = nil
+ }
+ return models
+ }
+
+ models := run("models", "--verbose")
+ if len(models) == 0 {
+ models = run("models")
+ }
+ return models, nil
+}
+
+var ansiControlSequenceRe = regexp.MustCompile(`\x1b(?:\[[0-?]*[ -/]*[@-~]|\][^\x07]*(?:\x07|\x1b\\))`)
+
+func sanitizeCLIOutput(raw string) string {
+ raw = ansiControlSequenceRe.ReplaceAllString(raw, "")
+ raw = strings.ReplaceAll(raw, "\r", "")
+ return strings.TrimSpace(raw)
+}
diff --git a/server/pkg/agent/codearts_cancel_windows_test.go b/server/pkg/agent/codearts_cancel_windows_test.go
new file mode 100644
index 0000000000..fe58da4949
--- /dev/null
+++ b/server/pkg/agent/codearts_cancel_windows_test.go
@@ -0,0 +1,62 @@
+//go:build windows
+
+package agent
+
+import (
+ "context"
+ "log/slog"
+ "testing"
+ "time"
+)
+
+// TestCodeArtsWindowsCancellationTerminatesDescendants proves the CodeArts
+// backend opts into the owned Windows process-tree path. Killing only the
+// direct CLI process would leave the helper's descendant running.
+func TestCodeArtsWindowsCancellationTerminatesDescendants(t *testing.T) {
+ exePath, pidPath := buildDescendantSpawner(t)
+ codeartsTerminateGraceNanos.Store(int64(100 * time.Millisecond))
+ t.Cleanup(func() { codeartsTerminateGraceNanos.Store(0) })
+
+ backend, err := New("codearts", Config{
+ ExecutablePath: exePath,
+ Logger: slog.Default(),
+ Env: map[string]string{"DESCENDANT_PID_FILE": pidPath},
+ })
+ if err != nil {
+ t.Fatalf("new CodeArts backend: %v", err)
+ }
+
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ session, err := backend.Execute(ctx, "prompt", ExecOptions{Cwd: t.TempDir()})
+ if err != nil {
+ t.Fatalf("execute CodeArts: %v", err)
+ }
+ go func() {
+ for range session.Messages {
+ }
+ }()
+
+ descendantPID := waitForDescendantPid(t, pidPath)
+ if !processStillRunning(descendantPID) {
+ t.Fatalf("descendant %d was not running; the test cannot prove tree cleanup", descendantPID)
+ }
+
+ cancel()
+ select {
+ case result := <-session.Result:
+ if result.Status != "aborted" {
+ t.Fatalf("status = %q, want aborted", result.Status)
+ }
+ case <-time.After(10 * time.Second):
+ t.Fatal("CodeArts did not return after cancellation")
+ }
+
+ deadline := time.Now().Add(5 * time.Second)
+ for processStillRunning(descendantPID) && time.Now().Before(deadline) {
+ time.Sleep(20 * time.Millisecond)
+ }
+ if processStillRunning(descendantPID) {
+ t.Fatalf("descendant %d survived CodeArts cancellation", descendantPID)
+ }
+}
diff --git a/server/pkg/agent/codearts_integration_test.go b/server/pkg/agent/codearts_integration_test.go
new file mode 100644
index 0000000000..d562e345c0
--- /dev/null
+++ b/server/pkg/agent/codearts_integration_test.go
@@ -0,0 +1,49 @@
+//go:build agentintegration
+
+package agent
+
+import (
+ "context"
+ "log/slog"
+ "os"
+ "strings"
+ "testing"
+ "time"
+)
+
+func TestCodeArtsRealSmoke(t *testing.T) {
+ if os.Getenv("MULTICA_RUN_REAL_AGENT_SMOKE") != "1" {
+ t.Skip("set MULTICA_RUN_REAL_AGENT_SMOKE=1 to run an authenticated CodeArts smoke test")
+ }
+
+ backend, err := ResolveBackend("codearts", Config{
+ ExecutablePath: os.Getenv("MULTICA_CODEARTS_PATH"),
+ Logger: slog.Default(),
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute)
+ defer cancel()
+ session, err := backend.Execute(ctx, "Reply with exactly CODEARTS_SMOKE_OK and nothing else.", ExecOptions{
+ Cwd: t.TempDir(),
+ Model: os.Getenv("MULTICA_CODEARTS_MODEL"),
+ Timeout: 2 * time.Minute,
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+ go func() {
+ for range session.Messages {
+ }
+ }()
+
+ result := <-session.Result
+ if result.Status != "completed" {
+ t.Fatalf("status = %q, error = %q, output = %q", result.Status, result.Error, result.Output)
+ }
+ if !strings.Contains(result.Output, "CODEARTS_SMOKE_OK") {
+ t.Fatalf("unexpected output: %q", result.Output)
+ }
+}
diff --git a/server/pkg/agent/codearts_test.go b/server/pkg/agent/codearts_test.go
new file mode 100644
index 0000000000..856caf7728
--- /dev/null
+++ b/server/pkg/agent/codearts_test.go
@@ -0,0 +1,277 @@
+package agent
+
+import (
+ "context"
+ "fmt"
+ "log/slog"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+ "time"
+)
+
+func TestCodeArtsProtocolFamilyDispatchesToIndependentBackend(t *testing.T) {
+ if !IsSupportedType("codearts") {
+ t.Fatal("codearts must be a supported protocol family")
+ }
+ if IsBuiltinRuntime("codearts") {
+ t.Fatal("codearts must not be registered as a built-in runtime identity")
+ }
+ backend, err := New("codearts", Config{})
+ if err != nil {
+ t.Fatal(err)
+ }
+ codearts, ok := backend.(*codeartsBackend)
+ if !ok {
+ t.Fatalf("New(codearts) = %T, want *codeartsBackend", backend)
+ }
+ if _, shared := backend.(*opencodeBackend); shared {
+ t.Fatal("CodeArts unexpectedly resolved to the OpenCode backend")
+ }
+ if codearts.cfg.Logger == nil {
+ t.Fatal("CodeArts backend did not receive its config")
+ }
+}
+
+func TestCodeArtsExecuteUsesNativeRunFlagsAndStdin(t *testing.T) {
+ self, err := os.Executable()
+ if err != nil {
+ t.Fatal(err)
+ }
+ dir := t.TempDir()
+ argvPath := filepath.Join(dir, "argv.txt")
+ stdinPath := filepath.Join(dir, "stdin.txt")
+ prompt := "first line\nsecond line"
+
+ backend, err := ResolveBackend("codearts", Config{
+ ExecutablePath: self,
+ LaunchPrefix: []string{
+ "wrapper", "--format", "text", "--auto", "--dir", "wrong-root",
+ },
+ Logger: slog.Default(),
+ Env: map[string]string{
+ opencodeStdinHelperEnv: "1",
+ opencodeStdinHelperArgvFile: argvPath,
+ opencodeStdinHelperInFile: stdinPath,
+ },
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+ session, err := backend.Execute(t.Context(), prompt, ExecOptions{
+ Cwd: dir,
+ Timeout: 30 * time.Second,
+ Model: "huaweicloud-maas/deepseek-v3.2",
+ ThinkingLevel: "high",
+ ResumeSessionID: "ses_existing",
+ CustomArgs: []string{
+ "--dangerously-skip-permissions", "--auto", "--sandbox",
+ "--dir", "wrong", "--variant", "high", "--title", "Multica task",
+ },
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+ go func() {
+ for range session.Messages {
+ }
+ }()
+ result := <-session.Result
+ if result.Status != "completed" || result.Output != "ok" || result.SessionID != "ses_fake" {
+ t.Fatalf("result = %+v", result)
+ }
+
+ argvRaw, err := os.ReadFile(argvPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+ args := strings.Split(string(argvRaw), "\n")
+ want := []string{"wrapper", "run", "--format", "json", "--auto", "--model", "huaweicloud-maas/deepseek-v3.2", "--session", "ses_existing", "--title", "Multica task"}
+ if strings.Join(args, "\x00") != strings.Join(want, "\x00") {
+ t.Fatalf("argv = %#v, want %#v", args, want)
+ }
+ stdinRaw, err := os.ReadFile(stdinPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if string(stdinRaw) != prompt {
+ t.Fatalf("stdin = %q, want %q", stdinRaw, prompt)
+ }
+}
+
+func TestCodeArtsRejectsNonJSONSuccessOutput(t *testing.T) {
+ backend := &codeartsBackend{cfg: Config{Logger: slog.Default()}}
+ ch := make(chan Message, 8)
+ result := backend.processEvents(strings.NewReader("\x1b[31mError: CODEARTS_CLI_AK is not configured\x1b[0m\n"), ch)
+ if result.status != "failed" {
+ t.Fatalf("status = %q, want failed", result.status)
+ }
+ if !strings.Contains(result.errMsg, "codearts returned no parseable JSON events") ||
+ !strings.Contains(result.errMsg, "CODEARTS_CLI_AK is not configured") {
+ t.Fatalf("error = %q", result.errMsg)
+ }
+ if strings.ContainsRune(result.errMsg, '\x1b') {
+ t.Fatalf("ANSI escape leaked into error: %q", result.errMsg)
+ }
+}
+
+func TestCodeArtsStreamErrorsUseCodeArtsLabel(t *testing.T) {
+ backend := &codeartsBackend{cfg: Config{Logger: slog.Default()}}
+ ch := make(chan Message, 8)
+ result := backend.processEvents(strings.NewReader(`{"type":"step_start","sessionID":"ses","part":{}}`+"\n"), ch)
+ if result.status != "failed" || !strings.HasPrefix(result.errMsg, "codearts stream ended") {
+ t.Fatalf("result = %+v", result)
+ }
+}
+
+func TestCodeArtsEnvironmentMatchesLauncherAndAllowsOverrides(t *testing.T) {
+ home := t.TempDir()
+ t.Setenv("HOME", home)
+ t.Setenv("USERPROFILE", home)
+ oldTLS, hadTLS := os.LookupEnv("NODE_TLS_REJECT_UNAUTHORIZED")
+ if err := os.Unsetenv("NODE_TLS_REJECT_UNAUTHORIZED"); err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(func() {
+ if hadTLS {
+ _ = os.Setenv("NODE_TLS_REJECT_UNAUTHORIZED", oldTLS)
+ } else {
+ _ = os.Unsetenv("NODE_TLS_REJECT_UNAUTHORIZED")
+ }
+ })
+ env := buildCodeArtsEnv(map[string]string{"PLUGIN_ENV": "custom"})
+ values := map[string]string{}
+ for _, entry := range env {
+ key, value, ok := strings.Cut(entry, "=")
+ if ok {
+ values[key] = value
+ }
+ }
+ if values["SCENARIO"] != "codeartsdoer" || values["PLUGIN_ENV"] != "custom" {
+ t.Fatalf("unexpected CodeArts env: SCENARIO=%q PLUGIN_ENV=%q", values["SCENARIO"], values["PLUGIN_ENV"])
+ }
+ wantConfig := filepath.Join(home, ".codeartsdoer", "codearts_cli.json")
+ if values["OPENCODE_CONFIG"] != wantConfig {
+ t.Fatalf("OPENCODE_CONFIG = %q, want %q", values["OPENCODE_CONFIG"], wantConfig)
+ }
+ if _, ok := values["NODE_TLS_REJECT_UNAUTHORIZED"]; ok {
+ t.Fatal("CodeArts launcher must not disable TLS verification by default")
+ }
+
+ // Disabling certificate verification remains possible only as an explicit
+ // per-agent custom_env opt-in; the launcher must never do it by default.
+ insecureValues := envValues(buildCodeArtsEnv(map[string]string{"NODE_TLS_REJECT_UNAUTHORIZED": "0"}))
+ if insecureValues["NODE_TLS_REJECT_UNAUTHORIZED"] != "0" {
+ t.Fatalf("explicit NODE_TLS_REJECT_UNAUTHORIZED override was not preserved: %q", insecureValues["NODE_TLS_REJECT_UNAUTHORIZED"])
+ }
+}
+
+func TestDiscoverCodeArtsModels(t *testing.T) {
+ self, err := os.Executable()
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Setenv(codeartsModelHelperEnv, "1")
+ argvPath := filepath.Join(t.TempDir(), "model-argv.txt")
+ t.Setenv(codeartsModelHelperArgvFile, argvPath)
+ models, err := discoverCodeArtsModels(context.Background(), Command{Path: self, Prefix: []string{"wrapper"}})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if len(models) != 1 || models[0].ID != "huaweicloud-maas/deepseek-v3.2" || models[0].Provider != "huaweicloud-maas" {
+ t.Fatalf("models = %+v", models)
+ }
+ if models[0].Thinking != nil {
+ t.Fatalf("CodeArts model must not advertise OpenCode variants: %+v", models[0])
+ }
+ argvRaw, err := os.ReadFile(argvPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if got, want := strings.Split(string(argvRaw), "\n"), []string{"wrapper", "models", "--verbose"}; strings.Join(got, "\x00") != strings.Join(want, "\x00") {
+ t.Fatalf("model discovery argv = %#v, want %#v", got, want)
+ }
+}
+
+func TestDetectVersionUsesCodeArtsCommandPrefix(t *testing.T) {
+ self, err := os.Executable()
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Setenv(codeartsModelHelperEnv, "1")
+ argvPath := filepath.Join(t.TempDir(), "version-argv.txt")
+ t.Setenv(codeartsModelHelperArgvFile, argvPath)
+
+ version, err := DetectVersion(context.Background(), Command{Path: self, Prefix: []string{"wrapper"}})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if version != "CodeArts Agent 1.2.3" {
+ t.Fatalf("version = %q, want CodeArts Agent 1.2.3", version)
+ }
+ argvRaw, err := os.ReadFile(argvPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if got, want := strings.Split(string(argvRaw), "\n"), []string{"wrapper", "--version"}; strings.Join(got, "\x00") != strings.Join(want, "\x00") {
+ t.Fatalf("version argv = %#v, want %#v", got, want)
+ }
+}
+
+func TestCodeArtsListModelsCacheSeparatesCommandPrefixes(t *testing.T) {
+ self, err := os.Executable()
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Setenv(codeartsModelHelperEnv, "1")
+ commands := []Command{
+ {Path: self, Prefix: []string{"profile-a"}},
+ {Path: self, Prefix: []string{"profile-b"}},
+ }
+ modelCacheMu.Lock()
+ for _, command := range commands {
+ delete(modelCache, discoveryCacheKey("codearts", command))
+ }
+ modelCacheMu.Unlock()
+ t.Cleanup(func() {
+ modelCacheMu.Lock()
+ defer modelCacheMu.Unlock()
+ for _, command := range commands {
+ delete(modelCache, discoveryCacheKey("codearts", command))
+ }
+ })
+
+ for i, command := range commands {
+ catalog, err := ListModels(context.Background(), "codearts", command)
+ if err != nil {
+ t.Fatal(err)
+ }
+ want := fmt.Sprintf("test/profile-%c", 'a'+rune(i))
+ if len(catalog.Models) != 1 || catalog.Models[0].ID != want {
+ t.Fatalf("prefix %q catalog = %+v, want model %q", command.Prefix[0], catalog, want)
+ }
+ }
+}
+
+func envValues(env []string) map[string]string {
+ values := make(map[string]string, len(env))
+ for _, entry := range env {
+ key, value, ok := strings.Cut(entry, "=")
+ if ok {
+ values[key] = value
+ }
+ }
+ return values
+}
+
+func TestResolveCodeArtsNativeFromShim(t *testing.T) {
+ shim := filepath.Join("C:\\", "Users", "test", ".codeartsdoer", "installers", "codearts.cmd")
+ native := filepath.Join(filepath.Dir(shim), "bin", "codearts.exe")
+ if got := resolveCodeArtsNativeFromShim(shim, fakeStat(native)); got != native {
+ t.Fatalf("got %q, want %q", got, native)
+ }
+ if got := resolveCodeArtsNativeFromShim(filepath.Join(filepath.Dir(shim), "other.cmd"), fakeStat(native)); got != "" {
+ t.Fatalf("non-CodeArts shim resolved to %q", got)
+ }
+}
diff --git a/server/pkg/agent/launch.go b/server/pkg/agent/launch.go
index 989ff3d443..e10f13eabb 100644
--- a/server/pkg/agent/launch.go
+++ b/server/pkg/agent/launch.go
@@ -444,6 +444,7 @@ var launchPrefixBlockedArgs = map[string]map[string]blockedArgMode{
"antigravity": antigravityBlockedArgs,
"claude": claudeBlockedArgs,
"codebuddy": codebuddyBlockedArgs,
+ "codearts": codeartsBlockedArgs,
"codex": codexBlockedArgs,
"copilot": copilotBlockedArgs,
"cursor": cursorBlockedArgs,
diff --git a/server/pkg/agent/models.go b/server/pkg/agent/models.go
index 16abea8946..a2a76eda71 100644
--- a/server/pkg/agent/models.go
+++ b/server/pkg/agent/models.go
@@ -214,6 +214,10 @@ func ListModels(ctx context.Context, providerType string, runtimeCmd Command) (C
return cachedDiscovery(discoveryCacheKey(providerType, runtimeCmd), func() (Catalog, error) {
return discovered(discoverOpenCodeModels(ctx, runtimeCmd))
})
+ case "codearts":
+ return cachedDiscovery(discoveryCacheKey(providerType, runtimeCmd), func() (Catalog, error) {
+ return discovered(discoverCodeArtsModels(ctx, runtimeCmd))
+ })
case "deveco":
return cachedDiscovery(discoveryCacheKey(providerType, runtimeCmd), func() (Catalog, error) {
return discovered(discoverDevecoModels(ctx, runtimeCmd))
diff --git a/server/pkg/agent/opencode_stdin_helper_test.go b/server/pkg/agent/opencode_stdin_helper_test.go
index 096b75801d..5960f59abf 100644
--- a/server/pkg/agent/opencode_stdin_helper_test.go
+++ b/server/pkg/agent/opencode_stdin_helper_test.go
@@ -17,6 +17,32 @@ const (
opencodeStdinHelperInFile = "MULTICA_OPENCODE_STDIN_HELPER_STDIN_FILE"
)
+const (
+ codeartsModelHelperEnv = "CODEARTS_MODEL_TEST_HELPER"
+ codeartsModelHelperArgvFile = "CODEARTS_MODEL_TEST_HELPER_ARGV_FILE"
+)
+
+func runFakeCodeArtsModelHelper() {
+ args := os.Args[1:]
+ if path := os.Getenv(codeartsModelHelperArgvFile); path != "" {
+ if err := os.WriteFile(path, []byte(strings.Join(args, "\n")), 0o644); err != nil {
+ fmt.Fprintf(os.Stderr, "helper: write CodeArts model argv: %v\n", err)
+ os.Exit(1)
+ }
+ }
+ for _, arg := range args {
+ if arg == "--version" {
+ fmt.Println("CodeArts Agent 1.2.3")
+ return
+ }
+ }
+ if len(args) > 0 && strings.HasPrefix(args[0], "profile-") {
+ fmt.Println("test/" + args[0])
+ return
+ }
+ fmt.Println("huaweicloud-maas/deepseek-v3.2")
+}
+
// runFakeOpencodeStdinHelper records the argv and stdin the backend handed this
// process, then emits a successful OpenCode event stream. It is dispatched from
// TestMain before the testing flag parser runs, which is what lets the process
@@ -37,6 +63,10 @@ func runFakeOpencodeStdinHelper() {
fmt.Fprintf(os.Stderr, "helper: write stdin: %v\n", err)
os.Exit(1)
}
+ if len(os.Args) > 1 && os.Args[1] == "models" {
+ fmt.Println("huaweicloud-maas/deepseek-v3.2")
+ return
+ }
fmt.Println(`{"type":"step_start","timestamp":1,"sessionID":"ses_fake","part":{"type":"step-start"}}`)
fmt.Println(`{"type":"text","timestamp":2,"sessionID":"ses_fake","part":{"type":"text","text":"ok"}}`)
diff --git a/server/pkg/taskfailure/classify.go b/server/pkg/taskfailure/classify.go
index eec226c42f..10a91404b8 100644
--- a/server/pkg/taskfailure/classify.go
+++ b/server/pkg/taskfailure/classify.go
@@ -178,8 +178,8 @@ func Classify(rawError string) Reason {
// Note this only catches deadlines that arrive as a bare string;
// callers holding the error value should classify structurally
// instead (see taskRunFailureReason in daemon/daemon.go).
- // "opencode stream ended" is the shared prefix of every failure the
- // OpenCode terminal-signal guard raises (pkg/agent/opencode.go): a step
+ // The OpenCode/CodeArts "stream ended" prefixes cover every failure the
+ // shared terminal-signal guard raises (pkg/agent/opencode.go): a step
// left open at EOF, a continuation that never started, and a run that
// ended on a step with no text, no tool call and no reported usage.
// All three mean the same thing — the provider stream died and
@@ -202,6 +202,7 @@ func Classify(rawError string) Reason {
containsAny(lower,
"stream disconnected",
opencodeStreamEndedPrefix,
+ codeartsStreamEndedPrefix,
"connection closed",
"mid-response",
"error sending request",
@@ -420,7 +421,10 @@ func isPiProviderNetworkError(lower string) bool {
// guard raises (pkg/agent/opencode.go). Exactly one code path emits it, and it
// is a PREFIX of the whole error rather than a phrase somewhere inside it, so
// its presence identifies the failure outright.
-const opencodeStreamEndedPrefix = "opencode stream ended"
+const (
+ opencodeStreamEndedPrefix = "opencode stream ended"
+ codeartsStreamEndedPrefix = "codearts stream ended"
+)
// legacyOpencodeStreamEndedReasons are the buckets a daemon predating rule 7's
// entry lands these errors in: process_failure for the two "terminal signal"
@@ -479,8 +483,10 @@ func NormalizeDaemonReason(reason, rawError string) Reason {
// allowlist on exactly the un-upgraded hosts most likely to be hitting a
// flaky provider. Upgrading here makes the retry work the moment the server
// deploys, without waiting on the daemon fleet.
+ lowerError := strings.ToLower(strings.TrimSpace(rawError))
if legacyOpencodeStreamEndedReasons[reason] &&
- strings.HasPrefix(strings.ToLower(strings.TrimSpace(rawError)), opencodeStreamEndedPrefix) {
+ (strings.HasPrefix(lowerError, opencodeStreamEndedPrefix) ||
+ strings.HasPrefix(lowerError, codeartsStreamEndedPrefix)) {
return ReasonAgentProviderNetwork
}
// #7112: same mixed-version gap. A daemon predating the OpenClaw CLI
diff --git a/server/pkg/taskfailure/classify_test.go b/server/pkg/taskfailure/classify_test.go
index 0e6e6cbe40..18a2c36c11 100644
--- a/server/pkg/taskfailure/classify_test.go
+++ b/server/pkg/taskfailure/classify_test.go
@@ -129,6 +129,7 @@ func TestClassifyRules(t *testing.T) {
{"pi request timed out", "Request timed out.", ReasonAgentProviderNetwork},
{"pi request timed out with exit status wins over process failure", "Request timed out.; pi exited with error: exit status 1", ReasonAgentProviderNetwork},
{"omp connection error with exit status wins over process failure", "Connection error.; omp exited with error: exit status 1", ReasonAgentProviderNetwork},
+ {"codearts step open at EOF", "codearts stream ended without a terminal signal (step still open at EOF)", ReasonAgentProviderNetwork},
// 8. Model not found / unavailable.
{"model not found", "Error: model claude-3-opus-99 not found", ReasonAgentModelNotFoundOrUnavailable},