+
    jHàjê  ã                   ó|   € R t ^ RIt^ RIt^ RIHtHt  ! R R4      t]! R04      tR t	RR/R	 lt
R
 tR tR tR tR# )zLPrepared native controls retain their identity across ambiguous RPC replies.N)ÚCOMPRESS_RPC_TIMEOUTÚGatewayClientErrorc                   óH   a € ] tR t^t o R tRR/R ltR tRR/R ltRtV t	R# )	ÚPreparedMutationsc                ó   € / V n         R # ©N©Úpending)Úselfs   &ÚA/home/ubuntu/.hermes/hermes-agent/hermes_cli/gateway_mutations.pyÚ__init__ÚPreparedMutations.__init__   s	   € ØˆŽó    ÚconfirmNc             ƒ  ó€  "  € \        W#V4      pV P                  W&R7       W`P                  9  d¾   VP                  RVR7      G Rj  x€L
 p\	        V4      '       d	   V! V4      M\
        P                  ! V^,          4      pVf	   RRRVRV/# V\        9   d   / M
R	VR
,          /p	R\        RRVRVRVR\        P                  ! 4       P                  RVR,          /V	B /V P                  V&   V P                  V,          p
RV
9  Ed;    VR8X  d	   R\        /M/ pVP                  ! R/ VBV
R,          B G Rj  x€L
 V
R&   T
R,          pTP!                  R4      R8w  d    T
R,          # T
R Te   RT
R,          R,          9   d3   T P                  P                  T4       \        \#        YÕRJR7      4      h T! T4      G Rj  x€L
 pT'       g$   T P                  P                  T4       RRRTRT/# / T
R,          CR\        P                  ! 4       P                  R/ T
R,          R,          CRTR,          /C/CT
R&   EKB  V
R,          #  EL EL  \         d2   p\        T4      R9   d   T P                  P                  T4       h Rp?ii ; i LÌ  \$         d    T P                  P                  T4       h i ; i5i)a   The owner's answer for this prepared mutation (retained across ambiguous replies).

A guarded model target answers ``status: confirmation_required`` and writes nothing.
``confirm`` (``async (refusal) -> bool``) is the surface's prompt: yes re-sends the same
retained mutation once with ``payload.confirm`` = the owner's token (under the original
key, so an ambiguous reply to the confirmed send retries that exact request); no answers
``status: cancelled``. Without a prompt (non-interactive) the refusal is an error, and a
confirmed send refused again (another switch or a turn landed first) is never re-asked.

``payload`` may be a function of the snapshot the CAS tuple is read from (a rewind names
its target row from that same transcript); returning None means "nothing to do" and is
answered ``status: nothing``. A derived payload is keyed by operation alone, so a lost-reply
retry re-presents the original target instead of re-deriving one from an already-rewound
transcript. Metadata edits (``rename``) carry no generation fence, as on Ink/Desktop.)Úkeepzsession.resume)Ú
session_idNÚstatusÚnothingr   Ú	operationÚexpected_generationÚexecution_generationÚparamsÚpayloadÚ
request_idÚexpected_revisionÚrevisionÚresultÚcompressÚ_timeoutÚconfirmation_requiredr   )Ú	confirmedÚ	cancelled© )zsession.mutate>	   Úsession_busyÚinvalid_paramsÚstale_generationÚpermission_deniedÚrevision_conflictÚunknown_executionÚnothing_to_compressÚmodel_resolution_failedÚunsupported_compress_options)Ú_keyÚretirer	   ÚrpcÚcallableÚjsonÚloadsÚ	_METADATAÚdictÚuuidÚuuid4Úhexr   r   ÚstrÚpopÚgetÚmodel_refusal_textÚBaseException)r
   Úclientr   r   r   r   ÚkeyÚsnapshotÚbodyÚfenceÚentryÚbudgetÚexcÚrefusalÚaccepteds   &&&&&$         r   ÚapplyÚPreparedMutations.apply   sÌ  é € ô �:¨'Ó2ˆØ�‰�JˆÔ)Ø—l‘lÔ"Ø#ŸZ™ZÐ(8ÀZ˜ZÓP×PˆHÜ(0°×(9Ò(9‘7˜8Ô$¼t¿zºzÈ#ÈaÍ&Ó?QˆDØŠ|Ø  )¨\¸:À{ÐT]Ð^Ð^Ø#¤yÔ0‘BÐ7LÈhÐWmÕNnÐ6oˆEØ!)¬4ñ ,^¸:ð ,^ÐQZð ,^Ðdhð ,^ÜŸ:š:›<×+Ñ+ð,^Ø?GÈ
