ó
    ±"³j”'  ã            	      ó,  • % S SK Jr  S SKJr  S SKJrJr  S SKJrJ	r	  S SK
JrJrJrJrJrJrJr  S SKJrJrJr  S SKJrJr  S SKJr  S S	KJrJr  S S
KJr  SSK J!r!J"r"J#r#  \" S5      r$\" S5      r%\" S5      r&\" S5      r'\" SSS9r(\" SSS9r)\S   r*S\+S'    \	" SS9 " S S5      5       r,\	" SS9 " S S5      5       r-\	" SS9 " S S5      5       r.\	" SS9 " S  S!5      5       r/\	" SS9 " S" S#5      5       r0\	" SS9 " S$ S%5      5       r1\	" SSS&9 " S' S(5      5       r2\	" SS9 " S) S*5      5       r3\	" SS9 " S+ S,5      5       r4\	" SS9 " S- S.5      5       r5\	" SS9 " S/ S05      5       r6\	" SS9 " S1 S25      5       r7\	" SS9 " S3 S45      5       r8\	" SS9 " S5 S65      5       r9\	" SS9 " S7 S85      5       r:\	" SS9 " S9 S:5      5       r;\,\0-  \.-  \4-  \2-  \5-  \7-  \8-  \9-  r<S\+S;'     " S< S=\\$\%4   \5      r= " S> S?\\(   \5      r> " S@ SA\\&   \5      r?\SB   r@S\+SC'     " SD SE\\)   \5      rA          SPSF jrB\	" SSS&9 " SG SH\\$\%\&4   5      5       rC " SI SJ\=\$\$4   \\$   5      rD " SK SL\>\$   \\$   5      rE " SM SN\?\&   \\&   5      rFgO)Qé    )Úannotations)Úabstractmethod)Ú	AwaitableÚCallable)ÚKW_ONLYÚ	dataclass)ÚAnyÚGenericÚLiteralÚProtocolÚ	TypeAliasÚTypeVarÚcast)ÚAgentStreamEventÚModelMessageÚModelResponse)ÚModelRequestContextÚModelRequestParameters)ÚModelSettings)Ú
RunContextÚToolDefinition)ÚToolsetToolé   )ÚIDENTITY_CODECÚ
JSON_CODECÚDurabilityCodecÚParamsTÚWireTÚResultTÚConfigTÚParamsT_contraT)ÚcontravariantÚ
ConfigT_co)Ú	covariant)ÚfunctionÚmcpÚdynamicr   ÚToolsetKind)Úfrozenc                  óJ   • \ rS rSr% SrSrS\S'   S\S'   SrS	\S
'   S\S'   Srg)ÚModelRequestIdé   zµIdentifies a model request operation in an engine's configuration resolver.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
Nú
str | NoneÚmodel_idr   Ú_FÚboolÚ	streamingÚstrÚ
model_name© )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r.   Ú__annotations__r1   Ú__static_attributes__r4   ó    Ú`/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pydantic_ai/durable_exec/_operation.pyr+   r+      s'   ‡ ñð
  €HˆjÓØƒJØ€IˆtÓØ†Or<   r+   c                  óV   • \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   S\S'   Srg)ÚModelRequestParamsé,   Nr-   r.   r   r/   zlist[ModelMessage]ÚmessageszModelSettings | NoneÚmodel_settingsr   Úmodel_request_parametersúRunContext[Any]Úrun_contextr4   ©r5   r6   r7   r8   r.   r:   r;   r4   r<   r=   r?   r?   ,   s)   ‡ à€HˆjÓØƒJØ Ó Ø(Ó(Ø4Ó4Ø Ö r<   r?   c                  ó<   • \ rS rSr% SrSrS\S'   S\S'   S\S	'   S
rg)ÚModelCancelSuspendedResponseIdé6   z¹Identifies cancellation of a suspended model response for engine configuration.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
Nr-   r.   r   r/   r2   r3   r4   ©r5   r6   r7   r8   r9   r.   r:   r;   r4   r<   r=   rH   rH   6   ó   ‡ ñð
  €HˆjÓØƒJØ†Or<   rH   c                  óB   • \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   Srg)Ú"ModelCancelSuspendedResponseParamséB   Nr-   r.   r   r/   r   ÚresponsezRunContext[Any] | NonerE   r4   rF   r4   r<   r=   rM   rM   B   s   ‡ à€HˆjÓØƒJØÓØ'Ö'r<   rM   c                  ó<   • \ rS rSr% SrSrS\S'   S\S'   S\S	'   S
rg)ÚModelCompactMessagesIdéJ   zµIdentifies a durable message-compaction operation for engine configuration.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
Nr-   r.   r   r/   r2   r3   r4   rJ   r4   r<   r=   rQ   rQ   J   rK   r<   rQ   c                  óL   • \ rS rSr% SrS\S'   S\S'   S\S'   S\S	'   S
\S'   Srg)ÚModelCompactMessagesParamséV   Nr-   r.   r   r/   r   Úrequest_contextÚinstructionsrD   rE   r4   rF   r4   r<   r=   rT   rT   V   s#   ‡ à€HˆjÓØƒJØ(Ó(ØÓØ Ö r<   rT   )r)   Úkw_onlyc                  ó   • \ rS rSrSrSrg)ÚEventStreamHandlerIdé_   z¸Identifies a durable event-stream handler invocation for engine configuration.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
r4   N)r5   r6   r7   r8   r9   r;   r4   r<   r=   rZ   rZ   _   s   † ñò
 	r<   rZ   c                  ó4   • \ rS rSr% S\S'   S\S'   S\S'   Srg	)
ÚEventStreamHandlerParamséi   r   Úeventr   r/   rD   rE   r4   N©r5   r6   r7   r8   r:   r;   r4   r<   r=   r]   r]   i   s   ‡ àÓØƒJØ Ö r<   r]   c                  ó8   • \ rS rSr% SrS\S'   S\S'   S\S'   Srg	)
ÚCapabilityOperationIdép   a  Identifies an operation contributed by a capability.

Engine configuration receives these operations through the same backend as built-in model and
tool operations. See the
[durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
r2   Úcapability_idr   r/   Ú	operationr4   N©r5   r6   r7   r8   r9   r:   r;   r4   r<   r=   rb   rb   p   s   ‡ ñð ÓØƒJØ†Nr<   rb   c                  ó8   • \ rS rSr% SrS\S'   S\S'   S\S'   S	rg
)ÚToolsetGetToolsIdé~   z¥Identifies durable tool discovery for a particular toolset.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
r(   Útoolset_kindr   r/   r2   Ú
toolset_idr4   Nrf   r4   r<   r=   rh   rh   ~   ó   ‡ ñð
 ÓØƒJØ†Or<   rh   c                  ó*   • \ rS rSr% S\S'   S\S'   Srg)ÚToolsetGetToolsParamséŠ   rD   Úctxr   r/   r4   Nr`   r4   r<   r=   rn   rn   Š   s   ‡ à	ÓØ†Jr<   rn   c                  ó.   • \ rS rSr% SrS\S'   S\S'   Srg)	ÚToolsetGetInstructionsIdé�   z¦Identifies durable instruction discovery for an MCP toolset.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
