Skip to content

feat(setup): prefer client plugins with opt-in Cursor installation - #7619

Open
GamerDubz wants to merge 43 commits into
morluto:mainfrom
GamerDubz:feat/plugin-first-setup
Open

GamerDubz wants to merge 43 commits into
morluto:mainfrom
GamerDubz:feat/plugin-first-setup

Conversation

@GamerDubz

@GamerDubz GamerDubz commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New Codex and Claude Code integrations use their client-owned marketplace plugin. Ordinary Cursor setup keeps direct MCP registration and the bundled skill; rea setup --client cursor --cursor-plugin explicitly selects automatic local-plugin installation. Existing local plugins are recognized on ordinary reruns.

Independent of branding PR #7546 and standalone Cursor packaging PR #3003. No issue is closed.

Behavior and boundaries

  • Preview the plan and require approval before writes or installation. Preserve existing direct integrations and explicit direct/provider/Hopper choices. Unsupported Codex plugin commands retain the Bun-capable direct fallback.
  • Use parsed client inventory and defer Claude inventory migrations until approval. Require supported standalone Node only on actual plugin routes.
  • Opt-in Cursor installation uses existing npm to download the exact running version with lifecycle scripts disabled. Validate shared metadata, bootstrap files, runtime, skill and icon before publishing. Preserve foreign, edited, linked, incomplete or differently versioned destinations with repair instructions.
  • Recheck plugin/direct-registration state after approval and before publication. Keep Cursor's command scope alive across mixed-client marketplace operations; join installer cleanup before removing staging. Failed cleanup stays owned and retryable.
  • Carry cancellation through setup and child owners, stop later writes and preserve completed effects/rollback/backup facts in diagnostics. Use shared Windows selected-PATH lookup and process cleanup.

Client CLIs own marketplace state; setup owns routing and approval. No analysis-provider or target-execution capability is added. Cursor uses local import: restart/reload the IDE, account for Enterprise policy and same-name marketplace precedence. Local readiness verifies package/configuration, not live IDE tool availability.

Upstream refresh and conflict resolution — 5 November 2026

Head: 100d2ef51a5ee8bb699518ccd395e1d79f6f9792, merging upstream 71f680d7c.

Resolved the sole conflict in NativeFunctionMatchingService.ts by retaining upstream's required byte-source guidance import; that file now matches upstream. Plugin behavior and the mixed-client/cancellation regressions remain intact.

This refresh includes upstream 26b033d51, which classifies native Darwin environment restrictions before parser failures. Its upstream macOS package lane passed. The prior PR head's macOS job failed on an unreadable mdworker token; the current PR head has now passed that native CI lane. This confirms the result for this run, not that issue #8337 can never recur.

Validation

Executed on Windows with pinned Node 24.22.1:

  • 283 targeted setup, cancellation, ownership-retry and native-matching cases passed; one Unix-only test skipped.
  • All 3 compiled public Cursor/Codex/Claude plugin setup acceptance cases and 9 README consistency cases passed.
  • Typecheck, lint/module boundaries, formatting, build, documentation and normal commit/pre-push hooks passed. Lint reports zero errors and 3,238 advisory warnings on the updated tree.
  • GitHub confirms the pushed head is mergeable with no conflicts. Current-head required CI passed, including macOS arm64, Windows/Linux package lanes, all eight test shards and Portable tests. Greptile completed at 5/5 with zero new findings; no unresolved review threads remain.

Remaining verification limits

Native macOS/Linux execution, Unix shim execution, live desktop client UI/policy and OS-terminal end-to-end cancellation were not rerun locally. Cursor registry installation requires a published archive containing the plugin files; the current registry archive was not revalidated here. No npm release was published.

Plugin repair advice and strict test protocols

Head: 9abb7b323002e891c69717fbebe668761d834390.

Setup now retains selected client-owned plugin checks in doctor.pluginChecks and includes failed checks' repair advice in remediation. A standalone Node runtime disappearing during installation therefore remains actionable in JSON and existing terminal rendering. The regression reproduced the missing advice before the fix.

Stateful Codex/Claude acceptance, host and mixed-Cursor fixtures now match exact supported command/argument tuples through an independent test protocol oracle. Unmodeled commands fail before state/configuration mutations. Seven negative cases and real-child invalid-command probes cover this boundary; normal installation and idempotent reruns still pass.

Windows/Node 24.22.1: 194 targeted setup/plugin/recovery/cancellation cases passed; the 45-case host suite passed again after simplifying an assertion. All 3 compiled Cursor/Codex/Claude plugin acceptance cases and 9 README consistency cases passed. Typecheck, lint/module boundaries, formatting, build, docs and normal commit/pre-push hooks passed. Lint retains 3,238 advisory warnings with zero errors. Hosted required CI now passes, including macOS arm64, Windows/Linux package lanes and all eight test shards. Greptile reviewed this head at 5/5 with zero new findings. Unix execution and live IDE/client verification were not run locally.

Author readiness

Human owner: @GamerDubz

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

@GamerDubz
GamerDubz marked this pull request as ready for review October 27, 2026 23:03
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T23:04:02.088199Z
We couldn’t complete this review. Comment @codex review to try again.
2abbe9c Draft marked ready
ℹ️ 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

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · No new blocking issue was established in this review.RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] No new blocking issue was established in this review.

Summary

