+
    jHàjñ  ã                   óP   € R t ^ RIHt ^ RIHt ]RRRR/R l4       tR tR R	 ltR
# )a#  The paused gateways' tree gate for the update's checkout-writing steps (Windows pause, #132338).

``_checkout_move`` binds one git step (switch, merge, reset, upstream sync, rollback, stash, churn
cleanup) to the pause record BEFORE git writes a file; ``update_cmd`` re-exports these names.
)Úcontextmanager)Úupdate_pause_recordÚpathsÚrevertFc          	   '  óB  aaa"  € / p\        V Uu0 uF  qU'       g   K  VkK  	  up4      pT ;'       g    / P                  R4      oS'       d.   V'       g   V'       g	   V'       d   \        P                  ! 4       MRpV'       d   \        P                  ! V4      MRoSf   Vx € R# 0 VmV'       d   SR,          ;'       g    . MRmpV P                  R. 4      pS RSR,           2o\        VVV3R lV 4       R4      pVf   RS/SCpVP                  V4       RV3R	V33 F0  w  ršV
'       g   K  \        0 VP                  V	. 4      mV
m4      W‰&   K2  	  \        P                  ! / V CR
R/C4        Vx € \        WSWd4       R# u upi   \        YSYd4       i ; i5i)as  Run one checkout-writing git step (switch, merge, reset, upstream sync, rollback, stash) with
the paused gateways' tree gate bound to it BEFORE git writes a file: the commit(s) it can move
to and the tracked *paths* it rewrites in place (stash push/apply, ``reset --hard``,
``checkout -- <paths>``; *revert*: every tracked change it finds, put back to HEAD), on a
baseline taken at the HEAD it starts from. Without that, a step
git leaves half-written at an unmoved HEAD is judged against whatever refs a later fetch left,
or against no baseline at all once an earlier step moved HEAD. A failed record write raises:
the step must not run.

The first step from the pause's own HEAD extends the pause's baseline (it knows the edits that
were already there). A later step gets a baseline of its own, retired once git returns with the
tree whole: HEAD moved and every file the move wrote holds the new commit, the tree exactly as
the step found it, or the step reported ``whole`` on the dict this yields (a stash restore that
applied cleanly changes the tree by design). A move is judged the moment git returns (see
``_settle_checkout_move``).Úpause_idNÚdirty_at_pauseÚ	baselinesÚ@Úpre_shac              3   ó˜   <"  € T F?  qP                  R 4      SR ,          8X  g   K!  VP                  R4      SS39   g   K;  Vx € KA  	  R# 5i)r   r   N)Úget)Ú.0ÚbÚfoundÚmove_idr   s   & €€€ÚE/home/ubuntu/.hermes/hermes-agent/hermes_cli/update_cmd_pause_gate.pyÚ	<genexpr>Ú!_checkout_move.<locals>.<genexpr>(   sD   øé € ð C¡	˜1¯U©U°9Ó-=ÀÀyÕAQÑ-Q”QØŸ™˜zÓ*¨x¸Ð.AÑA÷ ’Q£	ùs   ƒA
¦A
Á 
A
Úmove_targetsÚ
move_pathsÚresume_neededT© )
Úsortedr   Ú_pause_recordÚinstall_rootÚ
tree_stateÚ
setdefaultÚnextÚappendÚwriteÚ_settle_checkout_move)Útokenr   r   ÚtargetsÚstepÚtÚrootr	   ÚbaselineÚkeyÚboundr   r   r   s   &$$*       @@@r   Ú_checkout_mover*      sŽ  úé € ð" €DÜ¡Ó.¡˜A«A—a�a¡Ñ.Ó/€GØ—�˜× Ñ  Ó,€Hß+3¿ÇEÏVŒ=×%Ò%Ô'ÐZ^€Dß.2ŒM×$Ò$ TÔ*¸€EØ‚}ØŠ
ÙØHˆeÐH¿�uÐ-Õ.×4Ð4°"øÀBÐH€EØ× Ñ  ¨bÓ1€IØ�
˜!˜E )Õ,Ð-Ð.€GÜö C¡	ó CØDHóJ€HàÒØ Ð1¨5Ð1ˆØ×Ñ˜Ô"Ø&¨Ð0°<ÀÐ2GÓH‰
ˆß‰5Ü"Ð#C X§\¡\°#°rÓ%:Ð#C¸UÐ#CÓDˆH‹Mñ Iô ×ÒÐ8˜5Ð8 /°4Ñ8Ô9ðBØŠ
ä˜e¨u°dÖAùò- /øô, 	˜e¨u°dÕAüsc   …F‘	FŸF¥FµFÁFÁFÁFÁ'FÂ,FÂ3FÃA+FÄ3AFÅ5F Å9FÆFÆFc                ó   a € V 3R l# )zZ``_checkout_move`` bound to *token*: the ``checkout_move`` the git and stash helpers take.c                  ó"   <€ \        S.V O5/ VB # ©N)r*   )r#   r)   r"   s   *,€r   Ú<lambda>Ú_moves_for.<locals>.<lambda>9   s   ø€ ¤^°EÐ%M¸GÒ%MÀuÒ%Mó    r   )r"   s   fr   Ú
_moves_forr1   7   s	   ø€ äMÐMr0   c          
      óL   € V ^8„  d   QhR\         R\         R\         R\         RR/# )é   r"   r'   r   r$   ÚreturnN)Údict)Úformats   "r   Ú__annotate__r7   <   s1   € ÷ :ñ :¤ð :´ð :¼dð :ÔPTð :ÐY]ñ :r0   c                ó‚  aa	€ \         P                  ! V4      o	S	R,          SR,          8g  pV'       d    \         P                  ! VSS	R,          4      MRpV'       d    Ve   WaP                  R/ 4      S	R,          &   V'       d   V. 8H  MTVP	                  R4      ;'       g=    \
        ;QJ d     VV	3R lS 4       F  '       d   K   RM	  RM! VV	3R lS 4       4      pVR	,          V R	,          8w  d,   V'       d$   V R
