+
    ÆÚjì   ã                  óB  a € 0 t $ R t^ RIHt ^ RIHtHtHt ^ RIH	t	 ^ RI
HtHtHtHtHtHtHt ^ RIHtHtHtHt ^ RIHt ^ RIHtHtHt ^ RIHt ^ R	IH t  ]'       d   ^ R
I!H"t" . R'Ot#]$! R04      t%R]&R&    ]$! RR04      t'R]&R&    R R lt(]! R]R7      t)]! R]R7      t*]	! RRR7       ! R R4      4       t+]	! RRR7       ! R R]]),          4      4       t, ! R R]-4      t.]	! RRR7       ! R  R]]*,          4      4       t/ ! R! R4      t0 ! R" R#]04      t1R(R% R& llt2R$# ))zãOpt-in extension interface for MCP clients.

Subclass `ClientExtension`, set `identifier`, override the hooks you need, and
pass instances to `Client(extensions=[...])`. For an identifier-only
capability ad, use `advertise()`.
)Úannotations)Ú	AwaitableÚCallableÚSequence)Ú	dataclass)ÚTYPE_CHECKINGÚAnyÚFinalÚGenericÚLiteralÚTypeVarÚget_args)ÚCORE_RESULT_TYPESÚCallToolResultÚInputRequiredResultÚResult)ÚMODERN_PROTOCOL_VERSIONS)ÚAliasChoicesÚ	AliasPathÚ	BaseModel)Ú	FieldInfo)Úvalidate_extension_identifier)ÚClientSessionÚClaimContextÚClientExtensionÚNotificationBindingÚResultClaimÚUnexpectedClaimedResultú
tools/callzFinal[frozenset[str]]Ú_CLAIM_METHODSÚrequestStateÚinputRequestsÚ_RESERVED_WIRE_ALIASESc               ó$   € V ^8„  d   QhRRRRRR/# )é   ÚnameÚstrÚfieldr   Úreturnzfrozenset[str]© )Úformats   "Ú‹/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/mcp/client/extension.pyÚ__annotate__r,   (   s!   € ÷ ñ �Sð  ð ¨~ñ ó    c                ó¸  € VP                   ;'       g    T 0pVP                  '       d   VP                  VP                  4       VP                  p\	        V\
        4      '       d   VP                  MV.pV FU  p\	        V\        4      '       d   VP                  ^ ,          p\	        V\        4      '       g   KD  VP                  V4       KW  	  \        V4      # )z>Every top-level wire key this field can read from or write to.)ÚaliasÚserialization_aliasÚaddÚvalidation_aliasÚ
isinstancer   Úchoicesr   Úpathr&   Ú	frozenset)r%   r'   Úkeysr2   r4   Úchoices   &&    r+   Ú
_wire_keysr9   (   s¨   € à�K‰K×Ð˜4Ð €DØ× × Ð Ø�‰�×*Ñ*Ô+Ø×-Ñ-ÐÜ*4Ð5EÄ|×*TÒ*TÐ×&Ò&Ð[kÐZl€GÛˆÜ�fœi×(Ò(Ø—[‘[ •^ˆFÜ�fœc×"Ô"Ø�H‰H�VÖñ	 ô
 �T‹?Ðr-   ÚClaimedT)ÚboundÚNotifyParamsTT)ÚfrozenÚkw_onlyc                  ó:   € ] tR t^;t$ RtR]R&   R]R&   R]R&   RtR	# )
r   z9Host-injected context for one `ResultClaim.resolve` call.r   Úsessionr&   Ú	tool_namezfloat | NoneÚread_timeout_secondsr)   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__Ú__static_attributes__r)   r-   r+   r   r   ;   s   ‡ áCàÓØƒNØ&×&r-   c                  ób   € ] tR t^Dt$ RtR]R&   R]R&   R]R&   RtR	]R
&   RtR]R&   R R ltRt	R# )r   ar  One extra result shape on one spec verb, keyed by the wire `resultType`.

