microsoft / microsoft/amplifier
sources.bundles setting exists in settings API but isn't wired into bundle discovery
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 13
Description
Description
The AppSettings.get_bundle_sources() method exists in amplifier_app_cli/lib/settings.py and allows users to configure bundle source overrides via settings.yaml:
sources:
bundles:
workspaces: "file://.amplifier"
However, this setting is never used by bundle discovery. The AppBundleDiscovery.find() method in amplifier_app_cli/lib/bundle_loader/discovery.py only checks:
- Registry (well-known bundles, user registry)
- Filesystem search paths
It never calls get_bundle_sources() to check for source overrides.
Impact
- Users cannot use
sources.bundlesin project settings.yaml to make bundles self-contained - The
amplifier source add <bundle> <path>command for bundles does not actually affect bundle resolution amplifier source listshows bundle sources but they do not do anything
Expected Behavior
sources.bundles overrides should be checked during bundle discovery, similar to how sources.modules works for module resolution.
Reproduction
- Create
.amplifier/settings.yamlwith:bundle: active: workspaces sources: bundles: workspaces: "file://.amplifier" - Run
amplifier bundle show workspaces - Error: "No handler for URI: workspaces"
Workaround
Use a URI directly in bundle.active:
bundle:
active: "file://.amplifier"
Affected Component
amplifier-app-cli - amplifier_app_cli/lib/bundle_loader/discovery.py
Suggested Fix
In AppBundleDiscovery.find(), check AppSettings().get_bundle_sources() before falling back to filesystem search paths:
def find(self, name: str) -> str | None:
# Check registry first
uri = self._registry.find(name)
if uri:
return uri
# Check settings source overrides (NEW)
from ..lib.settings import AppSettings
bundle_sources = AppSettings().get_bundle_sources()
if name in bundle_sources:
return bundle_sources[name]
# Search filesystem paths
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read amplifier_app_cli/lib/settings.py and amplifier_app_cli/lib/bundle_loader/discovery.py, then reproduce the issue with amplifier bundle show workspaces using the settings.yaml example. Compare bundle discovery with the existing sources.modules behavior. Done means a sources.bundles override resolves the named bundle and amplifier source list entries affect bundle resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100