feat(catalog): add wslu/wslview, installed only under WSL#99
Conversation
Add a wslu catalog entry (binary wslview) plus a dedicated installer, gated by a new requires_wsl catalog flag so it is only surfaced, audited, and installed on WSL. Non-WSL machines are never prompted to install a tool that has no meaning there. - catalog/wslu.json: dedicated_script + skip_upstream + requires_wsl - scripts/install_wslu.sh: apt/dnf/pacman/zypper install, WSL-guarded; optionally sets wslview as the xdg default browser so links open in the Windows browser (opt out via WSLU_SET_DEFAULT_BROWSER=0) - cli_audit/catalog.py: filter requires_wsl tools out of all_tool_definitions() when not running under WSL - tests/test_wsl_gating.py: present-on-WSL / hidden-off-WSL + entry shape - docs: catalog/script counts, CHANGELOG Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #99 +/- ##
==========================================
+ Coverage 69.74% 69.82% +0.07%
==========================================
Files 22 22
Lines 3345 3347 +2
==========================================
+ Hits 2333 2337 +4
+ Misses 1012 1010 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds wslu (binary wslview) as a managed catalog tool to ensure URLs opened from within WSL resolve to the Windows default browser, and introduces a requires_wsl catalog gate so the tool is only surfaced on WSL machines.
Changes:
- Add a new
catalog/wslu.jsonentry plusscripts/install_wslu.sh(package-manager install + optionalxdg-settingsdefault-browser wiring, opt-out viaWSLU_SET_DEFAULT_BROWSER=0). - Implement a
requires_wslfilter inToolCatalog.all_tool_definitions()so WSL-only tools are hidden on non-WSL systems. - Add unit tests for WSL gating and update docs/counts (catalog/scripts totals + changelog).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_wsl_gating.py | Adds tests verifying WSL-only tools are included/excluded based on is_wsl(). |
| scripts/install_wslu.sh | New dedicated installer for wslu/wslview with optional default-browser configuration. |
| scripts/AGENTS.md | Updates script inventory and documents the new wslu installer. |
| cli_audit/catalog.py | Adds the requires_wsl gating logic in the tool-definition load path. |
| CHANGELOG.md | Documents the addition of wslu and the new gating flag + env opt-out. |
| catalog/wslu.json | Introduces the new wslu catalog entry (dedicated script, WSL-gated, skip upstream). |
| catalog/README.md | Updates catalog tool count references (97 → 98). |
| AGENTS.md | Updates repo-level counts (catalog/tools and scripts). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
uninstall_wslu now mirrors the install guard and no-ops off WSL, so the script header's 'graceful no-op elsewhere' claim holds for every action. Points manual non-WSL users at their package manager instead. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
The pattern-target Make section still read '97 cataloged tools'; align it with the catalog bump in this branch. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|



What & why
Adds wslu (binary
wslview) as a managed tool, so links opened from a WSL box (e.g.xdg-open, Python'swebbrowser, MCP servers) go to the Windows default browser instead of a WSLg Linux browser.wslu is only meaningful under WSL, so it is gated: a new
requires_wslcatalog flag hides it from audit/install on non-WSL machines — they are never prompted to install a tool that does nothing there.Changes
catalog/wslu.json—install_method: dedicated_script,binary_name: wslview,requires_wsl: true,skip_upstream: true(apt-managed, no upstream version tracking).scripts/install_wslu.sh— WSL-guarded installer (apt/dnf/pacman/zypper), mirrors theinstall_docker.shpattern. It also points the xdg default browser atwslviewso links open in Windows — opt out withWSLU_SET_DEFAULT_BROWSER=0(idempotent, non-fatal, clearly logged).cli_audit/catalog.py—all_tool_definitions()filters outrequires_wsltools whennot is_wsl(). Single chokepoint;tools_snapshot.jsonis gitignored (regenerated per machine), so no second gate is needed.tests/test_wsl_gating.py— gate present-on-WSL / hidden-off-WSL, ordinary tools unaffected, and the wslu entry shape.Reviewer note
The installer changing the xdg default browser is a deliberate convenience (that's wslu's whole purpose) but it is a system-config side effect — happy to drop it or make it opt-in instead of opt-out if you'd prefer.
Verification
--select=E9,F63,F7,F82): clean.wslviewdetected (3.2.3, methodapt); installer runs idempotently;./scripts/test_smoke.shpasses.