Active only while the declaring extension is constructed into the client and
the negotiated protocol version admits it. `resolve` finishes a claimed
result, may send follow-ups through `ctx.session`, and must return the
verb's ordinary result. All field constraints are enforced at construction.
r&   Úresult_typeztype[ClaimedT]Úmodelz=Callable[[ClaimedT, ClaimContext], Awaitable[CallToolResult]]Úresolver   zLiteral['tools/call']ÚmethodNzfrozenset[str] | NoneÚprotocol_versionsc               ó   € V ^8„  d   QhRR/# )r$   r(   ÚNoner)   )r*   s   "r+   r,   ÚResultClaim.__annotate__T   s   € ÷ ñ ˜tñ r-   c           
     	óì  € V P                   \        9  d*   \        R \        \        4       RV P                   : 24      hV P                  \
        9   d   \        RV P                  : R24      h\        V P                  P                  9  d#   \        V P                  P                   R24      h\        V P                  \        \        ,          4      '       d   \        R4      hV P                  P                  P                  4        FR  w  r\        \        W4      \         ,          4       F*  p\        V P                  P                   RV RV: R24      h	  KT  	  V P                  P                  P#                  R	4      pVe&   \%        VP&                  4      V P                  38w  d1   \        V P                  P                   RV P                  : R24      hV P(                  e   V P(                  '       g   \        R4      hV P(                  e_   V P(                  P+                  \,        4      '       g8   \        V P(                  P/                  \,        4      4      p\        RV R24      hR
# R
# )zclaims attach to z only; got method zresultType z is core protocol vocabularyz must subclass mcp_types.Resultz0claim models must not subclass core result typesÚ.z	 aliases zv, a typed field of the core result surface; a colliding value would fail core validation before the claim adapter runsrL   Nz.result_type must be Literal[Ú]z>empty protocol_versions could never activate; use None for allzprotocol_versions zy are not modern protocol revisions; claimed shapes cannot be delivered on a legacy wire (None means every modern version))rO   r   Ú
ValueErrorÚsortedrL   r   r   rM   Ú__mro__rD   Ú
issubclassr   r   Úmodel_fieldsÚitemsr9   r"   Úgetr   Ú
annotationrP   Úissubsetr   Ú
difference)Úselfr%   Úmodel_fieldÚclashr'   Úunrecognizeds   &     r+   Ú__post_init__ÚResultClaim.__post_init__T   s  € Ø�;‰;œnÔ,ÜÐ0´¼Ó1GÐ0HÐHZÐ[_×[fÑ[fÑZiÐjÓkÐkØ×ÑÔ0Ô0Ü˜{¨4×+;Ñ+;Ñ*>Ð>ZÐ[Ó\Ð\Ü˜Ÿ™×+Ñ+Ô+Ü §
¡
× 3Ñ 3Ð4Ð4SÐTÓUÐUÜ�d—j‘j¤.Ô3FÕ"F×GÒGÜÐOÓPÐPØ!%§¡×!8Ñ!8×!>Ñ!>Ö!@ÑˆDÜ¤
¨4Ó =Ô@VÕ VÖW�Ü Ø—z‘z×*Ñ*Ð+¨1¨T¨F°)¸E¹9ð E)ð )óð ó Xñ "Að —
‘
×'Ñ'×+Ñ+¨MÓ:ˆØŠ=œH U×%5Ñ%5Ó6¸4×;KÑ;KÐ:MÔMÜ §
¡
× 3Ñ 3Ð4Ð4QÐRV×RbÑRbÑQeÐefÐgÓhÐhØ×!Ñ!Ò-°d×6L×6LÐ6LÜÐ]Ó^Ð^Ø×!Ñ!Ò-°d×6LÑ6L×6UÑ6UÔVn×6oÒ6oÜ! $×"8Ñ"8×"CÑ"CÔD\Ó"]Ó^ˆLÜØ$ \ Nð 3Yð Yóð ñ 7pÑ-r-   r)   )
rD   rE   rF   rG   rH   rI   rO   rP   re   rJ   r)   r-   r+   r   r   D   s<   ‡ ñð ÓØÓØJÓJØ$0€FÐ!Ó0Ø/3ÐÐ,Ó3÷ñ r-   c                  ó2   a € ] tR t^qtRtR V 3R lltRtV ;t# )r   zåA claimed (extension) result arrived on a `call_tool` that did not opt in.

