Repository navigation
feat(clients): register Trae during setup - #1573
Conversation
- SupportedClients: trae definition (VS Code-style user directory, User/mcp.json, format json) - Trae documents mcpServers as the top-level server table with command/args/env and stdio as the default transport; it has no personal skills directory, so setup skips the skill copy - tests: traeClientConfiguration.test.ts (per-platform user directory resolution, upsert preserving unrelated settings, fresh/empty configs, uninstall) Verified: tsc --noEmit clean; vitest run tests/boundary/filesystem/traeClientConfiguration.test.ts 6/6.
|
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: Setup writes the file the PR describes for this closed-source AI editor. Tests pass on Node 22, 24 and 26. The docs give no global ResultsTested on Linux. The PR is
The shared copy is how setup treats any client without a Not run
Thanks, IvenKooLab, for saying plainly in the PR that the file path was not in the docs. Cases I ran and what they showed
Uninstall leaves an empty What the docs say about the fileA server added in the app opens an "mcp.json file in TRAE" through a "Raw Config (JSON)" button, with no path. A project file lives at Open source checkI found no source repository for the editor. The vendor's official GitHub repo holds a README and no licence. So I call it closed source and do not name it here. This is my own check, not a statement from the vendor. Commandsgit --git-dir=$HOME/code/rea-mirror/rea.git fetch -q origin
git archive <sha> | tar -x -C <dir>
npm run build && npm run docs:check
node scripts/run-development-tests.mjs focused \
tests/boundary/filesystem/traeClientConfiguration.test.ts \
tests/boundary/filesystem/clientLifecycle.test.ts
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" timeout 60 \
node scripts/rea.mjs setup --client trae --yes --format jsonI ran a dry run first. Test setup
🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Reviewed this change and found one setup gap: [P2] Install Trae's personal REA skill. The new definition in Validation: all six new filesystem tests and 43 shared client-lifecycle tests pass on macOS with Node 24.18.0 and npm 11.16.0. Trae itself was not executed. |
Review follow-up (morluto#1573): the Trae Skills documentation lists global skills under ~/.trae/skills on macOS/Linux and %userprofile%/.trae/skills on Windows, so the definition now carries that skillPath and setup installs the bundled skill copy there. The installation docs no longer claim Trae has no personal skills directory, and the bundled REA skill's supported client list includes trae. Verified: tsc --noEmit clean; vitest run tests/boundary/filesystem/traeClientConfiguration.test.ts 7/7.
|
Thanks — fixed in acacbac. The definition now carries A new test asserts the skill destination on POSIX and Windows. Validation: |
|
Thanks @IvenKooLab for adding Trae to setup and including its personal REA skill. This makes it much easier for Trae users to get started. Great work on these client integrations! |
Summary
Registers Trae as a supported client during
npx rea-agents setup, following the same pattern as the merged Qwen Code registration (#1415). After this change, Trae users can install REA with one command: setup writes thereaMCP server into Trae's user-scopemcp.json.Problem and expected behavior
Trae (ByteDance's AI IDE) is not among the clients setup recognizes, so its users must hand-edit a JSON file to add REA's MCP server. Expected behavior: after setup,
mcpServers.reaexists in the user-scopemcp.jsonunder Trae's VS Code-style user directory; uninstall removes exactly thereaentry.Trae's configuration (official MCP docs):
mcpServerskey; stdio entries carrycommand,args, andenvwith no transport discriminator (the same schema as Cursor/Claude Desktop).mcp.jsoninside Trae's per-platform user directory, which follows the VS Code layout (Trae is a VS Code fork):%APPDATA%\Trae\Useron Windows,~/Library/Application Support/Trae/Useron macOS,~/.config/Trae/Userelsewhere.skillPathand setup skips the skill copy.Change and scope
SupportedClients:traedefinition — config path<user directory>/mcp.json, marker<user directory>, formatjson(the standardmcpServersdialect).traeUserDirectoryhelper mirroring the existingvscodeUserDirectoryplatform branches.mcpServerswithcommand/args/envis exactly the existingjsonformat.skillPath, so noSetupPlan/Uninstallchanges are needed.Trae CNuser directory; it can be added the same way if wanted.Contract and boundary impact
SupportedClients).traeclient reusing the existingjsonconfiguration format.reaentry.docs/public/product-catalog.json), package, or installation impact: none authored; generated catalogs stay CI-owned.Evidence and regression coverage
tests/boundary/filesystem/traeClientConfiguration.test.ts(6 cases) — per-platform user directory resolution (includingXDG_CONFIG_HOMEandAPPDATAbranches), upsert preserving unrelatedmcpServersentries, fresh/empty documents, and uninstall removing onlyrea.clientLifecycle.test.tsexpected-client list now includestrae.mcpServersschema but not the exact user-level file path. The full boundary suite was not run on a Unix host locally; two pre-existing symlink tests inclientLifecycle.test.tsfail on this Windows machine because Node cannot create symlinks without Developer Mode, reproduced identically on stockmain.For evidence-bearing changes:
Validation performed
npm ci— clean install (Node v22.23.2, npm 10.9.8;.nvmrcpins 24.18.0, so CI covers the pinned toolchain)npx vitest run tests/boundary/filesystem/traeClientConfiguration.test.ts— 6/6 passednpx tsc -p tsconfig.json --noEmit— cleannpm run check:fast— typecheck + lint green (also runs as the pre-push hook)npm run verify:test-discovery— all test files discovered exactly oncenpx vitest run tests/boundary/filesystem/clientLifecycle.test.ts— 41/43 passed; the 2 failures are the pre-existing Windows symlink cases described above (identical onmain)Compatibility, safety, and release
reaentry into Trae's user-scopemcp.json(preserving all unrelated settings); no network access or process execution added.Review checklist
type(scope): outcome.