Skip to content

fix: respect metadata.pluginRoot + prepare v0.8.9 hotfix#512

Merged
danielmeppiel merged 3 commits intomainfrom
fix/marketplace-plugin-root
Mar 31, 2026
Merged

fix: respect metadata.pluginRoot + prepare v0.8.9 hotfix#512
danielmeppiel merged 3 commits intomainfrom
fix/marketplace-plugin-root

Conversation

@danielmeppiel
Copy link
Copy Markdown
Collaborator

@danielmeppiel danielmeppiel commented Mar 31, 2026

Problem

apm install azure-cloud-development@awesome-copilot fails:

[x] github/awesome-copilot/azure-cloud-development -- not accessible or doesn't exist

The actual package lives at github/awesome-copilot/plugins/azure-cloud-development.

Root Cause

The upstream awesome-copilot marketplace.json declares:

{
  "metadata": { "pluginRoot": "./plugins" },
  "plugins": [
    { "name": "azure-cloud-development", "source": "azure-cloud-development" }
  ]
}

pluginRoot tells consumers that bare-name plugin sources resolve under plugins/. Our parser never read this field, so "source": "azure-cloud-development" resolved to github/awesome-copilot/azure-cloud-development (missing plugins/ prefix).

Fix

  • models.py — Added plugin_root: str to MarketplaceManifest, parsed from metadata.pluginRoot
  • resolver.py_resolve_relative_source() prepends plugin_root to bare-name sources (no /); threaded through resolve_plugin_source() and resolve_marketplace_plugin()
  • Tests — 10 new test cases covering pluginRoot parsing, bare-name resolution with/without root, path sources bypassing root

Release v0.8.9

All 3398 unit tests pass.

Bare-name sources like "azure-cloud-development" in marketplace.json
were resolved directly under owner/repo, ignoring the pluginRoot field
that specifies the base directory (e.g. "./plugins").

Now _resolve_relative_source() prepends plugin_root to bare names,
producing the correct path (github/awesome-copilot/plugins/azure-cloud-development).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 31, 2026 13:51
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danielmeppiel danielmeppiel changed the title fix: respect metadata.pluginRoot when resolving marketplace plugins fix: respect metadata.pluginRoot + prepare v0.8.9 hotfix Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for metadata.pluginRoot in marketplace manifests so that bare-name plugin sources (e.g., "source": "azure-cloud-development") resolve under the configured root directory (e.g., ./plugins) when installing from marketplaces like github/awesome-copilot.

Changes:

  • Extend MarketplaceManifest to parse and store metadata.pluginRoot as plugin_root.
  • Thread plugin_root through marketplace source resolution and apply it to bare-name relative sources.
  • Add unit tests covering parsing and resolution behavior with/without pluginRoot.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

File Description
tests/unit/marketplace/test_marketplace_resolver.py Adds coverage for bare-name relative source resolution with plugin_root.
tests/unit/marketplace/test_marketplace_models.py Adds coverage for parsing metadata.pluginRoot into manifest.plugin_root.
src/apm_cli/marketplace/resolver.py Threads plugin_root into resolution logic and prefixes bare-name sources when configured.
src/apm_cli/marketplace/models.py Stores plugin_root on the manifest and parses it from metadata.pluginRoot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danielmeppiel danielmeppiel merged commit c452717 into main Mar 31, 2026
19 checks passed
@danielmeppiel danielmeppiel deleted the fix/marketplace-plugin-root branch March 31, 2026 14:01
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.

2 participants