From 358ceda227620c7fb3f56ab68a7457fdc77507c2 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 24 Sep 2026 10:57:55 +0000 Subject: [PATCH] chore(marketplace): drop pluginRoot so sources are not prefixed twice Cursor prefixes metadata.pluginRoot onto every plugins[].source. Those sources are already repo-relative paths (./plugins/), so the prefix resolved to plugins/plugins/ and Customize failed with ENOENT. Maintenance scripts resolve source from the repository root and never apply pluginRoot. Fixes #3 Co-authored-by: ROBJkE --- .cursor-plugin/marketplace.json | 3 +-- .github/scripts/validate-cursor-plugins.sh | 7 +++++++ AGENTS.md | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json index c6650bc..9126525 100644 --- a/.cursor-plugin/marketplace.json +++ b/.cursor-plugin/marketplace.json @@ -7,8 +7,7 @@ }, "metadata": { "description": "Cursor plugins for Shopware development", - "version": "1.1.0", - "pluginRoot": "./plugins" + "version": "1.1.0" }, "plugins": [ { diff --git a/.github/scripts/validate-cursor-plugins.sh b/.github/scripts/validate-cursor-plugins.sh index 16ca2cc..663a389 100755 --- a/.github/scripts/validate-cursor-plugins.sh +++ b/.github/scripts/validate-cursor-plugins.sh @@ -4,6 +4,7 @@ # # Validates the Cursor-only marketplace: # - .cursor-plugin/marketplace.json exists and lists plugins +# - metadata.pluginRoot is unset (sources are already repo-relative) # - each plugin has .cursor-plugin/plugin.json # - no Claude Code marketplace or plugin manifests remain # - MCP plugins ship mcp.json (default discovery) with CURSOR_PLUGIN_ROOT @@ -52,6 +53,12 @@ if ! jq -e '.name and .owner.name and .plugins' "$CURSOR_MARKETPLACE" >/dev/null exit 1 fi +plugin_root=$(jq -r '.metadata.pluginRoot // empty' "$CURSOR_MARKETPLACE") +if [ -n "$plugin_root" ]; then + log_error "marketplace.json must not set metadata.pluginRoot (${plugin_root}). Each source is already repo-relative (./plugins/); Cursor prefixes pluginRoot onto every source and looks up plugins/plugins/." + failed=$((failed + 1)) +fi + while IFS= read -r plugin_name; do [ -z "$plugin_name" ] && continue source_path=$(jq -r --arg name "$plugin_name" '.plugins[] | select(.name == $name) | .source // empty' "$CURSOR_MARKETPLACE") diff --git a/AGENTS.md b/AGENTS.md index 7ba8df9..505ac75 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -54,6 +54,8 @@ plugins/ - `owner` — Object with at least `name` - `plugins` — Array of `{ "name", "source" }` (`source` is a relative path starting with `./`) +Omit `metadata.pluginRoot`. Each `source` is already a repo-relative path such as `./plugins/`. Cursor prefixes `pluginRoot` onto every `source`, so setting both looks up `plugins/plugins/` and the plugin fails to load. + ### plugin.json Schema ```json