Repository navigation
refactor(install): move install and update logic into hk-core - #192
Merged
Merged
Conversation
The desktop commands and the web handlers each carried their own copy of the skill install, check-updates and update code. Both now call hk_core::install and hk_core::updates, and one function resolves an agent's skill directory, Hermes category included. Also removes the disabled "More from repos" feature, which Following replaced, and the install_from_git command, which the frontend never called. Behaviour changes: - check_updates returns the status list itself. - install_scanned_skills returns one result per skill. - An install that names no agent is rejected instead of going to the first detected agent. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Deploying harnesskit with
|
| Latest commit: |
9e6e770
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9b45fed0.harnesskit.pages.dev |
| Branch Preview URL: | https://refactor-install-cleanup.harnesskit.pages.dev |
- check_updates only clones the repositories whose skills it has to verify; the rest were cloned for the removed new-skill discovery. - Linking unlinked skills to the Marketplace by name is one function, shared by check_updates and both rescans. - An install resolves its target before cloning, and no longer creates skill directories ahead of a copy that may fail. - install_scanned_skills takes the cache root from its caller, like the other repository functions. - The Marketplace install requires its target agent. - The desktop commands share one blocking helper. - Tests: following on install, and a check/update/removed round trip. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
What
The desktop commands and the web handlers each carried their own, near-identical copy of the skill install, check-updates and update code. This moves it into
hk-core, so both are thin wrappers.hk_core::install: installing from a local folder, a scanned Git repository, the Marketplace and a followed repository now share one path, and one function resolves an agent's skill directory (Hermes category included).hk_core::updates: cached statuses, check updates, update.install_from_git, which the frontend never called, and theuuid/tempfiledependencies the desktop and web crates no longer need.About 2,800 lines removed and 960 added, tests included.
Behaviour changes
check_updatesreturns the status list itself, not{ statuses, new_skills }.install_scanned_skillsreturns one result per skill, not one per agent and skill. The UI only reads the names.install_to_agentreturns what the desktop one returns. The frontend ignores the value.Checked
cargo test --workspace(871 passed),cargo clippy -D warnings,tsc,biome,vitest(373 passed).hk servebuilt from main and from this branch, each in a fresh home. Responses, installed files and recorded sources are identical apart from the two response shapes above.🤖 Generated with Claude Code