Repository navigation
feat(setup): support Cline as a client - #10128
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 947178ad70
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 703e468279
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b60c6666f9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Extend existing Cline MCP support to CLI setup, doctor and uninstall.
rea mcp add --agent cline/cline-vscodealready configures the VS Code extension, and--agent cline-cliconfigures the CLI. This addsrea setup --client clineandrea doctor --client cline; uninstall recognizes the REA-owned CLI registration.Fixes #10127.
Problem and expected behavior
The setup client registry did not include Cline even though explicit MCP registration already supported it. CLI users should have the same reviewed setup transaction, ownership diagnosis, backup preservation and uninstall behavior as other setup clients.
Change and scope
Bind the new setup client through the current
defineClientcontract with Cline's native registration profile. Setup and MCP CLI registration share one path owner:CLINE_MCP_SETTINGS_PATH, thenCLINE_DATA_DIR, thenCLINE_DIR, then native home selection. Caller-platform separators and unknown-home refusal are preserved. Discovery follows the selected settings directory.Use the existing shared
~/.agents/skillsdestination, which Cline discovers. Preserve other servers/settings, retain backups and refuse foreign or malformed registrations. Document the command-specific distinction between the extension and CLI. No MCP catalog/schema or target-execution changes; maintainer scope decision is not applicable to this ordinary client integration.The merge with current main also migrates the original generic JSON entry to the native Cline profile, removes the duplicate CLI path resolver, and isolates native home/location variables in filesystem fixtures. Existing flat and nested Cline rows now share the native connection source owner, preserving nested launch settings separately from outer policy.
Validation performed
Current nested-registration fix (
8e840b35e1):npm run check:fast— fresh typecheck/lint pass, 2/2 tasks.npm run docs:check— passed, including 9 README consistency cases; scoped formatting/diff checks pass.The new compiled CLI case fails before repair: setup returns success while flattening an owned nested registration and losing its selected environment/cwd/metadata. After repair it preserves the nested row, doctor reports aligned/owned, repeated setup preserves bytes, and uninstall leaves its peer. The same parsed source owner now serves launcher/native admission, policy, environment, replacement and refresh. Typed client context replaces name-only environment dispatch; inactive outer environment remains preserved and unselected.
Previously verified in this PR:
cfb03d428d) — 6 focused tests, type/lint and docs checks passed. The verifier creates HOME first, removes inherited Cline routing selectors, exercises setup's default path, and awaits owned SDK discovery/cleanup before reporting.b60c6666f9) — 75 CLI/path/filesystem cases and 42 existing registration cases passed.Verifier orchestration tests use the actual SDK/lifecycle owner with recording ports; lower-owner cases use authored Node fixtures. They do not establish real Cline behavior. Listing selects
--data-dir, proving parser acceptance rather than independent default-home discovery. The contributor's earlier Linux Cline CLI 3.0.74 direct-handshake run predates these verifier updates and was not rerun here. Model-driven calls, extension runtime, real Windows and native providers remain unverified locally. No whole-CI-green claim.Compatibility and release
Adds the setup client ID
cline; existing MCP IDs keep their meanings. No second skill copy, guessed timeout field, tool allowlist or automatic tool approval is introduced. The optionalverify:cline-clientscript retains its explicit config-listing/handshake scope.Author readiness
Human owner: @bramrahmadi
Before merge
type(scope): outcome.