Repository navigation
feat(clients): register Qwen Code during setup - #1415
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
TL;DR: I tested this on Linux in a fake home. Qwen Code (Apache-2.0) setup works end to end. Doctor and uninstall work too. I found two things worth a look. Both come from Qwen Code's own source. Tests
Your plan says 133 tests. I count 126 here, with none skipped. I don't know why they differ. Real use
Worth a look
I read both in Qwen Code's source. I did not run Qwen Code. Not run Edit: I ran some of these on main at 40f73f6 (#3735). Results are in my new comment. Still not run: the full
Thanks for this, yiliang114! All checks
The FIFO hang is not new. #1379 fixes it for Qwen Code too. In the new test, the last Typecheck passed. Oxlint gave no new warnings. The module check needs git. I tested from an export. Overlap with other PRs
CommandsEach run used a fresh fake home. Only these variables were set: env -i PATH="$NODE24/bin:/usr/bin:/bin" HOME="$FAKE" TMPDIR="$FAKE/tmp" \
XDG_CONFIG_HOME="$FAKE/.config" XDG_DATA_HOME="$FAKE/.local/share" \
XDG_CACHE_HOME="$FAKE/.cache" XDG_STATE_HOME="$FAKE/.local/state" \
npm_config_cache="$FAKE/.npm" npm_config_prefix="$FAKE/.npm-global" \
npm_command=exec \
timeout 60 node scripts/rea.mjs setup --client qwen_code --dry-run --format json
node scripts/rea.mjs setup --all-detected --dry-run --format json
node scripts/rea.mjs setup --client qwen_code --dry-run --format json
node scripts/rea.mjs setup --client qwen_code --format json
node scripts/rea.mjs setup --client qwen_code --yes --format json
node scripts/rea.mjs doctor --client qwen_code --skill --format json
node scripts/rea.mjs uninstall --format json
QWEN_HOME="$FAKE/qhome" node scripts/rea.mjs setup --client qwen_code --dry-run --format json
mkfifo ~/.qwen/settings.json # then the four commands under timeout 20
npx vitest run --project boundary \
tests/boundary/filesystem/qwenClientConfiguration.test.ts \
tests/boundary/filesystem/clientLifecycle.test.tsTest setup
🤖 Generated with Claude Code (Opus 5.5) 🦊 |
|
Hey thanks for this Yiliang! I wrote some code for qwen code a while back. It was a great experience |
|
Verified Qwen Code 0.25.0 against the merged implementation and a production-only installed REA tarball on Linux x64: plain chat, all 139 MCP tools discovered, native skill loading, deferred analysis call, Unicode target identity, and reading the complete offloaded Evidence through Qwen's shell tool all passed. Owned shutdown was clean. Repeatable checks: #1511. Loopback model only; live provider/Windows and default OS-home skill discovery are not claimed. |
|
@morluto @CassieFox23 @N0zoM1z0 thanks a lot for the careful review, thorough verification, and quick merge — really appreciate the help! 🙏 |
* feat(clients): register Qwen Code during setup * fix(clients): honor Qwen home and shared skill discovery --------- Co-authored-by: morluto <[email protected]>
|
TL;DR: Qwen Code 0.25.1 connects to REA through the setup entry. The saved This pull request merged as aa23ec8 (#1415) on 2026-10-10. This comment is a record. It runs the items from my first comment that I had not run. I ran them on main at 40f73f6 (#3735). Every run used a fresh fake home, as before. What ran
I installed Qwen Code (Apache-2.0) 0.25.1 from npm into the fake home. I did not start a chat, and I set no model. So this shows Qwen Code reads the setup entry and reaches REA. It does not show a tool call from Qwen Code. N0zoM1z0 tested that in a comment on this pull request, on 0.25.0 with a model on loopback. I did not repeat it. The
One change from my first test: on main, setup put the skill in Not run
Thanks, yiliang114, for the PR. Commandsenv -i PATH="$NODE24/bin:/usr/bin:/bin" HOME="$FAKE" TMPDIR="$FAKE/tmp" \
XDG_CONFIG_HOME="$FAKE/.config" XDG_DATA_HOME="$FAKE/.local/share" \
XDG_CACHE_HOME="$FAKE/.cache" XDG_STATE_HOME="$FAKE/.local/state" \
npm_config_cache="$FAKE/.npm" npm_config_prefix="$FAKE/.npm-global" \
npm_command=exec \
node scripts/rea.mjs setup --client qwen_code --yes --format json
# stdio client: initialize, then tools/list
npx -y [email protected] mcp
npm install -g @qwen-code/[email protected] # prefix inside the fake home
qwen --version
qwen mcp list # from a project folder in the fake home
npm run check
npm run docs:checkThe stdio client is a 30-line script of mine. It is not in the repo. Test setup
🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
TLDR
Adds Qwen Code as a supported setup client (
--client qwen_code).rea setupnow registers the MCP server in~/.qwen/settings.jsonand installs the bundled skill where Qwen Code actually discovers skills (~/.qwen/skills), instead of the shared~/.agents/skillsroot 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— newqwen_codedefinition: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— newqwen_codeskill family rooted at~/.qwen/skills(mirrors theclaude_code→~/.claude/skillsbranch). Qwen Code discovers skills from project.qwen/skills/, user~/.qwen/skills/, and itsskills.directoriessetting — 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").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 inclientLifecycle.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:
qwen_codeonly~/.qwen/skillsqwen_code+claude_code~/.claude/skills,~/.qwen/skillsqwen_code+ any other non-Claude client~/.agents/skills,~/.qwen/skillsdoctor --skill)~/.claude/skills,~/.qwen/skillsReviewer Test Plan
npx tsc --noEmitandoxlint— clean (ran asnpm run check:fast).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]HOME:node scripts/rea.mjs setup --client qwen_code --dry-run --json→ plansconfigure_client:qwen_code(with backup) andinstall_skill:qwen_codetargeting~/.qwen/settings.jsonand~/.qwen/skills/reverse-engineer-anything.node scripts/rea.mjs setup --yes --client qwen_code --json→ready; existingmodelsetting preserved,mcpServers.reaadded; skill lands in~/.qwen/skills/reverse-engineer-anythingand no~/.agentsdirectory is created.node scripts/rea.mjs doctor --client qwen_code --json→healthy: true; a second setup run is a no-op.Known Limitations
.qwen/settings.jsonand theskills.directoriessetting are intentionally untouched — user-level registration only, same boundary as other clients.npm run check:prstatic gates (typecheck, lint, format:check, knip, metadata:check, docs:check) pass locally. The fullvitest runis not macOS-clean onmainitself — 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 bothmainand this branch (flaky under parallel load). CI on Linux is the real signal here.