+
    ~j5                     j    ^ RI t ^ RIHt ^ RIHtHtHtHtHt ^RI	H
t
 ^RIHt Rt  ! R R]
4      tR# )    N)Optional)CreateAgentDispatchRequestAgentDispatchDeleteAgentDispatchRequestListAgentDispatchRequestListAgentDispatchResponse)Service)VideoGrantsAgentDispatchServicec                      a a ] tR t^t oRtV3R lV 3R lltV3R lR ltV3R lR ltV3R lR	 ltV3R
 lR lt	Rt
VtV ;t# )r   zManage agent dispatches. Service APIs require roomAdmin permissions.

Recommended way to use this service is via `livekit.api.LiveKitAPI`:

```python
from livekit import api
lkapi = api.LiveKitAPI()
agent_dispatch = lkapi.agent_dispatch
```
c                F   < V ^8  d   QhRS[ P                  RS[RS[RS[/# )   sessionurlapi_key
api_secret)aiohttpClientSessionstr)format__classdict__s   "w/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/livekit/api/agent_dispatch_service.py__annotate__!AgentDispatchService.__annotate__   s0     < < 5 5 <C <# <[^ <    c                (   < \         SV `  WW44       R # )N)super__init__)selfr   r   r   r   	__class__s   &&&&&r   r   AgentDispatchService.__init__   s    w;r   c                &   < V ^8  d   QhRS[ RS[/# )r   reqreturn)r   r   )r   r   s   "r   r   r       s     
 
)C 
 
r   c                   "   V P                   P                  \        RVV P                  \	        RVP
                  R7      4      \        4      G Rj  xL
 #  L5i)a#  Create an explicit dispatch for an agent to join a room.

To use explicit dispatch, your agent must be registered with an `agentName`.

Args:
    req (CreateAgentDispatchRequest): Request containing dispatch creation parameters

Returns:
    AgentDispatch: The created agent dispatch object
CreateDispatchT
room_adminroomN)_clientrequestSVC_auth_headerr
   r)   r   )r   r#   s   &&r   create_dispatch$AgentDispatchService.create_dispatch    sM      \\))kTIJ
 
 	
 
s   AAAAc                ,   < V ^8  d   QhRS[ RS[ RS[/# r   dispatch_id	room_namer$   )r   r   )r   r   s   "r   r   r   3   s"     
 
 
 
 
r   c                   "   V P                   P                  \        R\        VVR7      V P	                  \        RVR7      4      \        4      G Rj  xL
 #  L5i)zDelete an explicit dispatch for an agent in a room.

Args:
    dispatch_id (str): ID of the dispatch to delete
    room_name (str): Name of the room containing the dispatch

Returns:
    AgentDispatch: The deleted agent dispatch object
DeleteDispatchr2   r)   Tr'   N)r*   r+   r,   r   r-   r
   r   )r   r2   r3   s   &&&r   delete_dispatch$AgentDispatchService.delete_dispatch3   sV      \\))&' kT	JK	
 	
 		
 	
s   AAAAc                6   < V ^8  d   QhRS[ RS[S[,          /# )r   r3   r$   )r   listr   )r   r   s   "r   r   r   H   s      * *S *T-5H *r   c                   "   V P                   P                  \        R\        VR7      V P	                  \        RVR7      4      \        4      G Rj  xL
 p\        VP                  4      #  L5i)zList all agent dispatches in a room.

Args:
    room_name (str): Name of the room to list dispatches from

Returns:
    list[AgentDispatch]: List of agent dispatch objects in the room
ListDispatch)r)   Tr'   N)	r*   r+   r,   r   r-   r
   r   r:   agent_dispatches)r   r3   ress   && r   list_dispatch"AgentDispatchService.list_dispatchH   s^      LL(($)4kT	JK%
 
 C(())
s   AA-A+A-c                <   < V ^8  d   QhRS[ RS[ RS[S[,          /# r1   )r   r   r   )r   r   s   "r   r   r   Z   s'      c c h}F] r   c                  "   V P                   P                  \        R\        WR7      V P	                  \        RVR7      4      \        4      G Rj  xL
 p\        VP                  4      ^ 8  d   VP                  ^ ,          # R#  L35i)zGet an Agent dispatch by ID

Args:
    dispatch_id (str): ID of the dispatch to retrieve
    room_name (str): Name of the room containing the dispatch

Returns:
    Optional[AgentDispatch]: The requested agent dispatch object if found, None otherwise
r<   r6   Tr'   N)	r*   r+   r,   r   r-   r
   r   lenr=   )r   r2   r3   r>   s   &&& r   get_dispatch!AgentDispatchService.get_dispatchZ   st      LL(($MkT	JK%
 
 s##$q(''**
s   ABB4B )__name__
__module____qualname____firstlineno____doc__r   r.   r7   r?   rD   __static_attributes____classdictcell____classcell__)r    r   s   @@r   r   r      sA     	< <
 
&
 
** *$  r   )r   typingr   livekit.protocol.agent_dispatchr   r   r   r   r   _servicer	   access_tokenr
   r,   r   rF   r   r   <module>rS      s3        % \7 \r   