Skip to content

feat(setup): support Cline as a client - #10128

Merged
morluto merged 10 commits into
morluto:mainfrom
bramrahmadi:feat/cline-client-support
Nov 11, 2026
Merged

morluto merged 10 commits into
morluto:mainfrom
bramrahmadi:feat/cline-client-support

Conversation

@bramrahmadi

@bramrahmadi bramrahmadi commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extend existing Cline MCP support to CLI setup, doctor and uninstall. rea mcp add --agent cline/cline-vscode already configures the VS Code extension, and --agent cline-cli configures the CLI. This adds rea setup --client cline and rea 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 defineClient contract with Cline's native registration profile. Setup and MCP CLI registration share one path owner: CLINE_MCP_SETTINGS_PATH, then CLINE_DATA_DIR, then CLINE_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/skills destination, 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.
  • Focused compiled CLI/environment/provider-settings suites — 90 passed, 10 Windows-only cases skipped.
  • Launcher, MCP registration/catalog and native-field source suites — 71 passed.
  • npm run docs:check — passed, including 9 README consistency cases; scoped formatting/diff checks pass.
  • Independent source review — no confirmed producer/caller boundary blocker.

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:

  • Verifier lifecycle (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.
  • Initial merge reconciliation (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 optional verify:cline-client script retains its explicit config-listing/handshake scope.

Author readiness

Human owner: @bramrahmadi

  • 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.

@morluto
morluto marked this pull request as ready for review November 11, 2026 18:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 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-11T22:42:34.094626Z 8e840b3 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/verify-cline-client.mjs Resolved
Comment thread scripts/verify-cline-client.mjs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/verify-cline-client.mjs Resolved
Comment thread scripts/verify-cline-client.mjs Resolved
Comment thread scripts/verify-cline-client.mjs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/application/SupportedClients.ts Resolved
@morluto
morluto merged commit dae1551 into morluto:main Nov 11, 2026
5 of 7 checks passed
@bramrahmadi
bramrahmadi deleted the feat/cline-client-support branch November 12, 2026 01:54
@morluto morluto mentioned this pull request Nov 12, 2026
3 tasks done
@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.

Support Cline as a client (setup, doctor, uninstall)

2 participants