r2   rk   r   r/   r4   Nrf   r4   r<   r=   rr   rr   �   s   ‡ ñð
 ƒOØ†Jr<   rr   c                  ó8   • \ rS rSr% SrS\S'   S\S'   S\S'   S	rg
)ÚToolsetValidateToolArgumentsIdé›   zªIdentifies durable argument validation for a particular toolset.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
r(   rj   r   r/   r2   rk   r4   Nrf   r4   r<   r=   ru   ru   ›   rl   r<   ru   c                  ó8   • \ rS rSr% SrS\S'   S\S'   S\S'   S	rg
)ÚToolsetCallToolIdé§   z¥Identifies durable tool execution for a particular toolset.

See the [durable backend guide](https://pydantic.dev/docs/ai/capabilities/durable_execution/backends/).
r(   rj   r   r/   r2   rk   r4   Nrf   r4   r<   r=   rx   rx   §   rl   r<   rx   c                  óH   • \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S
\S'   Srg)ÚToolsetCallToolParamsé³   r2   Únamer   r/   údict[str, Any]Ú	tool_argsrD   rp   zToolsetTool[Any] | NoneÚtoolr4   Nr`   r4   r<   r=   r{   r{   ³   s   ‡ à
ƒIØƒJØÓØ	ÓØ
!Ö!r<   r{   c                  óL   • \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S
rS\S'   Srg
)ÚDynamicToolsetCallToolParamsé¼   r2   r}   r   r/   r~   r   rD   rp   NzToolDefinition | NoneÚtool_defr4   )r5   r6   r7   r8   r:   r„   r;   r4   r<   r=   r‚   r‚   ¼   s#   ‡ à
ƒIØƒJØÓØ	ÓØ&*€HÐ#Ö*r<   r‚   ÚDurableOperationIdc                  ó@   • \ rS rSrSr\SS j5       r\SS j5       rSrg)	ÚParameterTransporté×   a  Serialize operation parameters for an engine boundary and rebuild them worker-side.

