feat(server): add Cline provider over ACP - #8028
Conversation
Cline CLI (`cline --acp`) speaks Agent Client Protocol v1 over stdio with session resume, plan/act modes, permission prompts, and a config-option model catalog. This wires it in as a built-in driver on the shared ACP runtime alongside Cursor and Grok: driver + adapter + status probe + text generation, contracts settings, web/mobile presentation, docs, and mock-agent test coverage. Unlike the other ACP drivers, Cline's `authenticate` blocks in an OAuth device flow until the user signs in, so the status probe tracks authenticate request phases and surfaces an explicit unauthenticated state pointing at `cline auth login` instead of a generic failure.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Reviewed the web UI changes for the Cline provider (composer capability gating, provider icon, settings/model-picker fallbacks).
Three findings, all in apps/web/src:
ChatComposer.tsx— Plan-mode capability is read from two different sources in the same component (driver default snapshot vs. selected instance snapshot), so the footer toggle and the/planslash command can disagree.ChatComposer.tsx— an empty model catalog now replaces the provider/model picker with the disabled "No provider available" button, removing the only composer affordance for switching provider, and making the newNo model availabletrigger fallback unreachable on this path.Icons.tsx—ClineIconroutes its brand color throughtext-*/currentColorwhile every other provider mark usesfill-*, so an existing call site'stext-foreground/80recolors it.
Runtime-mode filtering, the compact controls menu, the custom-model section fallback, and the source-control writer toggle all look consistent with the existing primitives.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This adds a full Cline ACP provider with new subprocess, authentication, session, model-discovery, permission, and cancellation behavior, plus cross-cutting web, mobile, contract, and outbox changes. The breadth and runtime sensitivity of the integration warrant human review. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
Reviewed the web UI surface of this PR (composer capability gating, provider picker fallbacks, settings rows, ClineIcon). The three findings from the previous run are resolved: ClineIcon now paints via fill-*/stroke-* like the sibling brand marks, plan-mode capability reads a single source (selectedProviderStatus), and an empty model catalog no longer replaces the whole ProviderModelPicker.
Two remaining consistency issues, both about a newly persistent restricted state that is never explained on screen.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One finding: the new "provider entry available but empty model catalog" state leaves the Send button enabled while the send path silently drops the submission. Prior findings (Cline icon paint, plan-toggle capability source, picker replacement) look resolved.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Reviewed the new Cline provider modules (ClineDriver, ClineAdapter, ClineProvider, ClineAcpSupport, Services/ClineAdapter) plus the AcpSessionRuntime / ProviderDriver / TextGeneration changes against the Effect service conventions.
Two error-construction violations introduced in the new files: a wrapper's detail (and therefore its message) is derived from cause.message instead of stable structural attributes. The underlying error is already preserved as cause, so the copied string adds nothing and defeats the structured-error rule.
Everything else looked consistent with the conventions: subpath namespace imports, per-instance adapter closures matching the existing driver bundle model, Schema.TaggedErrorClass failures with cause, Effect.catchTags-free structural handling, and no ManagedRuntime/runPromise leaking into services.
Note (not flagged inline): makeClineAcpRuntime takes childProcessSpawner: ChildProcessSpawner.ChildProcessSpawner["Service"] as an input field and re-provides it via Layer.succeed, rather than requiring the service in the environment. It mirrors GrokAcpSupport/CursorAcpSupport exactly and the callers do acquire it with yield* ChildProcessSpawner.ChildProcessSpawner, so requirements stay visible; acquiring it inside the helper would be the cleaner shape if these modules are revisited.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 14139e8. Configure here.
There was a problem hiding this comment.
One finding: the new send-block for provider-rejected image attachments has no persistent visible surface, unlike the mode block that now gets a composer banner. Previously flagged items (ClineIcon brand paint, picker hidden on empty catalog, instance-scoped plan-mode capability, silent empty-catalog send, mode-block banner, dead source-control-writer switch) all look addressed.
Posted via Macroscope — UI Consistency




What Changed
Adds Cline as a sixth built-in, Early Access provider over the official
cline --acptransport.id: "model"catalog and rejects provider IDs, stale IDs, empty catalogs, and invented fallback modelscline authorCLINE_API_KEY; T3 never invokes ACPauthenticate, which can open OAuth in a browser on the hostsession/loadresponseKnown product boundaries are explicit: images, T3 agent-browser/preview MCP, background text generation, Plan, non-Full-access modes, structured input, and rollback are unsupported by this integration until upstream can uphold those contracts safely.
Why
Cline users can control their existing CLI through T3 Code's local and remote architecture without a provider-specific client path. The conservative capability contract prevents the UI or server from claiming permissions, attachments, MCP tools, or background behavior that current Cline ACP cannot enforce.
Official references: Cline SDK, Cline ACP usage, Cline CLI ACP agent.
UI Changes
Adds the official Cline icon, provider settings/model states, Full-access/Build capability gates, and attachment-unavailable states on web and mobile. Before/after web and mobile evidence is attached to the PR. No motion or timing behavior was added.
Validation
git diff --check, and SVG validationThe authenticated live
cline --acpprobe remains opt-in and was skipped because Cline is not installed or authenticated in this isolated environment. It requires a current authenticated Cline CLI and a disposable repository; T3 does not trigger the provider's browser-based authentication flow automatically.Checklist
Implemented and reviewed with GPT-5.6 Sol and GPT-5.6 Luna in T3 Code through the Codex harness.