Ë
    ïñþi<  ã                   ó€   — d Z ddlZddlmZmZ ddlmZmZmZm	Z	m
Z
mZmZ ddlmZmZ  G d„ deej                   «      Zy)z2Base classes and interfaces for FastMCP resources.é    N)Ú	AnnotatedÚAny)ÚAnyUrlÚ	BaseModelÚ
ConfigDictÚFieldÚUrlConstraintsÚValidationInfoÚfield_validator)ÚAnnotationsÚIconc                   óÐ  — e Zd ZU dZ ed¬«      Z edd¬«      Zee	 e
d¬«      f   ed	<    ed
d¬«      Zedz  ed<    edd¬«      Zedz  ed<    edd¬«      Zedz  ed<    eddd¬«      Zeed<    edd¬«      Zee   dz  ed<    edd¬«      Zedz  ed<    edd¬«      Zeeef   dz  ed<    edd¬«      ededz  ded efd!„«       «       Zej<                  d eez  fd"„«       Z y)#ÚResourcezBase class for all resources.T)Úvalidate_default.zURI of the resource)ÚdefaultÚdescriptionF)Úhost_requiredÚurizName of the resourceN)r   r   Únamez$Human-readable title of the resourceÚtitlezDescription of the resourcer   z
text/plainz!MIME type of the resource contentzG^[a-zA-Z0-9]+/[a-zA-Z0-9\-+.]+(;\s*[a-zA-Z0-9\-_.]+=[a-zA-Z0-9\-_.]+)*$)r   r   ÚpatternÚ	mime_typez(Optional list of icons for this resourceÚiconsz%Optional annotations for the resourceÚannotationsz#Optional metadata for this resourceÚmetaÚbefore)ÚmodeÚinfoÚreturnc                 óp   — |r|S |j                   j                  d«      x}rt        |«      S t        d«      ‚)z*Set default name from URI if not provided.r   z#Either name or uri must be provided)ÚdataÚgetÚstrÚ
ValueError)Úclsr   r   r   s       úa/root/aria/mcps/aria-brain/venv/lib/python3.12/site-packages/mcp/server/fastmcp/resources/base.pyÚset_default_namezResource.set_default_name%   s9   € ñ ØˆKØ—)‘)—-‘- Ó&Ð&ˆ3Ð&Ü�s“8ˆOÜÐ>Ó?Ð?ó    c              ƒ   ó   K  — y­w)zRead the resource content.N© )Úselfs    r&   ÚreadzResource.read/   s   è ø€ ð 	ùs   ‚)!Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úmodel_configr   r   r   r   r	   Ú__annotations__r   r#   r   r   r   r   Úlistr   r   r   r   Údictr   r   Úclassmethodr
   r'   ÚabcÚabstractmethodÚbytesr,   r*   r(   r&   r   r      sF  … Ù'á¨tÔ4€LáBGÐPSÐavÔBw€Cˆ�6™>¸Ô>Ð>Ñ	?ÓwÙÐ)?ÈÔN€Dˆ#�‰*ÓNÙÐ*PÐZ^Ô_€Eˆ3�‰:Ó_Ù#Ð0MÐW[Ô\€K��t‘Ó\ÙØØ7ØZô€Iˆsó ñ
  %¨TÐ?iÔj€Eˆ4�‰:˜ÑÓjÙ&+°DÐFmÔ&n€K�˜tÑ#ÓnÙ"'°ÐBgÔ"h€Dˆ$ˆs�Cˆx‰.˜4Ñ
Óhá�V (Ô+Øð@ C¨$¡Jð @°nð @Èò @ó ó ,ð@ð 	×Ñð˜C %™Kò ó ñr(   r   )r0   r6   Útypingr   r   Úpydanticr   r   r   r   r	   r
   r   Ú	mcp.typesr   r   ÚABCr   r*   r(   r&   ú<module>r=      s4   ðÙ 8ã 
ß !÷÷ ñ ÷ (ôˆy˜#Ÿ'™'õ r(   