The `runtime` passed to `load` is engine-side context needed while rebuilding parameters. For
example, Temporal passes its durability capability so serialized run contexts can be restored.
c                ó   • g ©Nr4   ©ÚselfÚparamss     r=   ÚdumpÚParameterTransport.dumpÞ   ó   € Ø.1r<   c               ó   • g rŠ   r4   ©rŒ   ÚpayloadÚruntimes      r=   ÚloadÚParameterTransport.loadá   s   € ØCFr<   r4   N)r�   r   Úreturnr   )r“   r   r”   Úobjectr—   r   ©	r5   r6   r7   r8   r9   r   rŽ   r•   r;   r4   r<   r=   r‡   r‡   ×   s%   † ñð Û1ó Ø1àÛFó ÛFr<   r‡   c                  ó,   • \ rS rSrSr\SS j5       rSrg)ÚCacheIdentityéå   zKProject semantic parameters into opaque hash inputs for hash-keyed engines.c                ó   • g rŠ   r4   r‹   s     r=   ÚprojectÚCacheIdentity.projectè   s   € ØEHr<   r4   N)r�   r!   r—   ztuple[object, ...])r5   r6   r7   r8   r9   r   rž   r;   r4   r<   r=   r›   r›   å   s   † ÙUàÛHó ÛHr<   r›   c                  ó@   • \ rS rSrSr\SS j5       r\SS j5       rSrg)	ÚResultCodecéì   z@Encode and decode an operation result across an engine boundary.c                ó   • g rŠ   r4   ©rŒ   Úvalues     r=   rŽ   ÚResultCodec.dumpï   r�   r<   c                ó   • g rŠ   r4   ©rŒ   r“   s     r=   r•   ÚResultCodec.loadò   s   € Ø03r<   r4   N©r¥   r   r—   r˜   ©r“   r˜   r—   r   r™   r4   r<   r=   r¡   r¡   ì   s!   † ÙJàÛ1ó Ø1àÛ3ó Û3r<   r¡   )Úmodelr_   r€   Ú
capabilityÚOperationConfigRolec                  óP   • \ rS rSr\SS j5       r\          SS j5       rSrg)ÚDurableOperationConfigéú   c               ó   • g rŠ   r4   )rŒ   ÚroleÚoperation_ids      r=   ÚbaseÚDurableOperationConfig.baseû   s   € Øber<   c               ó   • g rŠ   r4   )rŒ   r³   r´   r€   Ú	tool_names        r=   Úfor_toolÚDurableOperationConfig.for_toolþ   s   € ð '*r<   r4   N)r³   r®   r´   r…   r—   r#   )
r³   r®   r´   r…   r€   úobject | Noner¸   r2   r—   zConfigT_co | Literal[False])r5   r6   r7   r8   r   rµ   r¹   r;   r4   r<   r=   r°   r°   ú   sR   † ØÛeó Øeàð*à!ð*ð )ð	*ð
 ð*ð ð*ð 
%ó*ó ó*r<   r°   c               óN   • U R                  UR                  UR                  UUS9$ )zFResolve tool configuration shared by callable and registered backends.)r´   r€   r¸   )r¹   Úconfig_roler´   )Úconfigre   r€   r¸   s       r=   Úresolve_tool_operation_configr¿   	  s2   € ð �?‰?Ø×ÑØ×+Ñ+ØØð	 ð ð r<   c                  ód   • \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   S\S'   SrS\S'   Srg)ÚDurableOperationi  a  A complete semantic declaration that an engine backend can bind.

Attributes:
    operation_id: Stable typed identity used for naming and configuration.
    handler: Semantic async operation body.
    parameter_transport: Codec between semantic parameters and engine wire parameters.
    cache_identity: Projection consulted by hash-keyed engines.
    result_codec: Codec for the handler result.
    config_role: Coarse configuration category for the operation.
    invocation_label: Optional per-call display or naming label.
