[PR #1415] [MERGED] feat(clients): register Qwen Code during setup #2869

Closed
opened 2026-10-17 21:11:12 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1415
Author: @yiliang114
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @morluto

Base: main ← Head: feat/qwen-code-client


📝 Commits (2)

  • ad8f357 feat(clients): register Qwen Code during setup
  • 11192da fix(clients): honor Qwen home and shared skill discovery

📊 Changes

7 files changed (+228 additions, -5 deletions)

View changed files

📝 docs/installation.md (+11 -4)
📝 scripts/verify-package-environment.mjs (+1 -0)
📝 src/application/ClientRegistrationStatus.ts (+1 -0)
📝 src/application/SupportedClients.ts (+30 -1)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+1 -0)
➕ tests/boundary/filesystem/qwenClientConfiguration.test.ts (+183 -0)
📝 tests/fixtures/clientEnvironment.ts (+1 -0)

📄 Description

TLDR

Adds Qwen Code as a supported setup client (--client qwen_code). rea setup now registers the MCP server in ~/.qwen/settings.json and installs the bundled skill where Qwen Code actually discovers skills (~/.qwen/skills), instead of the shared ~/.agents/skills root it never scans.

Closes #1409.

What this changes

Before this change, Qwen Code users had to register REA by hand with the documented manual MCP JSON, and a skill installed by guided setup was never discovered.

  • SupportedClients.ts — new qwen_code definition: configPath: [".qwen", "settings.json"], markerPath: [".qwen"], format: "json". The default JSON dialect already writes exactly what Qwen Code loads — mcpServers.rea → {command, args} — so no new dialect is needed. Detection, the interactive multi-select, doctor, and uninstall all derive from this registry.
  • SetupSkill.ts — new qwen_code skill family rooted at ~/.qwen/skills (mirrors the claude_code → ~/.claude/skills branch). Qwen Code discovers skills from project .qwen/skills/, user ~/.qwen/skills/, and its skills.directories setting — never from ~/.agents/skills — so a Qwen-Code-only selection no longer installs the shared root either.
  • SetupPlan.ts / Uninstall.ts — plan and removal labels for the Qwen skill copy (install_skill:qwen_code, "REA skill for Qwen Code").
  • Tests — new qwenClientConfiguration.test.ts: path resolution, register → read → uninstall round trip with JSONC comment preservation, aligned-status reporting, and skill-destination selection for qwen-only / mixed / audit-default scopes. Plus the detection-order expectation in clientLifecycle.test.ts.
  • docs/installation.md — client table row and a short paragraph noting the registration file and Qwen-specific skill directory.

Selection × skill roots after this change:

Selected clients Skill roots planned
qwen_code only ~/.qwen/skills
qwen_code + claude_code ~/.claude/skills, ~/.qwen/skills
qwen_code + any other non-Claude client shared ~/.agents/skills, ~/.qwen/skills
none / audit default (doctor --skill) shared, ~/.claude/skills, ~/.qwen/skills

Reviewer Test Plan

  1. npx tsc --noEmit and oxlint — clean (ran as npm run check:fast).
  2. npx vitest run --project boundary tests/boundary/filesystem/qwenClientConfiguration.test.ts tests/boundary/filesystem/setupSkill.test.ts tests/boundary/filesystem/clientLifecycle.test.ts tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/boundary/filesystem/ompClientConfiguration.test.ts tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientConfigurationBom.test.ts tests/boundary/cli/productCatalog.test.ts — 126/126 pass locally on macOS arm64 (Node 24.18.0). [fixed the count: 126, not 133 — the 7 new tests were already inside the total, thanks @CassieFox23]
  3. End-to-end against the built CLI with a sandboxed HOME:
    • node scripts/rea.mjs setup --client qwen_code --dry-run --json → plans configure_client:qwen_code (with backup) and install_skill:qwen_code targeting ~/.qwen/settings.json and ~/.qwen/skills/reverse-engineer-anything.
    • node scripts/rea.mjs setup --yes --client qwen_code --json → ready; existing model setting preserved, mcpServers.rea added; skill lands in ~/.qwen/skills/reverse-engineer-anything and no ~/.agents directory is created.
    • node scripts/rea.mjs doctor --client qwen_code --json → healthy: true; a second setup run is a no-op.

