
    *Qj                       U d Z ddlmZ 	 d5	 	 	 d6dZ edddd	d
didg       edddd	ddidg       edddd	ddidg       eddi        edddd	g dddig        edddd	ddidg       edd d!d	d"did!g       ed#d$d%d&dd	d'dd(d)g       ed*d+i       g	Zd,ed-<    ed. eD              Zd/ed0<   ddd1ddddd#d*d2	Zd3ed4<   y)7u  Device-tool schemas — the tools the brain CALLS but the PHONE EXECUTES.

These are exposed to the LLM exactly like the server-side tools in ``tools.py``,
but they don't run in the gateway: when the brain calls one, the gateway resolves
any saved state it needs (a place for ``navigate``, a contact number for
``call_contact``), emits a WS ``action`` frame to the connected phone, and waits
for the matching ``action_result`` (see ``main.Session`` — the bridge — and
APP_PLAN.md §3b for the wire protocol). The result string is fed back into the
brain's tool loop.

This module holds ONLY the schemas + the name set; the executor/bridge lives on
``main.Session`` because it needs the live WebSocket and the phone store. Keeping
the schemas here lets ``main`` build the brain's toolset as
``tools.TOOL_SPECS + device_tools.DEVICE_TOOL_SPECS`` without a circular import.

The ``action`` name each tool maps to on the wire (what the phone switches on):
    navigate       -> "navigate"      call_contact   -> "call"
    play_music     -> "play_music"    take_screenshot -> "take_screenshot"
    open_camera    -> "open_camera"   open_app       -> "open_app"
    open_url       -> "open_url"      set_timer      -> "set_timer"
    get_location   -> "get_location"
    )annotationsNnamec                $    d| |d||xs g dddS )Nfunctionobject)type
propertiesrequired)r   description
parameters)r   r    )r   r   r	   r
   s       B/Users/ahmed/devFolder/Ultron/claude-voice/gateway/device_tools.py_fnr      s.     & ($N
     navigateu   Start turn-by-turn navigation on Ahmed's phone. Give a saved place label (I'll resolve the address) or a raw destination. Use for 'take me to…', 'navigate to the office'.destinationstringz1A saved place label, an address, or a place name.)r   r   
play_musicuA   Play music on Ahmed's phone. Use for 'play…', 'put on some…'.queryz(Song / artist / playlist / mood to play.call_contactu   Place a phone call to a SAVED contact by name (I resolve the number privately — you never see or say it). Use for 'call my father', 'ring Sara'. If no number is saved, say so and offer to save one.zThe saved contact's name.take_screenshotzWCapture a screenshot on Ahmed's phone. Use for 'take a screenshot', 'grab this screen'.open_cameraz_Open the camera on Ahmed's phone. Use for 'open the camera', 'take a selfie', 'record a video'.mode)photovideoselfiezCamera mode (default photo).)r   enumr   open_appzHOpen an app on Ahmed's phone. Use for 'open WhatsApp', 'launch Spotify'.targetzApp name or package to open.open_urluK   Open a web link on Ahmed's phone. Use for 'open…', 'pull up the website'.urlzThe URL to open.	set_timerud   Set a countdown timer on Ahmed's phone. Resolve durations yourself ('five minutes' → 300 seconds).integerzDuration in seconds.zOptional label, e.g. 'pasta'.)secondslabelr$   get_locationzUGet Ahmed's current location from his phone. Use when you need where he is right now.z
list[dict]DEVICE_TOOL_SPECSc              #  ,   K   | ]  }|d    d     yw)r   r   Nr   ).0specs     r   	<genexpr>r+   b   s      .<):DV):s   zfrozenset[str]DEVICE_TOOL_NAMEScall)	r   r   r   r   r   r   r    r"   r&   zdict[str, str]TOOL_TO_ACTION)N)
r   strr   r/   r	   dictr
   zlist[str] | Nonereturnr0   )	__doc__
__future__r   r   r'   __annotations__	frozensetr,   r.   r   r   r   <module>r6      s  . # &*".2" 
	, 
)67 	8 
 K	8"LN 	O			
 	F 
(3NOP	 	
 	%	(,H!?A 	B
 
		H#AC 	D	
 
		2DEF		
 	,&$:<#"AC	D 
 	
c5! : 5n %. .<):.< %< > < ( "
" 
r   