From 4ff7950f7f6b21418b51873ebaef83f658d7f963 Mon Sep 17 00:00:00 2001 From: Teknium Date: Fri, 24 Apr 2026 05:15:06 -0700 Subject: [PATCH] chore(spotify): gate toolset off by default, add to hermes tools UI Follow-up on top of #15096 cherry-pick: - Remove spotify_* from _HERMES_CORE_TOOLS (keep only in the 'spotify' toolset, so the 9 Spotify tool schemas are not shipped to every user). - Add 'spotify' to CONFIGURABLE_TOOLSETS + _DEFAULT_OFF_TOOLSETS so new installs get it opt-in via 'hermes tools', matching homeassistant/rl. - Wire TOOL_CATEGORIES entry pointing at 'hermes auth spotify' for the actual PKCE login (optional HERMES_SPOTIFY_CLIENT_ID / HERMES_SPOTIFY_REDIRECT_URI env vars). - scripts/release.py: map contributor email to GitHub login. --- hermes_cli/tools_config.py | 19 ++++++++++++++++++- scripts/release.py | 1 + toolsets.py | 4 ---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/hermes_cli/tools_config.py b/hermes_cli/tools_config.py index e89f96178..42170604c 100644 --- a/hermes_cli/tools_config.py +++ b/hermes_cli/tools_config.py @@ -67,12 +67,13 @@ CONFIGURABLE_TOOLSETS = [ ("messaging", "๐Ÿ“จ Cross-Platform Messaging", "send_message"), ("rl", "๐Ÿงช RL Training", "Tinker-Atropos training tools"), ("homeassistant", "๐Ÿ  Home Assistant", "smart home device control"), + ("spotify", "๐ŸŽต Spotify", "playback, search, playlists, library"), ] # Toolsets that are OFF by default for new installs. # They're still in _HERMES_CORE_TOOLS (available at runtime if enabled), # but the setup checklist won't pre-select them for first-time users. -_DEFAULT_OFF_TOOLSETS = {"moa", "homeassistant", "rl"} +_DEFAULT_OFF_TOOLSETS = {"moa", "homeassistant", "rl", "spotify"} def _get_effective_configurable_toolsets(): @@ -361,6 +362,22 @@ TOOL_CATEGORIES = { }, ], }, + "spotify": { + "name": "Spotify", + "icon": "๐ŸŽต", + "providers": [ + { + "name": "Spotify Web API", + "tag": "PKCE OAuth โ€” run `hermes auth spotify` after this", + "env_vars": [ + {"key": "HERMES_SPOTIFY_CLIENT_ID", "prompt": "Spotify app client_id", + "url": "https://developer.spotify.com/dashboard"}, + {"key": "HERMES_SPOTIFY_REDIRECT_URI", "prompt": "Redirect URI (must be allow-listed in your Spotify app)", + "default": "http://127.0.0.1:8888/callback"}, + ], + }, + ], + }, "rl": { "name": "RL Training", "icon": "๐Ÿงช", diff --git a/scripts/release.py b/scripts/release.py index a4c88be57..cecc70696 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -44,6 +44,7 @@ AUTHOR_MAP = { "teknium@nousresearch.com": "teknium1", "127238744+teknium1@users.noreply.github.com": "teknium1", "343873859@qq.com": "DrStrangerUJN", + "uzmpsk.dilekakbas@gmail.com": "dlkakbs", "jefferson@heimdallstrategy.com": "Mind-Dragon", "130918800+devorun@users.noreply.github.com": "devorun", "maks.mir@yahoo.com": "say8hi", diff --git a/toolsets.py b/toolsets.py index 5fd67fda7..38c51711b 100644 --- a/toolsets.py +++ b/toolsets.py @@ -60,10 +60,6 @@ _HERMES_CORE_TOOLS = [ "send_message", # Home Assistant smart home control (gated on HASS_TOKEN via check_fn) "ha_list_entities", "ha_get_state", "ha_list_services", "ha_call_service", - # Spotify playback and library tools (gated on Spotify auth via check_fn) - "spotify_playback", "spotify_devices", "spotify_queue", "spotify_search", - "spotify_playlists", "spotify_albums", "spotify_saved_tracks", - "spotify_saved_albums", "spotify_activity", ]