Known Limitations

  • Project-level .qwen/settings.json and the skills.directories setting are intentionally untouched — user-level registration only, same boundary as other clients.
  • Full-suite honesty: npm run check:pr static gates (typecheck, lint, format:check, knip, metadata:check, docs:check) pass locally. The full vitest run is not macOS-clean on main itself — 155 failures in the same set of 39 files before and after this change (native Mach-O, Hopper, JADX, process-capture, Playwright/CDP areas; none touch client registration, setup, or skill code). The only branch-specific blip, webRuntimeCli, passes in isolation on both main and this branch (flaky under parallel load). CI on Linux is the real signal here.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1415 **Author:** [@yiliang114](https://github.com/yiliang114) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `feat/qwen-code-client` --- ### 📝 Commits (2) - [`ad8f357`](https://github.com/morluto/rea/commit/ad8f357feeea130b63611edffae316b26e2f5ae2) feat(clients): register Qwen Code during setup - [`11192da`](https://github.com/morluto/rea/commit/11192da01396f6f796f2c75c0d1e70cd9194c96a) fix(clients): honor Qwen home and shared skill discovery ### 📊 Changes **7 files changed** (+228 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/installation.md` (+11 -4) 📝 `scripts/verify-package-environment.mjs` (+1 -0) 📝 `src/application/ClientRegistrationStatus.ts` (+1 -0) 📝 `src/application/SupportedClients.ts` (+30 -1) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+1 -0) ➕ `tests/boundary/filesystem/qwenClientConfiguration.test.ts` (+183 -0) 📝 `tests/fixtures/clientEnvironment.ts` (+1 -0) </details> ### 📄 Description ## TLDR Adds Qwen Code as a supported setup client (`--client qwen_code`). `rea setup` now registers the MCP server in `~/.qwen/settings.json` and installs the bundled skill where Qwen Code actually discovers skills (`~/.qwen/skills`), instead of the shared `~/.agents/skills` root it never scans. Closes #1409. ## What this changes Before this change, Qwen Code users had to register REA by hand with the documented manual MCP JSON, and a skill installed by guided setup was never discovered. - **`SupportedClients.ts`** — new `qwen_code` definition: `configPath: [".qwen", "settings.json"]`, `markerPath: [".qwen"]`, `format: "json"`. The default JSON dialect already writes exactly what Qwen Code loads — `mcpServers.rea` → `{command, args}` — so no new dialect is needed. Detection, the interactive multi-select, doctor, and uninstall all derive from this registry. - **`SetupSkill.ts`** — new `qwen_code` skill family rooted at `~/.qwen/skills` (mirrors the `claude_code` → `~/.claude/skills` branch). Qwen Code discovers skills from project `.qwen/skills/`, user `~/.qwen/skills/`, and its `skills.directories` setting — never from `~/.agents/skills` — so a Qwen-Code-only selection no longer installs the shared root either. - **`SetupPlan.ts` / `Uninstall.ts`** — plan and removal labels for the Qwen skill copy (`install_skill:qwen_code`, "REA skill for Qwen Code"). - **Tests** — new `qwenClientConfiguration.test.ts`: path resolution, register → read → uninstall round trip with JSONC comment preservation, aligned-status reporting, and skill-destination selection for qwen-only / mixed / audit-default scopes. Plus the detection-order expectation in `clientLifecycle.test.ts`. - **`docs/installation.md`** — client table row and a short paragraph noting the registration file and Qwen-specific skill directory. Selection × skill roots after this change: | Selected clients | Skill roots planned | | --- | --- | | `qwen_code` only | `~/.qwen/skills` | | `qwen_code` + `claude_code` | `~/.claude/skills`, `~/.qwen/skills` | | `qwen_code` + any other non-Claude client | shared `~/.agents/skills`, `~/.qwen/skills` | | none / audit default (`doctor --skill`) | shared, `~/.claude/skills`, `~/.qwen/skills` | ## Reviewer Test Plan 1. `npx tsc --noEmit` and `oxlint` — clean (ran as `npm run check:fast`). 2. `npx vitest run --project boundary tests/boundary/filesystem/qwenClientConfiguration.test.ts tests/boundary/filesystem/setupSkill.test.ts tests/boundary/filesystem/clientLifecycle.test.ts tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/boundary/filesystem/ompClientConfiguration.test.ts tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientConfigurationBom.test.ts tests/boundary/cli/productCatalog.test.ts` — 126/126 pass locally on macOS arm64 (Node 24.18.0). [fixed the count: 126, not 133 — the 7 new tests were already inside the total, thanks @CassieFox23] 3. End-to-end against the built CLI with a sandboxed `HOME`: - `node scripts/rea.mjs setup --client qwen_code --dry-run --json` → plans `configure_client:qwen_code` (with backup) and `install_skill:qwen_code` targeting `~/.qwen/settings.json` and `~/.qwen/skills/reverse-engineer-anything`. - `node scripts/rea.mjs setup --yes --client qwen_code --json` → `ready`; existing `model` setting preserved, `mcpServers.rea` added; skill lands in `~/.qwen/skills/reverse-engineer-anything` and no `~/.agents` directory is created. - `node scripts/rea.mjs doctor --client qwen_code --json` → `healthy: true`; a second setup run is a no-op. ## Known Limitations - Project-level `.qwen/settings.json` and the `skills.directories` setting are intentionally untouched — user-level registration only, same boundary as other clients. - Full-suite honesty: `npm run check:pr` static gates (typecheck, lint, format:check, knip, metadata:check, docs:check) pass locally. The full `vitest run` is not macOS-clean on `main` itself — 155 failures in the same set of 39 files before and after this change (native Mach-O, Hopper, JADX, process-capture, Playwright/CDP areas; none touch client registration, setup, or skill code). The only branch-specific blip, `webRuntimeCli`, passes in isolation on both `main` and this branch (flaky under parallel load). CI on Linux is the real signal here. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:11:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2869
No description provided.