Skip to content

fix(validate-plugins): skip remote URL sources instead of failing - #714

Open
JoAdo07 wants to merge 1 commit into
cursor:mainfrom
JoAdo07:fix/validate-plugins-remote-url-source
Open

JoAdo07 wants to merge 1 commit into
cursor:mainfrom
JoAdo07:fix/validate-plugins-remote-url-source

Conversation

@JoAdo07

@JoAdo07 JoAdo07 commented Oct 18, 2026 •

Copy link
Copy Markdown

What changed and why

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 (<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 and process.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" }:

  • Schema validation passes (source is a non-empty string).
  • validate-plugins.mjs computes resolve(root, "https://github.com/user/some-plugin") -> <root>/https:/github.com/user/some-plugin, existsSync() is false, fails with ERROR: Plugin "some-plugin": source directory "https://github.com/user/some-plugin" does not exist and exits 1.

With the fix, remote sources are skipped and validation passes.

Verification

  • node scripts/validate-plugins.mjs against the repo's marketplace.json (all local sources) -> passes.
  • Temporarily added a remote-URL entry to 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.
  • Confirmed resolve('/repo', 'https://github.com/user/plugin') produces the bogus path <root>/https:/github.com/user/plugin that 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.mjs no longer treats remote source URLs 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.json and .claude-plugin/marketplace.json loops. That aligns tooling with the marketplace schema, which allows remote source values, without resolve() producing bogus paths and reporting misleading “source directory does not exist” failures.

Local relative source paths 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validate-plugins.mjs rejects marketplace entries whose source is a remote URL, which the schema explicitly allows

1 participant