Setup prefers client-owned plugins for new Codex and Claude Code integrations. Cursor remains direct by default, with an opt-in local-plugin download.

  • New Codex and Claude Code integrations use their client’s marketplace plugin when setup can do so.
  • Cursor can install a verified local plugin when the user opts in.
  • Setup carries cancellation through its work and keeps a record of settled effects.
  • Windows setup finds native and batch launchers without treating other scripts as runnable.
  • Supporting checks and fixtures now match the updated setup and platform behavior.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Discover selected clients] --> B{Direct settings or existing registration?}
  B -->|Yes| C[Plan direct setup]
  B -->|No| D{Client}
  D -->|Codex or Claude Code| E[Plan client-owned plugin]
  D -->|Cursor| F{Opt-in or existing local plugin?}
  F -->|No| C
  F -->|Yes| G[Plan local plugin]
  C --> H[Review and approve]
  E --> H
  G --> H
  H --> I[Recheck current state]
  I --> J[Apply approved changes]
  J --> K[Check readiness]
  K --> L[Await owned cleanup]
Loading

Reviews (32) · Last reviewed commit: "fix(setup): tolerate optional doctor sco..." · Reviewed by Greptile

Comment thread src/application/SetupPluginClient.ts Resolved
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/SetupPluginClient.ts Resolved
Comment thread src/application/SetupPluginClient.ts Resolved
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/SetupPluginClient.ts Resolved
Comment thread src/application/SetupPluginClient.ts Resolved
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/SetupPluginClient.ts Resolved
Comment thread docs/installation.md Resolved
@GamerDubz GamerDubz changed the title feat(setup): install Codex and Claude Code plugins by default feat(setup): install plugins for Codex, Claude Code and Cursor Oct 30, 2026
@GamerDubz GamerDubz changed the title feat(setup): install plugins for Codex, Claude Code and Cursor feat(setup): prefer client plugins with opt-in Cursor installation Oct 30, 2026
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/CursorLocalPlugin.ts Resolved
Comment thread src/application/SetupPluginCommand.ts Resolved
Comment thread src/cli/setupCommands.ts Resolved
Comment thread src/application/CursorLocalPlugin.ts Resolved
Comment thread src/application/SetupCancellation.ts Resolved
Resolve conflicts with upstream main while preserving plugin-first setup
behavior, Windows batch client lookup coverage, and host-platform registration
assertions.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from e29b869 to 1d168fc Compare November 21, 2026 10:00
Comment thread src/application/SetupPluginHost.ts Resolved
…oval

Fail closed after approval when rechecked plugin inventory needs marketplace
or install commands that were not disclosed in the approved plan.
Keep current operator behavior in the installation guide and leave feature
planning records outside Git.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from c8d3ed7 to 28eb94b Compare November 21, 2026 10:12
Resolve README and setupCommands conflicts with upstream main while
preserving plugin-first client setup and opt-in Cursor installation.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from a53c63d to 7299d2b Compare November 22, 2026 04:01
Comment thread src/application/SetupPluginCommand.ts Resolved
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/SetupPluginCommand.ts Resolved
Prepare ownership before the short plugin-command timer, retain prelaunch
cleanup owners through shared machinery, and ignore rea.json-backed settings
when deciding whether setup must use direct registration.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from 2d7e199 to 3f21c12 Compare November 22, 2026 04:21
@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request labels Nov 23, 2026
@cursor
cursor Bot force-pushed the feat/plugin-first-setup branch from 4e30166 to cf43b71 Compare November 23, 2026 03:59
Refresh onto upstream main at 2c38fd1. Resolve Windows PATH search and
linked-skill setup test conflicts while keeping plugin-first direct-install
intent and upstream's dotted-name PATH fix plus journey consolidation.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from cf43b71 to caa25b8 Compare November 23, 2026 04:00
Comment thread src/application/SetupPluginHost.ts Resolved
Comment thread src/application/SetupPluginHost.ts Resolved
Require direct registration when setup needs a non-default
XDG_CONFIG_HOME, and guide repair for already-installed plugins
instead of writing a duplicate server. Keep MCP startup admission
required for plugin clients after dropping their registration checks.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from 47956cb to 6c536d7 Compare November 23, 2026 10:14
Comment thread src/application/SetupPluginHost.ts Resolved
Plugin inventory for a non-default XDG_CONFIG_HOME must not require
standalone Node. Direct Bun registration still needs the locator, so
defer the plugin runtime prerequisite until a plugin route is chosen.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from e5e5c43 to 996e9b6 Compare November 23, 2026 10:24
Preserve plugin-first setup failure reasons alongside upstream
invalid_configuration handling from main.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from 2b78321 to 691ac5e Compare November 23, 2026 15:54
@morluto

morluto commented Nov 24, 2026

Copy link
Copy Markdown
Owner

@GamerDubz thanks for the PR — there are 3 open review threads here:

Could you address or reply to these? Once they're resolved and CI is green we can take another look.
cc @gensokyo-dev @dandgabr

@GamerDubz

Copy link
Copy Markdown
Contributor Author

Thanks @morluto! All three are addressed on the current head (691ac5e), and CI is green:

  • Plugins lose saved settings (r4664261280): a non-default XDG_CONFIG_HOME now routes setup through direct registration, so saved settings are kept (6c536d7).
  • Broken plugins look ready (r4664261297): plugin clients are now passed to doctor as pluginClients, so their MCP startup checks still run (6c536d7).
  • Direct setup wrongly requires Node (r4664411373): the Node prerequisite is checked only when a plugin route is actually used, so Bun-only direct setup works (996e9b6).

I've resolved the threads. Let me know if anything else needs a change.

…etup

# Conflicts:
#	scripts/ci/scopes.mjs
#	tests/boundary/filesystem/ciChangeScope.test.ts
#	tests/fixtures/cli-parity/complete-bash-short-aliases.txt
Upstream made DoctorReport.scope_checks optional; keep plugin-host
append and setup summary filtering type-safe.
@GamerDubz
GamerDubz force-pushed the feat/plugin-first-setup branch from 14dbbf8 to 7bcf8b8 Compare November 25, 2026 22:09

This branch has not been deployed

No deployments
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.

3 participants