Õ?Sð,^ØW\ñ,^ð !_ˆD�L‰L˜Ñà—‘˜SÕ!ˆØ˜eÕ#ðð @IÈJÔ?V˜*Ô&:Ñ;Ð\^�Ø(.¯
ª
Ñ(aÀvÐ(aÐQVÐW_ÕQ`Ñ(a×"a��h‘ð ˜H•oˆGØ�{‰{˜8Ó$Ð(?Ô?Øð  �X�Ðð �h�ØŠ )¨u°X­¸yÕ/IÔ"IØ—‘× Ñ  Ô%Ü(Ô);¸GÐ^bÐObÔ)cÓdÐdðÙ!(¨Ó!1×1�÷ Ø—‘× Ñ  Ô%Ø  +¨|¸ZÈÐV_Ð`Ð`ði  x¥ð i°,ÄÇ
Â
Ã×@PÑ@PØ(Ð*g¨U°8­_¸YÕ-GÐ*gÈÐT[Ð\eÕTfÑ*gñiˆE�(ŒOà�X�ÐòS Qò #bøÜ%ô ô �s“8ð  @ô @ð —L‘L×$Ñ$ SÔ)Øûðúñ$ 2øÜ ô Ø—‘× Ñ  Ô%Øðüs{   ‚AJ>ÁIÁCJ>Ä
/I Ä9IÄ:I ÅA7J>Æ9J ÇJÇJ Ç	J>ÇA<J>ÉI ÉJÉ,J	Ê	JÊJ>ÊJ Ê(J;Ê;J>c                óR   € V P                   P                  \        WV4      R 4       R # r   )r	   r9   r-   )r
   r   r   r   s   &&&&r   ÚacknowledgeÚPreparedMutations.acknowledgeH   s   € Ø�‰×Ñœ˜j°WÓ=¸tÖDr   r   c               óž   € V P                    Uu. uF  q3^ ,          V8X  g   K  W28w  g   K  VNK  	  up F  pV P                   V K  	  R# u upi )zöOnly a session's very next control may be the retry of an ambiguous one: any other verb
on the session (a different control, a prompt) retires its retained identities, so a later
deliberate repeat is new work instead of replaying a stale receipt.Nr   )r
   r   r   r>   s   &&$ r   r.   ÚPreparedMutations.retireK   sB   € ð $(§<¢<ÓX¡<˜C°qµ6¸ZÑ3G”CÈCÉK—C�C¡<ÔXˆCØ—‘˜SÒ!ó YùÒXs   �A
£A
«A
r   )
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   rG   rJ   r.   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s.   ø‡ € òð;ÈTô ;òzEð"¨÷ "ò "r   r   Úrenamec                 ó^   € Y\        V4      '       d   R 3# \        P                  ! VRR7      3# )NT)Ú	sort_keys)r0   r1   Údumps)r   r   r   s   &&&r   r-   r-   V   s+   € Ø¬8°G×+<Ò+< 4ÐfÐfÄ$Ç*Â*ÈWÐ`dÔBeÐfÐfr   r!   Fc               ó6   € V'       d   RMRpV R,           RV 2# )zJWhy a guarded model target was not applied (the owner's guard text first).zEthe session changed before the confirmation landed; run /model again.zUthis target needs a confirmation; run /model in an interactive session to confirm it.Úconfirm_messagez

Model not switched: r#   )rE   r!   Úreasons   &$ r   r;   r;   Z   s)   € çYbÑUØeð àÐ'Õ(Ð)Ð)AÀ&ÀÐJÐJr   c                ó|   € V P                  R4      ;'       g    . p\        V4      ^8X  d   V^ ,          R,          # R# )zXThe one prompt title for the owner's guard warnings (as ``combined_selection_warning``).ÚwarningsÚtitlezModel Selection Warning)r:   Úlen)rE   r]   s   & r   Úconfirmation_titler`   a   s8   € à�{‰{˜:Ó&×,Ð,¨"€HÜ#& x£=°AÔ#5ˆ8�A�;�wÕÐTÐ;TÐTr   c                ó€  € ^ RI Hp T ;'       g    RP                  4       P                  4       pVP	                  4       '       dE   ^ \        V4      u;8  d   \        V4      8:  d$   M M V\        V4      ^,
          ,          ^ ,          # V Uu0 uF  qD^ ,          kK  	  ppVP                  W34      pWe9   d   V# R# u upi )z‡``once`` / ``cancel`` (or None) for a typed answer: the choice's number or the classic
CLI's confirm aliases (y/yes/once, n/no/cancel).)Ú_CONFIRM_ALIASESÚ N)Úhermes_cli.cli_modal_mixinrb   ÚstripÚlowerÚisdigitÚintr_   r:   )ÚrawÚchoicesrb   ÚanswerÚchoiceÚallowedÚ
normalizeds   &&     r   Úconfirm_choicero   g   sš   € õ <Ø�iˆi�R×ÑÓ ×&Ñ&Ó(€FØ‡~�~×Ò˜A¤ F£Ö;¬s°7«|×;Ø”s˜6“{ Q•Õ'¨Õ*Ð*Ù'.Ó/¡w˜V�a�yˆy¡w€GÐ/Ø!×%Ñ% fÓ5€JØ#Ô.ˆ:Ð8°DÐ8ùò 0s   ÂB;c                ó2  € ^ RI HpHp V! V 4      pVP                  '       d   \	        V4      h/ pVP
                  '       d   VP
                  VR&   VP                  '       d   RVR&   VP                  '       d   VP                  RVP                  R7       V# )a]  Structured ``session.mutate(compress)`` payload from the raw ``/compress`` arguments.

The shared parser is the one every native surface uses, so ``--preview`` stays a read-only
flag and ``here [N]`` a boundary instead of becoming a focus topic; ``--aggressive`` has no
canonical implementation and is refused before anything reaches the authority.
)ÚAGGRESSIVE_UNSUPPORTEDÚparse_compress_argsÚfocusTÚpreview)ÚpartialÚ	keep_last)
Ú%agent.conversation_compression_manualrq   rr   Ú
aggressiver   Úfocus_topicrt   ru   Úupdaterv   )Úargrq   rr   Úrequestr   s   &    r   Úcompress_payloadr}   s   s‚   € ÷ bÙ! #Ó&€GØ××ÐÜ Ð!7Ó8Ð8Ø€GØ××ÐØ"×.Ñ.ˆ�ÑØ‡‡€Ø!ˆ�	ÑØ‡‡€Ø�‰˜t¨w×/@Ñ/@ˆÔAØ€Nr   c                 óÈ  € V P                  R 4      pVR8X  d–   ^ RIHp V! V4      pVP                  '       g7   VP                  '       g%   VP
                  '       g   VP                  '       g   \        R4      hTRVP                  /VP                  '       d   RVP                  /C3# / C3# VR8X  d   V\        V4      3# VR8w  d   \        R4      hY!'       d   RV/3# / 3# )	Ú/Úmodel)Úparse_model_flags_detailedÚunsupported_model_optionsÚproviderr   ÚbranchÚunsupported_commandr^   )
ÚlstripÚhermes_cli.model_switchr�   Ú	is_globalÚis_onceÚforce_refreshÚmodel_inputr   Úexplicit_providerr}   )Úcommandr{   Únamer�   Úparseds   &&   r   Úslash_mutationr�   ˆ   só   € Ø�>‰>˜#Ó€DØˆw„ÝFÙ+¨CÓ0ˆØ××Ð˜vŸ~Ÿ~˜~°×1E×1EÐ1EÈV×M_×M_ÐM_Ü$Ð%@ÓAÐAØ�g˜v×1Ñ1ð YØ6<×6N×6NÐ6NˆZ˜×1Ñ1Ð2ðYð Yð 	YØTVðYð Yð 	YàˆzÔØÔ% cÓ*Ð*Ð*ØˆxÔÜ Ð!6Ó7Ð7Ø¦3�'˜3�Ð.Ð.¨BÐ.Ð.r   )Ú__doc__r1   r5   Úhermes_cli.gateway_clientr   r   r   Ú	frozensetr3   r-   r;   r`   ro   r}   r�   r#   r   r   Ú<module>r”      sU   ðÙ RÛ Û ß N÷I"ñ I"ñX �x�jÓ!€	ògðK¨Uô KòUò	9òô*/r   