The parsed value is carried as `result`; the server may already hold state it
references. Opt in via `Client(extensions=[...])` or `allow_claimed=True`.
c               ó    € V ^8„  d   QhRRRR/# )r$   Úresultr   r(   rR   r)   )r*   s   "r+   r,   Ú$UnexpectedClaimedResult.__annotate__x   s   € ÷ ñ ˜vð ¨$ñ r-   c                	ó`   <€ \         SV `  R \        V4      P                   R24       Wn        R# )z"Server returned a claimed result (zÎ); pass the owning extension to Client(extensions=[...]) for transparent resolution, or call with allow_claimed=True and handle the shape. The carried result may reference server-side state needing cleanup.N)ÚsuperÚ__init__ÚtyperD   ri   )ra   ri   Ú	__class__s   &&€r+   rm   Ú UnexpectedClaimedResult.__init__x   s6   ø€ Ü‰ÑØ0´°f³×1FÑ1FÐ0Gð Hhð hô	
ð
 Žr-   )ri   )rD   rE   rF   rG   rH   rm   rJ   Ú__classcell__©ro   s   @r+   r   r   q   s   ø† ñ÷ö r-   c                  ó:   € ] tR t^�t$ RtR]R&   R]R&   R]R&   RtR	# )
r   aÉ  Deliver server notifications for `method` (the bare wire name) to `handler`.

Observation-only: validated params arrive one at a time per binding, in
dispatch order, through a bounded queue that drops the oldest with a warning
on overflow. Stream transports dispatch each notification independently, so
near-simultaneous notifications may be dispatched out of wire order. Methods
the negotiated version's core tables handle are never delivered to bindings.
r&   rO   ztype[NotifyParamsT]Úparams_typez*Callable[[NotifyParamsT], Awaitable[None]]Úhandlerr)   NrC   r)   r-   r+   r   r   �   s   ‡ ñð ƒKØ$Ó$Ø7×7r-   c                  ób   a € ] tR t^‘t$ RtR]R&   R V 3R lltR R ltR R	 ltR
 R lt	Rt
V ;t# )r   z›Base class for an opt-in client extension; override only what you need.

The surface is declarative, fixed at construction, and never receives the client.
r&   Ú
identifierc               ó    € V ^8„  d   QhRRRR/# )r$   Úkwargsr   r(   rR   r)   )r*   s   "r+   r,   ÚClientExtension.__annotate__š   s   € ÷ Jñ J¨ð J°ñ Jr-   c                	ó–   <€ \         SV `  ! R/ VB  V P                  P                  R 4      ;pe   \	        W P
                  R7       R# R# )rw   N©Úownerr)   )rl   Ú__init_subclass__Ú__dict__r]   r   rD   )Úclsry   rw   ro   s   &, €r+   r~   Ú!ClientExtension.__init_subclass__š   s?   ø€ Ü‰Ò!Ñ+ FÒ+àŸ,™,×*Ñ*¨<Ó8Ð8ˆJÒEÜ)¨*¿L¹L×Iñ Fr-   c               ó   € V ^8„  d   QhRR/# ©r$   r(   údict[str, Any]r)   )r*   s   "r+   r,   rz       s   € ÷ ñ ˜.ñ r-   c                ó   € / # )zåPer-extension settings advertised at `ClientCapabilities.extensions[identifier]`.

