Ë
    ïñþió  ã                   óŒ   — d Z ddlmZ ddlmZmZmZmZ dededefd„Z	dedefd	„Z
dedefd
„Zdedz  ddfd„Zdedz  ddfd„Zy)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Ú	ErrorDataÚrequiredÚclientÚreturnc                 óð  — | j                   €y|j                   €y| j                   j                  �X|j                   j                  €y| j                   j                  j                  �!|j                   j                  j                  €y| j                   j                  �X|j                   j                  €y| j                   j                  j                  �!|j                   j                  j                  €yy)a  
    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     új/root/aria/mcps/aria-brain/venv/lib/python3.12/site-packages/mcp/shared/experimental/tasks/capabilities.pyÚcheck_tasks_capabilityr      sÓ   € ð ×ÑÐ ØØ‡�ÐØð ×Ñ×$Ñ$Ð0Ø�?‰?×&Ñ&Ð.ØØ×Ñ×(Ñ(×/Ñ/Ð;Ø�‰×*Ñ*×1Ñ1Ð9Øð ×Ñ×!Ñ!Ð-Ø�?‰?×#Ñ#Ð+ØØ×Ñ×%Ñ%×3Ñ3Ð?Ø�‰×'Ñ'×5Ñ5Ð=Øàó    Úcapsc                 óä   — | j                   €y| j                   j                  €y| j                   j                  j                  €y| j                   j                  j                  j                  duS )zACheck if capabilities include task-augmented elicitation support.NF)Útasksr   r   r   ©r   s    r   Úhas_task_augmented_elicitationr   :   s\   € à‡z�zÐØØ‡z�z×ÑÐ"ØØ‡z�z×Ñ×&Ñ&Ð.ØØ�:‰:×Ñ×*Ñ*×1Ñ1¸Ð=Ð=r   c                 óä   — | j                   €y| j                   j                  €y| j                   j                  j                  €y| j                   j                  j                  j                  duS )z>Check if capabilities include task-augmented sampling support.NF)r   r   r   r   r   s    r   Úhas_task_augmented_samplingr   E   s\   € à‡z�zÐØØ‡z�z×ÑÐ"ØØ‡z�z×Ñ×#Ñ#Ð+ØØ�:‰:×Ñ×'Ñ'×5Ñ5¸TÐAÐAr   Úclient_capsNc                 óR   — | �t        | «      st        t        t        d¬«      «      ‚y)a  
    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   s3   € ð ÐÔ"@ÀÔ"MÜÜÜ$ØLôó
ð 	
ð #Nr   c                 óR   — | �t        | «      st        t        t        d¬«      «      ‚y)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   s3   € ð ÐÔ"=¸kÔ"JÜÜÜ$ØIôó
ð 	
ð #Kr   )Ú__doc__Úmcp.shared.exceptionsr   Ú	mcp.typesr   r   r   r   Úboolr   r   r   r!   r#   © r   r   ú<module>r)      s—   ðñõ +÷ó ð#Ø#ð#à!ð#ð 
ó#ðL>Ð);ð >Àó >ðBÐ&8ð B¸Tó Bð
Ð4FÈÑ4Mð 
ÐRVó 
ð&
Ð1CÀdÑ1Jð 
Ètô 
r   