
    i
              
          d Z ddlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZ deedfdeedfde	ed	fd
e
edfdeedfdeedfdeedffZddZdS )u  Spotify integration plugin — bundled, auto-loaded.

Registers 7 tools (playback, devices, queue, search, playlists, albums,
library) into the ``spotify`` toolset. Each tool's handler is gated by
``_check_spotify_available()`` — when the user has not run ``hermes auth
spotify``, the tools remain registered (so they appear in ``hermes
tools``) but the runtime check prevents dispatch.

Why a plugin instead of a top-level ``tools/`` file?

- ``plugins/`` is where third-party service integrations live (see
  ``plugins/image_gen/`` for the backend-provider pattern, ``plugins/
  disk-cleanup/`` for the standalone pattern). ``tools/`` is reserved
  for foundational capabilities (terminal, read_file, web_search, etc.).
- Mirroring the image_gen plugin layout (``plugins/<category>/<backend>/``
  for categories, flat ``plugins/<name>/`` for standalones) makes new
  service integrations a pattern contributors can copy.
- Bundled + ``kind: backend`` auto-loads on startup just like image_gen
  backends — no user opt-in needed, no ``plugins.enabled`` config.

The Spotify auth flow (``hermes auth spotify``), CLI plumbing, and docs
are unchanged. This move is purely structural.
    )annotations)SPOTIFY_ALBUMS_SCHEMASPOTIFY_DEVICES_SCHEMASPOTIFY_LIBRARY_SCHEMASPOTIFY_PLAYBACK_SCHEMASPOTIFY_PLAYLISTS_SCHEMASPOTIFY_QUEUE_SCHEMASPOTIFY_SEARCH_SCHEMA_check_spotify_available_handle_spotify_albums_handle_spotify_devices_handle_spotify_library_handle_spotify_playback_handle_spotify_playlists_handle_spotify_queue_handle_spotify_searchspotify_playbacku   🎵spotify_devicesu   🔈spotify_queueu   📻spotify_searchu   🔎spotify_playlistsu   📚spotify_albumsu   💿spotify_libraryu   ❤️returnNonec           	     d    t           D ]'\  }}}}|                     |d||t          |           (dS )z=Register all Spotify tools. Called once by the plugin loader.spotify)nametoolsetschemahandlercheck_fnemojiN)_TOOLSregister_toolr   )ctxr   r    r!   r#   s        =/home/ubuntu/.hermes/hermes-agent/plugins/spotify/__init__.pyregisterr(   8   sX    (. 
 
$fgu- 	 	
 	
 	
 	

 
    N)r   r   )__doc__
__future__r   plugins.spotify.toolsr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r$   r(    r)   r'   <module>r.      sV   0 # " " " " "                                 & 14LvV04KvV.4IvV/4JvV24MvV/4JvV04KxX


 

 

 

 

 

r)   