feat(deps): support marketplace dependencies in plugin.json#1422
Open
stbenjam wants to merge 3 commits into
Open
feat(deps): support marketplace dependencies in plugin.json#1422stbenjam wants to merge 3 commits into
stbenjam wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for marketplace-style dependency entries ({name: ..., marketplace: ...}) in plugin.json/apm.yml by extending dependency parsing and resolving those placeholders into concrete git refs during BFS dependency resolution.
Changes:
- Extend
DependencyReferenceto represent and parse marketplace dependency dict entries. - Resolve marketplace dependencies to concrete git references during BFS tree building (with auth resolver plumbing from install context).
- Add unit + integration tests covering parsing and resolution behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/apm_cli/models/dependency/reference.py |
Adds marketplace fields, parsing support for {name, marketplace}, and guards for unresolved marketplace refs in install-path/serialization helpers. |
src/apm_cli/deps/apm_resolver.py |
Introduces marketplace resolution during BFS and threads auth_resolver into resolver calls. |
src/apm_cli/install/phases/resolve.py |
Passes ctx.auth_resolver into APMDependencyResolver for marketplace resolution. |
tests/test_apm_package_models.py |
Adds parsing/validation tests for marketplace dependency dict format. |
tests/test_apm_resolver.py |
Adds tests for resolver marketplace-resolution behavior and tree integration. |
tests/integration/test_marketplace_plugin_integration.py |
Adds integration coverage for plugin.json parsing with marketplace deps and mixed dependency scenarios. |
Comments suppressed due to low confidence (2)
src/apm_cli/models/dependency/reference.py:1578
to_apm_yml_entry()now raisesValueErrorfor unresolved marketplace deps. Since this is a public-ish serialization helper used by manifest writers, consider documenting this in the docstring and ensuring any call sites that may encounter marketplace refs either resolve them first or preserve the original dict form instead of callingto_apm_yml_entry().
if self.is_marketplace:
raise ValueError(
f"Cannot serialize unresolved marketplace dependency "
f"'{self.marketplace_plugin_name}@{self.marketplace_name}'"
)
src/apm_cli/models/dependency/reference.py:548
- This PR changes the supported dependency format by allowing marketplace dict entries in
plugin.json/apm.yml. Per the repo's docs-update rules, please update the Starlight docs underdocs/src/content/docs/and the APM guide skill referencepackages/apm-guide/.apm/skills/apm-usage/dependencies.mdto document{name: ..., marketplace: ...}entries and how they are resolved.
# Support marketplace dependencies: { name: X, marketplace: Y }
3 tasks
not-stbenjam
added a commit
to not-stbenjam/apm
that referenced
this pull request
May 20, 2026
Address PR microsoft#1422 review feedback: - Marketplace resolution failures now record errors on the dependency graph instead of silently dropping the dependency - Updated get_install_path() docstring to document ValueError for unresolved marketplace deps - Updated parse_from_dict() docstring to document marketplace dict format Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Plugins like openshift-eng/ai-helpers/golang declare transitive deps as
`{"name": "gopls-lsp", "marketplace": "claude-plugins-official"}` in
plugin.json. Previously parse_from_dict() rejected these with "must have
a 'git' or 'path' field". Now marketplace dicts are parsed into
DependencyReference objects and resolved to concrete git refs during
BFS dependency resolution via resolve_marketplace_plugin().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address PR microsoft#1422 review feedback: - Marketplace resolution failures now record errors on the dependency graph instead of silently dropping the dependency - Updated get_install_path() docstring to document ValueError for unresolved marketplace deps - Updated parse_from_dict() docstring to document marketplace dict format Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
555fa90 to
2c08c61
Compare
2c08c61 to
362ebe5
Compare
The object form sections in the consumer guide and apm-guide skill reference had bare YAML examples with no field tables or explanatory text. Add structured documentation for all three mutually exclusive dict variants (git, path, marketplace). Add the new marketplace dict form to the manifest schema spec (Section 4.1.2). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Description
Plugins like openshift-eng/ai-helpers/golang declare transitive deps as
{"name": "gopls-lsp", "marketplace": "claude-plugins-official"}in plugin.json. Previously parse_from_dict() rejected these with "must have a 'git' or 'path' field". Now marketplace dicts are parsed into DependencyReference objects and resolved to concrete git refs during BFS dependency resolution via resolve_marketplace_plugin().Note: marketplace must still have been previously registered w/ apm to work.
Fixes # (issue)
N/A
Type of change
Testing