fix: allow deleting skills whose files were removed and 404 on enabling missing skills - #202
Open
Georgyhongbo wants to merge 1 commit into
Open
Conversation
When an installed skill's files are removed outside the API, the dashboard kept a stale entry: DELETE reported "not found" so the entry could not be cleared, while "apply now" (enable) reported success without the skill existing. - delete_skill is now idempotent: missing SKILL.md returns 204 so stale entries can be cleaned up. - enable_skill validates the skill still exists in the catalog (workspace, builtin and mounted package skills) and returns 404 otherwise.
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.
When an installed skill's files are removed outside the API, the dashboard kept a stale entry: DELETE reported "not found" so the entry could not be cleared, while "apply now" (enable) reported success without the skill existing.
Summary
已安装技能的文件在页面外被手动删除后,网页上残留条目无法清理,且行为不一致:「删除」技能报「未找到」(404) 删不掉;同一技能点「立即应用」却提示「技能已启用」(204),但技能文件根本不存在。
delete_skill幂等化:SKILL.md 缺失(已在页面外删除或已软删除)时返回 204,让前端能清掉残留条目。enable_skill校验存在性:新增_skill_catalog_exists,经agent_registry.list_skill_summaries实时读盘,覆盖 workspace / builtin / 挂载的全局技能包;技能不存在时返回 404,不再误报「已启用」。Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
make allpasses locally实际验证:
tests/integration/test_skills_api.py→ 28 passedapiErrorMessage已会展示服务端 404 detailChecklist
CHANGELOG.md(if user-facing)