Read once at `Client` construction. A claim-bearing extension is
advertised only at protocol versions where at least one of its claims
is active.
r)   ©ra   s   &r+   ÚsettingsÚClientExtension.settings    s	   € ð ˆ	r-   c               ó   € V ^8„  d   QhRR/# )r$   r(   zSequence[ResultClaim[Any]]r)   )r*   s   "r+   r,   rz   ©   s   € ÷ ñ Ð2ñ r-   c                ó   € R# )z@Extra result shapes this extension claims, with their resolvers.r)   r)   r†   s   &r+   ÚclaimsÚClientExtension.claims©   ó   € àˆ	r-   c               ó   € V ^8„  d   QhRR/# )r$   r(   z"Sequence[NotificationBinding[Any]]r)   )r*   s   "r+   r,   rz   ­   s   € ÷ ñ ÐAñ r-   c                ó   € R# )z-Server notifications this extension observes.r)   r)   r†   s   &r+   ÚnotificationsÚClientExtension.notifications­   r�   r-   r)   )rD   rE   rF   rG   rH   rI   r~   r‡   r‹   r�   rJ   rq   rr   s   @r+   r   r   ‘   s/   ø‡ ñð ƒO÷Jð Jõõ÷ó r-   c                  ó2   € ] tR t^²tRtR R ltR R ltRtR# )Ú_AdvertiseOnlyz,Ad-only extension returned by `advertise()`.c               ó$   € V ^8„  d   QhRRRRRR/# )r$   rw   r&   r‡   r„   r(   rR   r)   )r*   s   "r+   r,   Ú_AdvertiseOnly.__annotate__µ   s!   € ÷ "ñ " 3ð "°.ð "ÀTñ "r-   c                	ó   € Wn         W n        R # ©N)rw   Ú	_settings)ra   rw   r‡   s   &&&r+   rm   Ú_AdvertiseOnly.__init__µ   s   € Ø$ŒØ!Žr-   c               ó   € V ^8„  d   QhRR/# rƒ   r)   )r*   s   "r+   r,   r•   ¹   s   € ÷ ñ ˜.ñ r-   c                	ó   € V P                   # r—   )r˜   r†   s   &r+   r‡   Ú_AdvertiseOnly.settings¹   s   € Ø�~‰~Ðr-   )r˜   rw   N)rD   rE   rF   rG   rH   rm   r‡   rJ   r)   r-   r+   r“   r“   ²   s   † Ù6õ"÷ñ r-   r“   Nc               ó$   € V ^8„  d   QhRRRRRR/# )r$   rw   r&   r‡   zdict[str, Any] | Noner(   r   r)   )r*   s   "r+   r,   r,   ½   s'   € ÷ Lñ L˜#ð LÐ)>ð LÈ/ñ Lr-   c                óF   € \        V RR7       \        Yf   / 4      # T4      # )zâAdvertise an extension identifier (with optional settings) and nothing else.

Advertising an extension you do not implement asserts wire support you do
not have; for behavioral extensions construct the real extension instead.
Ú	advertiser|   )r   r“   )rw   r‡   s   &&r+   rŸ   rŸ   ½   s&   € ô " *°KÕ@Ü˜*Ò,< bÓKÐKÀ(ÓKÐKr-   )r   r   r   r   r   rŸ   r—   )3Ú__conditional_annotations__rH   Ú
__future__r   Úcollections.abcr   r   r   Údataclassesr   Útypingr   r   r	   r
   r   r   r   Ú	mcp_typesr   r   r   r   Úmcp_types.versionr   Úpydanticr   r   r   Úpydantic.fieldsr   Úmcp.shared.extensionr   Úmcp.client.sessionr   Ú__all__r6   r   rI   r"   r9   r:   r<   r   r   ÚRuntimeErrorr   r   r   r“   rŸ   )r    s   @r+   Ú<module>r­      s1  øðôõ #ç 9Ñ 9Ý !ß Q× QÑ Qç TÓ TÝ 6ß 7Ñ 7Ý %å >çÝ0ò€ñ )2°<°.Ó(A€Ð%Ó AØ ^á09¸>È?Ð:[Ó0\Ð Ð-Ó \Ø _õñ �: VÔ,€Ù˜¨yÔ9€ñ �$ Ô%÷'ð 'ó &ð'ñ �$ Ô%ô)�'˜(Õ#ó )ó &ð)ôX˜lô ñ  �$ Ô%ô8˜' -Õ0ó 8ó &ð8÷ñ ôB�_ô ÷Lñ Lr-   