{{ message }}
feat: disable / enable skills + preferences api - #47595
Open
neriousy wants to merge 5 commits into
Open
Conversation
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.

Issue for this PR
Related: #43536 (earlier capability-preference approach).
Type of change
What does this PR do?
Adds persistent, server-wide skill enable/disable preferences, with controls in the TUI and desktop/web app.
/skillsopens List skills or Toggle skills. Toggle rows have fuzzy search across IDs, names, and descriptions, Enabled/Disabled labels, Enter to toggle, and Ctrl+R to reset.Preferences API
Preferences is a reusable Core service over KV. It stores explicit JSON values and validates writes against a registered schema for each preference kind.
skill.activationis the first kind; only its value schema is restricted toenabled/disabled. Other kinds can define boolean, numeric, string, array, object, or nullable values.GET /api/preferencesGET /api/preferences/:kind/:idPUT /api/preferences/:kind/:idwith{ "value": "disabled" }DELETE /api/preferences/:kind/:idEach target has one KV entry under
preferences:values:, containing{ target, value }. Explicit choices survive restarts; reset deletes the override. Skills default to enabled. An explicit JSON null value is distinct from a missing override. Unknown kinds and invalid values return HTTP 400.New kinds register their schemas in
packages/core/src/preferences.ts. Domains own defaults and behavior; Preferences owns validation, persistence, reset, and globalpreferences.updatedinvalidations.How skills use it
skill.list()returns all registered definitions, with no activation metadata. Consumers join those definitions with preference overrides:Preference updates refresh availability across loaded Locations without refetching definitions. The TUI, desktop/web composer, Mini, and ACP filter disabled skills from normal pickers.
Core also excludes disabled skills from model guidance and rejects new tool loads, prompt attachments, and explicit session activation. Session APIs return
SkillDisabledError(HTTP 409). Existing history and already-admitted prompt snapshots are preserved.autoinvoke: falseremains manual-only behavior, separate from disablement and agent permissions.How did you verify your code works?
Screenshots / recordings
Not attached yet. TUI renderer and browser tests cover the interactions.
Checklist