Repository navigation
fix(setup): register Amp in settings.jsonc when that is its settings file - #10717
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; no blocking issue was found. SummaryAmp now uses an existing
No actionable issues were found. Tests were inspected but not run. Checking for a superseding PR was blocked by unavailable GitHub authentication; the supplied stack contains no higher dependent PR. Reviews (2) · Last reviewed commit: "fix(setup): register Amp in settings.jso..." · Reviewed by Greptile |
cef0eb4 to
fdac7d9
Compare
…file Amp reads ~/.config/amp/settings.json or settings.jsonc. REA always used settings.json, creating a second file beside an existing settings.jsonc. Use settings.jsonc when it is the only file, and refuse when both exist because Amp does not document which one it reads.
fdac7d9 to
4142bf2
Compare
…10694) * feat(setup): give five mcp-add clients one client-table row Cline VS Code extension, Kiro, Mastra Code, Zed and Amp move from registration-only catalog entries to rows in the client table. rea mcp add projects those rows, so doctor, update and uninstall now inspect, refresh and remove what it wrote, and setup offers each client when detected. Refs #7181 * refactor(setup): keep FreeBuff's comment on its declaration The client helpers added for the folded mcp-add clients were inserted between FreeBuff's profile-directory comment and its declaration. Move them above it, and drop an import the folded locations no longer use. * test(setup): refresh an older mcp-add registration through setup Address review: seed each folded client with an older REA-owned package runner launcher, then check that doctor reports it stale, update selects it, setup plans and applies the update, and doctor then reads the current launcher. * fix(setup): register Amp in settings.jsonc when that is its settings file (#10717) Amp reads ~/.config/amp/settings.json or settings.jsonc. REA always used settings.json, creating a second file beside an existing settings.jsonc. Use settings.jsonc when it is the only file, and refuse when both exist because Amp does not document which one it reads. * feat(setup): manage Cline in VS Code Insiders, VSCodium, Cursor and Windsurf (#10729) * feat(setup): manage Cline in VS Code Insiders, VSCodium, Cursor and Windsurf The Cline extension keeps its MCP settings in the global storage of whichever editor runs it. REA resolved only VS Code's, so a Cline in another editor was never configured, inspected or cleaned. Add one client-table row per editor, resolved through the shared Code-OSS user data rule, and detected where that editor's Cline settings exist. * test(setup): cover VSCODE_PORTABLE for Cline's editor hosts Address review: VSCODE_PORTABLE moves only VS Code's own storage, so the other editors keep their settings path; and the older-release note now says which hosts mcp add could register before. * fix(setup): find a Linux Flatpak Zed's configuration (#10721) * fix(setup): find a Linux Flatpak Zed's configuration Zed's config_dir honors FLATPAK_XDG_CONFIG_HOME first, and a Flathub Zed reads ~/.var/app/dev.zed.Zed/config/zed inside its sandbox. REA always wrote ~/.config/zed, which that Zed never reads. Honor the override, use the sandbox folder when it is the only one, and refuse when both a native and a Flatpak configuration exist. * fix(setup): treat an XDG_CONFIG_HOME naming the Flatpak folder as one Zed folder * fix(setup): treat linked native and Flatpak Zed folders as one configuration * test(setup): expect doctor to report the Amp registration mcp add wrote
Summary
Amp reads
~/.config/amp/settings.jsonorsettings.jsonc(Amp settings docs). REA always usedsettings.json, which created a second file beside an existingsettings.jsonc. REA now usessettings.jsoncwhen it is Amp's only settings file. When both exist it refuses, because Amp does not document which one it reads.Stacked on #10694 (the Amp row). Refs #7181.
Problem and expected behavior
Trigger: only
~/.config/amp/settings.jsoncexists, and you runrea mcp add --agent amporrea setup --client amp. REA createdsettings.json. Whether Amp then reads that new file is undocumented. Expected: write the file Amp already uses, and do not guess when the choice is unknown.Change and scope
SupportedClients.ts: Amp's row resolves its location by probing both names.settings.json.configPathError.mcp addall take the path from this row.--settings-file, which REA cannot observe. Workspace.amp/settings.json[c]files are also out of scope (mcp addstays global-only for Amp).Contract and boundary impact
Semantic owner and earliest changed stage: the Amp row's location.
Contribution scope fit and linked maintainer decision: coordinator request ("fix the Amp settings.jsonc gap").
CLI and MCP/tool-catalog contract:
config_pathcan now besettings.jsonc. With both files present, Amp registration fails with a remediation. This includesmcp add's default selection, which always includes Amp.Provider, bridge, target-format, or platform compatibility: none.
Evidence, artifact, provenance, or reconstruction contract: none.
Target selection, authority, upstream behavior, and cleanup details: no new write locations beyond the file Amp already uses.
Generated metadata, package, or installation impact: none.
Read existing files or captured data.
Launch or attach to a process.
Inject instrumentation or run scripts/code.
Change process memory, registers, files, or configuration.
Contact network services.
Recover protected code or work around protections.
Documentation or usability only; no target interaction.
Not sure yet; investigation or maintainer guidance needed.
Evidence and regression coverage
tests/boundary/filesystem/mcpAddClientLifecycle.test.ts. With onlysettings.jsoncpresent,mcp addselects and writes it and keeps its// keepcomment. Aftersettings.jsonis added, the row reportsconfigPathErrorandmcp addrefuses.settings.json, so the first assertion fails.Validation performed
npm run test:focused -- tests/boundary/filesystem/mcpAddClientLifecycle.test.ts tests/boundary/cli/defaultAmpRegistration.test.ts tests/boundary/cli/ampRegistrationPreservation.test.ts— 17 passed.npm run check:fast— passed (pre-push hook).npm run docs:check— passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.