Skip to content

feat(setup): manage Cline in VS Code Insiders, VSCodium, Cursor and Windsurf - #10729

Merged
morluto merged 2 commits into
refactor/fold-mcp-add-clientsfrom
fix/cline-editor-hosts
Nov 15, 2026
Merged

morluto merged 2 commits into
refactor/fold-mcp-add-clientsfrom
fix/cline-editor-hosts

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

The Cline extension keeps its MCP settings in the global storage of whichever editor runs it (HostProvider.get().globalStorageFsPath in disk.ts). REA resolved only VS Code's storage, so Cline running in VS Code Insiders, VSCodium, Cursor or Windsurf was never configured, inspected or cleaned. This PR adds one client-table row per editor.

Stacked on #10694 (the cline_vscode row). Refs #7181.

Problem and expected behavior

Trigger: Cline installed in Cursor. rea setup did not offer it, doctor did not report it, and uninstall did not clean it. Expected: each editor's Cline settings file is a client REA can detect, register, inspect and remove.

Change and scope

  • ClientConfigRoots.vscodeUserDirectory takes the product's data folder (default Code).
    • VSCODE_APPDATA applies to every build.
    • VSCODE_PORTABLE stays attributed to VS Code only. It describes the portable build that set it, and applying it to other editors would redirect them wrongly.
    • Existing callers are unchanged.
  • SupportedClients.ts: new rows cline_vscode_insiders, cline_vscodium, cline_cursor and cline_windsurf, sharing a clineSettingsDirectory(dataFolder) helper with cline_vscode. Each is detected by its own Cline settings folder.
  • rea mcp add --agent cline keeps add-mcp's meaning (VS Code). The new rows have no mcp add ids.
  • Not included: other forks such as Trae and Kiro IDE, and portable installs of the forks.

Contract and boundary impact

  • Semantic owner and earliest changed stage: the table rows and the shared Code-OSS user-data rule.

  • Contribution scope fit and linked maintainer decision: coordinator request ("fix the Cline non-VS-Code host gap").

  • CLI and MCP/tool-catalog contract: four new --client ids for setup and doctor.

  • Provider, bridge, target-format, or platform compatibility: macOS, Linux and Windows default user-data roots per editor.

  • Evidence, artifact, provenance, or reconstruction contract: none.

  • Target selection, authority, upstream behavior, and cleanup details: writes only after setup approval, into the editor's own Cline settings file.

  • Generated metadata: the product catalog setup_clients gains four ids. The cursor-plugin skill copy was regenerated.

  • 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 added: for each host, a case in tests/boundary/filesystem/mcpAddClientLifecycle.test.ts using platform: "linux". It checks the path under ~/.config/<Folder>/User/globalStorage/..., then:

    • the host is not detected before its folder exists, and is detected after;
    • setup configures it;
    • doctor reports owned;
    • uninstall removes it.

    The clientLifecycle.test.ts detection list is updated.

  • Base reproduction: none of these rows exist on the base.

  • Remaining proof gaps: no editor or Cline was run. The data folder names follow each product's user-data directory.

Validation performed

  • npm run test:focused -- tests/boundary/filesystem/mcpAddClientLifecycle.test.ts tests/boundary/filesystem/clientLifecycle.test.ts — 72 passed.
  • npm run test:local -- src/application/ClientConfigRoots.test.ts src/application/McpRegistrationCatalog.test.ts src/application/McpClientRegistration.test.ts — 49 passed.
  • npm run check:fast — passed (pre-push hook).
  • npm run docs:check — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Linux paths exercised with platform: "linux" on macOS.
  • Package or release metadata impact: the docs say these ids require a release after 6.9.0.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T05:42:52.156129Z 5e97cbe New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] No code issue blocks this change, but it has already landed through #10694.

Summary

This PR adds setup, doctor and uninstall support for Cline in VS Code Insiders, VSCodium, Cursor and Windsurf.

  • REA manages Cline settings separately in four more editors.

Reviews (4) · Last reviewed commit: "test(setup): cover VSCODE_PORTABLE for C..." · Reviewed by Greptile

Comment thread docs/getting-started/installation.md Resolved
@morluto
morluto force-pushed the fix/cline-editor-hosts branch from 8e8ca2b to f67cd43 Compare November 15, 2026 01:45
@morluto
morluto force-pushed the refactor/fold-mcp-add-clients branch from e00a1c5 to 02f9936 Compare November 15, 2026 03:44
…indsurf

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.
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.
@morluto
morluto force-pushed the fix/cline-editor-hosts branch from d35fe8d to 5e97cbe Compare November 15, 2026 05:40
@morluto
morluto merged commit e627ab2 into refactor/fold-mcp-add-clients Nov 15, 2026
@morluto
morluto deleted the fix/cline-editor-hosts branch November 15, 2026 05:44
morluto added a commit that referenced this pull request Nov 15, 2026
…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
@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant