+
    wi                     j    R t ^ RIHt ^ RIHtHtHtHt R R ltR R lt	R R lt
R	 R
 ltR R ltR# )a  
Tasks capability checking utilities.

This module provides functions for checking and requiring task-related
capabilities. All tasks capability logic is centralized here to keep
the main session code clean.

WARNING: These APIs are experimental and may change without notice.
)McpError)INVALID_REQUESTClientCapabilitiesClientTasksCapability	ErrorDatac                <    V ^8  d   QhR\         R\         R\        /# )   requiredclientreturn)r   bool)formats   "^/home/ubuntu/.local/lib/python3.14/site-packages/mcp/shared/experimental/tasks/capabilities.py__annotate__r      s&     # ###!# 
#    c                &   V P                   f   R# VP                   f   R# V P                   P                  ea   VP                   P                  f   R# V P                   P                  P                  e%   VP                   P                  P                  f   R# V P                   P                  ea   VP                   P                  f   R# V P                   P                  P                  e%   VP                   P                  P                  f   R# R# )z
Check if client's tasks capability matches the required capability.

Args:
    required: The capability being checked for
    client: The client's declared capabilities

Returns:
    True if client has the required capability, False otherwise
TF)requestselicitationcreatesamplingcreateMessage)r	   r
   s   &&r   check_tasks_capabilityr      s       $$0??&&.((//;**119 !!-??##+%%33?''55=r   c                0    V ^8  d   QhR\         R\        /# r   capsr   r   r   )r   s   "r   r   r   :   s     > >); > >r   c                    V P                   f   R# V P                   P                  f   R# V P                   P                  P                  f   R# V P                   P                  P                  P                  RJ# )zACheck if capabilities include task-augmented elicitation support.NF)tasksr   r   r   r   s   &r   has_task_augmented_elicitationr   :   s\    zzzz"zz&&.::**11==r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r   E   s     B B&8 BT Br   c                    V P                   f   R# V P                   P                  f   R# V P                   P                  P                  f   R# V P                   P                  P                  P                  RJ# )z>Check if capabilities include task-augmented sampling support.NF)r   r   r   r   r   s   &r   has_task_augmented_samplingr"   E   s\    zzzz"zz##+::''55TAAr   c                6    V ^8  d   QhR\         R,          RR/# r   client_capsNr   r   )r   s   "r   r   r   P   s!     
 
4F4M 
RV 
r   c                d    V e   \        V 4      '       g   \        \        \        RR7      4      hR# )z
Raise McpError if client doesn't support task-augmented elicitation.

Args:
    client_caps: The client's declared capabilities, or None if not initialized

Raises:
    McpError: If client doesn't support task-augmented elicitation
Nz2Client does not support task-augmented elicitationcodemessage)r   r   r   r   r%   s   &r   "require_task_augmented_elicitationr,   P   s6     "@"M"M$L
 	
 #Nr   c                6    V ^8  d   QhR\         R,          RR/# r$   r&   )r   s   "r   r   r   c   s      
 
1Cd1J 
t 
r   c                d    V e   \        V 4      '       g   \        \        \        RR7      4      hR# )z
Raise McpError if client doesn't support task-augmented sampling.

Args:
    client_caps: The client's declared capabilities, or None if not initialized

Raises:
    McpError: If client doesn't support task-augmented sampling
Nz/Client does not support task-augmented samplingr(   )r"   r   r   r   r+   s   &r   require_task_augmented_samplingr/   c   s6     "=k"J"J$I
 	
 #Kr   N)__doc__mcp.shared.exceptionsr   	mcp.typesr   r   r   r   r   r   r"   r,   r/    r   r   <module>r4      s4    + #L>B
&
r   