r…   r´   z'Callable[[ParamsT], Awaitable[ResultT]]Úhandlerz"ParameterTransport[ParamsT, WireT]Úparameter_transportzCacheIdentity[ParamsT]Úcache_identityzResultCodec[ResultT]Úresult_codecr®   r½   NzCallable[[ParamsT], str] | NoneÚinvocation_labelr4   )r5   r6   r7   r8   r9   r:   rÆ   r;   r4   r<   r=   rÁ   rÁ     s9   ‡ ñ
ð %Ó$Ø4Ó4Ø;Ó;Ø*Ó*Ø&Ó&Ø$Ó$Ø8<ÐÐ5Ö<r<   rÁ   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	ÚIdentityParameterTransporti0  zVPass parameters through unchanged for engines that transport Python values themselves.c                ó   • U$ rŠ   r4   r‹   s     r=   rŽ   ÚIdentityParameterTransport.dump3  s   € Øˆr<   c               ó   • U$ rŠ   r4   r’   s      r=   r•   ÚIdentityParameterTransport.load6  s   € Øˆr<   r4   N)r�   r   r—   r   )r“   r   r”   r˜   r—   r   )r5   r6   r7   r8   r9   rŽ   r•   r;   r4   r<   r=   rÈ   rÈ   0  s   † Ù`ô÷r<   rÈ   c                  ó"   • \ rS rSrSrSS jrSrg)ÚNoCacheIdentityi:  z2Provide no semantic cache inputs for an operation.c                ó   • g)Nr4   r4   r‹   s     r=   rž   ÚNoCacheIdentity.project=  s   € Ør<   r4   N)r�   r   r—   z	tuple[()])r5   r6   r7   r8   r9   rž   r;   r4   r<   r=   rÎ   rÎ   :  s
   † Ù<÷r<   rÎ   c                  ó>   • \ rS rSrSrSS.S
S jjrSS jrSS jrSrg	)ÚTypedResultCodeciA  zAEncode and validate results using a declared runtime result type.Újson)Úmodec               óJ   • Xl         US:X  a  [        U l        g [        U l        g )NrÓ   )Ú_result_typer   r   Ú_codec)rŒ   Úresult_typerÔ   s      r=   Ú__init__ÚTypedResultCodec.__init__D  s   € Ø'ÔØ59¸V³^¤zˆ�Ìˆ�r<   c                óN   • U R                   R                  U R                  U5      $ rŠ   )r×   rŽ   rÖ   r¤   s     r=   rŽ   ÚTypedResultCodec.dumpH  s   € Ø�{‰{×Ñ × 1Ñ 1°5Ó9Ð9r<   c                ój   • [        [        U R                  R                  U R                  U5      5      $ rŠ   )r   r   r×   r•   rÖ   r¨   s     r=   r•   ÚTypedResultCodec.loadK  s&   € Ü”G˜TŸ[™[×-Ñ-¨d×.?Ñ.?ÀÓIÓJÐJr<   )r×   rÖ   N)rØ   r˜   rÔ   zLiteral['json', 'identity']r—   ÚNonerª   r«   )	r5   r6   r7   r8   r9   rÙ   rŽ   r•   r;   r4   r<   r=   rÒ   rÒ   A  s   † ÙKàSY÷ Xô:÷Kr<   rÒ   N)
r¾   zDurableOperationConfig[ConfigT]re   z)DurableOperation[ParamsT, WireT, ResultT]r€   r»   r¸   r2   r—   zConfigT | Literal[False])GÚ
__future__r   Úabcr   Úcollections.abcr   r   Údataclassesr   r   Útypingr	   r
   r   r   r   r   r   Úpydantic_ai.messagesr   r   r   Úpydantic_ai.modelsr   r   Úpydantic_ai.settingsr   Úpydantic_ai.toolsr   r   Úpydantic_ai.toolsets.abstractr   r×   r   r   r   r   r   r   r    r!   r#   r(   r:   r+   r?   rH   rM   rQ   rT   rZ   r]   rb   rh   rn   rr   ru   rx   r{   r‚   r…   r‡   r›   r¡   r®   r°   r¿   rÁ   rÈ   rÎ   rÒ   r4   r<   r=   Ú<module>rê      sç  ðÞ "å ß /ß *ß L× LÑ Lç NÑ Nß JÝ .ß 8Ý 5ç ?Ñ ?á
�)Ó
€Ù�Ó€Ù
�)Ó
€Ù
�)Ó
€ÙÐ)¸Ñ>€Ù�\¨TÑ2€
à Ð!=Ñ>€ˆYÓ >ðñ �$Ñ÷	ð 	ó ð	ñ �$Ñ÷!ð !ó ð!ñ �$Ñ÷ð ó ðñ �$Ñ÷(ð (ó ð(ñ �$Ñ÷ð ó ðñ �$Ñ÷!ð !ó ð!ñ �$ Ñ%÷	ð 	ó &ð	ñ �$Ñ÷!ð !ó ð!ñ �$Ñ÷
ð 
ó ð
ñ �$Ñ÷ð ó ðñ �$Ñ÷ð ó ðñ
 �$Ñ÷ð ó ðñ �$Ñ÷ð ó ðñ �$Ñ÷ð ó ðñ �$Ñ÷"ð "ó ð"ñ �$Ñ÷+ð +ó ð+ð Øñà$ñ%ð ñð ñ	ð
 ñð ñð %ñ%ð ñð �Ió 
ðôG˜ ¨% Ñ0°(ô GôI�G˜NÑ+¨Xô Iô4�'˜'Ñ" Hô 4ð ")Ð)OÑ!PÐ �YÓ PØ aô*˜W ZÑ0°(ô *ðØ+ðà8ðð ð	ð
 ðð ôñ  �$ Ñ%ô=�w˜w¨¨wÐ6Ñ7ó =ó &ð=ô,Ð!3°G¸WÐ4DÑ!EÀwÈwÑGWô ô�m GÑ,¨g°gÑ.>ô ôK�{ 7Ñ+¨W°WÑ-=õ Kr<   