Repository navigation
Conversation
…gins instead of dropping the later one
|
@deanrie is attempting to deploy a commit to the Anysphere Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When two sub-plugins in one repository ship a component with the same file or directory name, the GitHub import now keeps both. The first occurrence keeps its slug; the later one gets its sub-plugin directory as a slug prefix, the way the
hookscomponent already does.Why
parseGitHubPluginwalks the repo root and every sub-plugin dir and derives component slugs from the file or directory name only (rules/<file>.mdc,skills/<dir>/SKILL.md,agents/<file>.md,commands/<file>.md). The final dedup keeps the firsttype:slugand silently drops every later one. In a monorepo,alpha/skills/setup/SKILL.mdandbeta/skills/setup/SKILL.mdimport as one skill; beta's copy disappears without an error.cursor/plugins itself has two such collisions today:
skills/pr-review-canvasexists in bothcursor-team-kitandpr-review-canvas, andskills/thermo-nuclear-code-quality-reviewin bothcursor-team-kitandthermos. An import of that repo, or of a fork used as a personal marketplace, loses one copy of each.Change
parse.tsrecords which prefix each component came from. In the dedup, a component whosetype:slugis already taken and that came from a sub-plugin dir getsslugify("<dir> <slug>")(capped at 80 byslugify); only a key that still collides after that is dropped. Components from the repo root, and every component of a single-plugin repo, keep exactly the slug they have today, so existing listings and the rescan diff keys inupdate-plugin.tsdo not move for them.Checked
parse.tsandfetchstubbed to a fake tree: a root marketplace with sub-pluginsalphaandbeta, each withskills/setup/SKILL.md,rules/general.mdcandhooks/hooks.json. Onmain: 4 components, beta's rule and skill missing. With this change: 6 components,beta-generalandbeta-setupadded, the other four unchanged.tsc --noEmitshows the same single pre-existing error inscan.tsonmainand here.git merge-treeclean againstmainand against the open PRs that touchparse.ts(Fix MCP install: preserve server name and show paste-ready config #427, chore: lint via biome, current Open Plugins links, cron-auth constant-time compare, CI token scope, single biome version #450, fix(plugins): install repo-ingested MCP servers under their submitted name and show a paste-ready config (lands #427; closes #416) #457, fix(github-plugin): retry secondary rate limits, not only primary ones #466, fix(github-plugin): treat a sub-plugin dir as a literal path when filtering the tree #467, fix(github-plugin): encode repo paths in raw.githubusercontent.com URLs #472), and against fix(scan): cap what a repository archive unpacks to before it reaches tmpfs #469 and fix(scan): show every submitter-typed value to the security agent as untrusted #475.