Repository navigation
Conversation
validate-plugins.mjs rejected any marketplace entry whose source is a remote URL, even though schemas/marketplace.schema.json:68 explicitly allows 'a remote URL'. resolve(root, entry.source) turns a URL into a bogus local path that never exists, so a schema-valid marketplace with remote plugins failed validation with a misleading 'does not exist' error. Detect remote sources before resolving and skip them, so spec and tooling agree. Local paths are unaffected. Test Plan: ran scripts/validate-plugins.mjs against the repo's marketplace.json (all local sources) -> passes. Temporarily added a remote-URL entry (source: https://github.com/user/remote-test-plugin) to marketplace.json -> validator passes with my fix and would have failed with 'does not exist' without it; reverted the marketplace.json change so the diff is scripts-only. Closes cursor#640.
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 changed and why
validate-plugins.mjsrejected any marketplace entry whosesourceis a remote URL, even thoughschemas/marketplace.schema.json:68explicitly allows "a remote URL".resolve(root, entry.source)turns a URL into a bogus local path (<root>/https:/github.com/user/plugin) that never exists, so a schema-valid marketplace with remote plugins failed validation with a misleading "does not exist" error andprocess.exit(1).Detect remote sources before resolving and skip them, so spec and tooling agree. Local paths are unaffected.
Failing case / reproduction (for fixes)
A marketplace.json with
{ "name": "some-plugin", "source": "https://github.com/user/some-plugin" }:validate-plugins.mjscomputesresolve(root, "https://github.com/user/some-plugin")-><root>/https:/github.com/user/some-plugin,existsSync()is false, fails withERROR: Plugin "some-plugin": source directory "https://github.com/user/some-plugin" does not existand exits 1.With the fix, remote sources are skipped and validation passes.
Verification
node scripts/validate-plugins.mjsagainst the repo'smarketplace.json(all local sources) -> passes.marketplace.json-> validator passes with the fix; would have failed with "does not exist" without it. Reverted that marketplace.json change so the diff is scripts-only.resolve('/repo', 'https://github.com/user/plugin')produces the bogus path<root>/https:/github.com/user/pluginthat the regex now avoids.Closes #640.
Note
Low Risk
Script-only change to validation behavior; local plugin checks are unchanged and remote entries are simply omitted from filesystem validation.
Overview
validate-plugins.mjsno longer treats remotesourceURLs as local plugin directories.The validator now detects scheme-based URLs (
https://, etc.) and skips on-disk checks for those entries in both the.cursor-plugin/marketplace.jsonand.claude-plugin/marketplace.jsonloops. That aligns tooling with the marketplace schema, which allows remotesourcevalues, withoutresolve()producing bogus paths and reporting misleading “source directory does not exist” failures.Local relative
sourcepaths are validated the same as before.Reviewed by Cursor Bugbot for commit a52635f. Bugbot is set up for automated code reviews on this repo. Configure here.