Only install skills for clients detected on the system#4899
Open
Only install skills for clients detected on the system#4899
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4899 +/- ##
==========================================
+ Coverage 69.21% 69.25% +0.03%
==========================================
Files 533 533
Lines 55257 55266 +9
==========================================
+ Hits 38246 38272 +26
+ Misses 14068 14052 -16
+ Partials 2943 2942 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
thv skill installruns without--clients(or with--clients=all), skills were extracted to directories for every client withSupportsSkills: truein the static config (~20 clients), regardless of whether those clients are actually present on the system.IsClientInstalledtoClientManager— uses the sameos.Statpath check already present inGetClientStatus— and refactorGetClientStatusto call it.clientPathAdapter.ListSkillSupportingClients()to only return clients that passIsClientInstalled, so the default install targets only the clients that exist on the machine.--clientsas an explicit override (also corrects the HTTP status from 500 to 400).Type of change
Test plan
task test)task lint-fix)Changes
pkg/client/discovery.goIsClientInstalled(clientType ClientApp) bool; refactorGetClientStatusto call itpkg/client/discovery_test.goTestIsClientInstalledcovering settings-file present, dir present, dir absent, and unregistered clientpkg/api/server.goclientPathAdapter.ListSkillSupportingClientsto installed clients only; log skipped clients at debugpkg/skills/skillsvc/skillsvc.goDoes this introduce a user-facing change?
Yes —
thv skill install <skill>no longer writes to directories for clients that aren't installed. Users with no detected clients get a clear error message suggesting--clientsas an override. Explicit--clients=<name>continues to work regardless of detection.