microsoft / microsoft/amplifier
bug(windows): parse_uri does not recognize Windows absolute paths - 'No handler for URI' for local behaviors and bundle modules
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 13
Description
Summary
On native Windows, parse_uri does not recognize absolute Windows paths (drive-letter C:\... / C:/..., or UNC \\server\share\...). They fall through to the package-name heuristic, so no source handler claims them and resolution fails with BundleNotFoundError: No handler for URI: C:\....
Environment
- Windows 11, native PowerShell (no WSL)
amplifierCLI 2026.08.14, amplifier-foundation @ c779cba (installed viauv tool install git+https://github.com/microsoft/amplifier)
Where it breaks
-
Local bundle/behavior references in
~/.amplifier/settings.yaml, e.g.:bundle: app: - C:/Users/dan/code/bundle-the-usual/behaviors/the-usual.yamlproduces
Failed to compose behavior 'C:/Users/dan/...': No handler for URI. -
Relative module entries inside cached git bundles. The app resolves these to absolute OS path strings before passing them to the source resolver, so on Windows every such module fails to activate and strict mode aborts session startup:
- tool-apply-patch: No handler for URI: C:\Users\dan\.amplifier\cache\amplifier-bundle-filesystem-800514b6bec1fdef\modules\tool-apply-patch - tool-terminal-inspector: No handler for URI: C:\...\modules\tool-terminal-inspector - hooks-design-context: No handler for URI: C:\...\modules\hooks-design-context
Root cause
In amplifier_foundation/paths/resolution.py, parse_uri classifies only file:// URLs, leading-/ POSIX absolute paths, and ./ / ../ relative paths as file URIs. C:/... and C:\... match none of these branches and end up in the package-name fallback ("C:" becomes the package, Users/dan/... its subpath).
Repro
from amplifier_foundation.paths.resolution import parse_uri
parse_uri(r"C:\Users\dan\bundle").is_file # False -- expected True
parse_uri("C:/Users/dan/bundle").is_file # False -- expected True
parse_uri(r"\\server\share\bundle").is_file # False -- expected True
Proposed fix
Recognize drive-letter (``:followed by` or `/`) and UNC (`\`) prefixes as file URIs in `parse_uri`, before the package-name fallback. (`file://C:/Users/...` happens to work today because the `file://` branch keeps the drive-letter tail intact, but internal callers pass plain OS paths.)
PR to follow.
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
Start in amplifier_foundation/paths/resolution.py at parse_uri and run the three Windows path examples from the issue. Verify that drive-letter and UNC paths are classified as file URIs before the package-name fallback, then confirm local behaviors and bundle modules resolve without the reported handler error.
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
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100