-
Notifications
You must be signed in to change notification settings - Fork 245
Description
Summary
When a module fails the module_importable validation check due to a missing Python dependency, the error message only states the missing module name. It should also provide the exact command the user needs to run to resolve it.
Current behavior
Failed to load module 'tool-media-pipeline': Module 'tool-media-pipeline' failed validation:
FAILED: 0/1 checks passed (1 errors, 0 warnings).
Errors: module_importable: Failed to import module: No module named 'edge_tts'
The user must then figure out on their own:
- That
edge_ttsmaps to the PyPI packageedge-tts(different spelling) - That Amplifier is installed via
uv tooland cannot use a plainpip install - The correct fix:
uv tool install --with edge-tts amplifier
Desired behavior
The validation error should include a human-readable install hint:
Failed to load module 'tool-media-pipeline': missing dependency 'edge_tts'
Fix: uv tool install --with edge-tts amplifier
Broader opportunity
Modules already know what they import. If modules could optionally declare a pypi_package mapping alongside their imports (e.g. edge_tts -> edge-tts), the loader could:
- Detect the missing import
- Look up the correct PyPI package name
- Surface the exact
uv tool install --with <package> amplifiercommand in the error
This would close the UX gap for any module with optional dependencies — TTS providers, OCR libraries, cloud SDKs, etc. — without requiring auto-installation (which carries security implications).
Context
- Amplifier is installed as a
uvisolated tool, sopip installdoesn't work - Auto-install at runtime would have security implications and is not requested here
- The ask is purely better error messaging + optional dependency declaration so the loader can generate the right hint
Affected module
tool-media-pipeline (requires edge-tts, which is not bundled by default)
Labels
enhancement, dx, module-loader