,           Uu. uF  qˆVJg   K
  VNK  	  upV R
&   \         P                  ! / V CRR/C4       R# u upi )a  Record what the returned step left. A moved HEAD gets its verdict now: git can move HEAD
past a file it failed to write, and only now are the move's paths untouched by later steps
(dependency syncs, stash restores). A step's own baseline is retired when the tree is whole.r   r   NÚlandedÚwholec              3   óJ   <"  € T F  pSV,          SV,          8H  x € K  	  R # 5ir-   r   )r   r(   r   Únows   & €€r   r   Ú(_settle_checkout_move.<locals>.<genexpr>E   s"   øé € Ð=fÑ`eÐY\¸cÀ#½hÈ%ÐPSÍ*Ö>TÓ`eùs   ƒ #FTr   r	   r   )r   r   Útorn_by_mover   r   Úallr    )
r"   r'   r   r&   r$   ÚmovedÚtornr:   r   r<   s
   &&f&&    @r   r!   r!   <   sÿ   ù€ ô ×
"Ò
" 4Ó
(€CØ�	�N˜e IÕ.Ñ.€EßMRŒ=×%Ò% d¨E°3Ð7GÕ3HÔIÐX\€Dß�Ò!Ø<@×Ñ˜H bÓ)¨#¨i­.Ñ9ßˆD�BŠJ T§X¡X¨gÓ%6×%fÐ%f¿#»#Õ=fÑ`eÓ=f¿#¿#º#Õ=fÑ`eÓ=fÓ:f€EØ�
Õ˜u ZÕ0Ô0·UØ).¨{Ö);ÓQÑ); AÈÐ?PŸa˜aÑ);ÑQˆˆkÑÜ×ÒÐ8˜5Ð8 /°4Ñ8Ö9ùò Rs   ÄD<ÄD<Nr   )	Ú__doc__Ú
contextlibr   Ú
hermes_clir   r   r*   r1   r!   r   r0   r   Ú<module>rE      sD   ðñõ &å ;ð ð'B¨"ð 'B°Uó 'Bó ð'BòTN÷
:r0   