+
    jHàjüA  ã                  óž  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
HtHtHtHt ^ RIHt RtRtRtR	tR
tRtRtRtRtRtRtRtRtRtRtRt Rt!Rt"]"R,           t#R R lt$]! RR7       ! R R4      4       t%]! RR7       ! R R ]%4      4       t&]! RR7       ! R! R"]%4      4       t']! RR7       ! R# R$]%4      4       t(]! RR7       ! R% R&]%4      4       t)]! RR7       ! R' R(]%4      4       t*]! RR7       ! R) R*]%4      4       t+]! RR7       ! R+ R,]%4      4       t,R- R. lt-R/ R0 lt.R1 R2 lt/R3 R4 lt0R5 R6 lt1R7R8R9RR:R;R<RR=RR>R/R? R@ llt2R# )AzbThe one Nous sign-in: the plain device-code login every surface renders, plus its states and copy.)ÚannotationsN)Ú	dataclass)ÚAnyÚCallableÚClassVarÚContextManagerÚIteratorÚOptional)Úhttpxz<Sign in with a Nous account to unlock more models and tools.zAlready signed in.zDo not share this code.zAThat sign-in link has expired. Start again whenever you're ready.z7Sign-in didn't finish. Try again whenever you're ready.z}Signing in couldn't finish because the Nous service is busy. Try again in {wait}. Your session is still here in the meantime.zˆThe Nous service couldn't be reached to finish signing you in. Check your internet connection and try again. Your session is still here.z<No default model is set yet; run `hermes model` to pick one.z4No default model is set yet; run /model to pick one.zWaiting for sign-in...z%Waiting for sign-in, up to {minutes}.z
Sign-in cancelled.z/loginzStarting sign-in...z*Sign in from a direct message with Hermes.zNAnother sign-in is already running on this Hermes. Try again in a few minutes.z/Only an operator of this Hermes can sign it in.z�You've used up the allowance for chatting without signing in. It refreshes in {reset}. Sign in for a bigger allowance, it's free.z To sign in: /login.c               ó    € V ^8„  d   QhRRRR/# )é   Ú
expires_inÚintÚreturnÚstr© )Úformats   "Ú</home/ubuntu/.hermes/hermes-agent/hermes_cli/anon_sign_in.pyÚ__annotate__r   +   s   € ÷ ]ñ ] ð ]¨ñ ]ó    c                óÊ   € \        ^\        P                  ! \        ^ \        V 4      4      ^<,          4      4      p\        P                  V^8X  d   V R2R7      # V R2R7      # )zLThe honest "up to N minutes" line; N = ceil(expires_in / 60), singular at 1.z minutez minutes)Úminutes)ÚmaxÚmathÚceilr   ÚUPGRADE_WAITING_UP_TOr   )r   Úns   & r   Úformat_wait_liner   +   sZ   € äˆAŒt�yŠyœ˜Q¤ J£Ó0°2Õ5Ó6Ó7€AÜ ×'Ñ'ÀÀaÄ°1°#°W°Ð'Ó\Ð\ÐPQÈsÐRZÈ^Ð'Ó\Ð\r   T)Úfrozenc                  ó€   € ] tR t^9t$ RtRtR]R&   RtR]R&   RtR]R	&   Rt	R]R
&   ]
R R l4       t]
R R l4       tRtR# )ÚSignInStatezROne step of a sign-in. Every state carries its own user copy; renderers never map.Ú úClassVar[str]ÚkindTúClassVar[bool]ÚterminalFÚokÚpreconditionc               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   ÚSignInState.__annotate__C   s   € ÷ ñ �cñ r   c                ó   € R# )zThe in-chat form.r!   r   ©Úselfs   &r   ÚcopyÚSignInState.copyB   s   € ñ r   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   r*   H   s   € ÷ ñ ˜sñ r   c                ó   € V P                   # )z4The terminal form; differs for Completed and Failed.)r.   r,   s   &r   Úcopy_terminalÚSignInState.copy_terminalG   s   € ð �y‰yÐr   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r#   Ú__annotations__r%   r&   r'   Úpropertyr.   r2   Ú__static_attributes__r   r   r   r    r    9   sS   ‡ á\à€Dˆ-ÓØ#€HˆnÓ#Ø€BˆÓØ#(€L�.Ó(àôó ðð ôó ôr   r    c                  óŒ   € ] tR t^Mt$ RtR]R&   R]R&   R]R&   R]R&   RtR]R	&   R
tR]R&   ]R R l4       t	]R R l4       t
RtR# )ÚCodezNThe device page link and the sign-in code, plus the clock the caller may show.r   ÚlinkÚcoder   r   Úintervalr"   r#   Fr$   r%   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ÚCode.__annotate__Y   s   € ÷ $ñ $�cñ $r   c                	ó   € \         # ©N)ÚUPGRADE_DO_NOT_SHAREr,   s   &r   r.   Ú	Code.copyX   s   € ä#Ð#r   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   rB   ]   s   € ÷ Mñ M ñ Mr   c                ó>   € \          R\        V P                  4       2# )z\The do-not-share line plus the honest "up to N minutes"; composed here, never in a renderer.Ú )rE   r   r   r,   s   &r   Úcopy_with_waitÚCode.copy_with_wait\   s!   € ô 'Ð' qÔ)9¸$¿/¹/Ó)JÐ(KÐLÐLr   r   N)r4   r5   r6   r7   r8   r9   r#   r%   r:   r.   rJ   r;   r   r   r   r=   r=   M   sU   ‡ áXà
ƒIØ
ƒIØƒOØƒMØ €Dˆ-Ó Ø$€HˆnÓ$àô$ó ð$ð ôMó ôMr   r=   c                  óJ   € ] tR t^bt$ RtR]R&   RtR]R&   ]R R l4       tR	t	R
# )ÚWaitingÚwaitingr"   r#   Fr$   r%   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ÚWaiting.__annotate__h   s   € ÷ ñ �cñ r   c                	ó   € \         # rD   )ÚUPGRADE_WAITINGr,   s   &r   r.   ÚWaiting.copyg   s   € äÐr   r   N)
r4   r5   r6   r7   r#   r9   r%   r:   r.   r;   r   r   r   rM   rM   b   s(   ‡ à#€Dˆ-Ó#Ø$€HˆnÓ$àôó ôr   rM   c                  ó¶   € ] tR t^lt$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R	]R
&   Rt
R]R&   RtR]R&   RtR]R&   R R lt]R R l4       t]R R l4       tRtR# )Ú	Completeda  ``handoff`` holds the guest handoff's result lines (what moved, what to reconnect), empty
when the sign-in replaced no free tier. ``handoff_status`` is the latest handoff record it ran,
in ``guest_handoff.wire_status`` form, for a surface that renders the result itself.r!   r   ÚemailÚmodelFÚboolÚmodel_changedútuple[str, ...]ÚhandoffNúOptional[dict[str, Any]]Úhandoff_statusÚ	completedr"   r#   Tr$   r&   c               ó    € V ^8„  d   QhRRRR/# )r   Ú
no_defaultr   r   r   )r   s   "r   r   ÚCompleted.__annotate__z   s   € ÷  ñ   ð  ¨ñ  r   c                	ó  € V P                   '       d   R V P                    R2MR.V P                  OpV P                  '       d4   TP                  V P                  '       d   RV P                   R2MT4       RP                  V4      # )zSigned in as Ú.z
Signed in.zDefault model is now Ú
)rV   r[   rY   ÚappendrW   Újoin)r-   r`   Úliness   && r   Ú_linesÚCompleted._linesz   sm   € Ø26·*·*°*�= §¡ ¨AÑ.À,Ð^ÐQU×Q]ÑQ]Ð^ˆØ××ÐØ�L‰LÀ$Ç*Ç*À*Ð0°·±°¸AÑ>ÐR\Ô]Ø�y‰y˜ÓÐr   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ra   �   s   € ÷ 4ñ 4�cñ 4r   c                	ó,   € V P                  \        4      # rD   )rh   ÚUPGRADE_NO_DEFAULT_CHATr,   s   &r   r.   ÚCompleted.copy€   s   € à�{‰{Ô2Ó3Ð3r   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ra   …   s   € ÷ 8ñ 8˜sñ 8r   c                	ó,   € V P                  \        4      # rD   )rh   ÚUPGRADE_NO_DEFAULT_TERMINALr,   s   &r   r2   ÚCompleted.copy_terminal„   s   € à�{‰{Ô6Ó7Ð7r   r   )r4   r5   r6   r7   r8   rV   r9   rW   rY   r[   r]   r#   r&   rh   r:   r.   r2   r;   r   r   r   rU   rU   l   s|   ‡ ñ\ð €Eˆ3ƒOØ€Eˆ3ƒOØ€M�4ÓØ!€Gˆ_Ó!Ø/3€NÐ,Ó3Ø%€Dˆ-Ó%Ø€BˆÓõ ð ô4ó ð4ð ô8ó ô8r   rU   c                  ó@   € ] tR t^‰t$ RtRtR]R&   ]R R l4       tRt	R# )	Ú	Cancelledz^Stopped from outside before anything was saved: the user's cancel, a newer /login, a shutdown.Ú	cancelledr"   r#   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ÚCancelled.__annotate__�   ó   € ÷ )ñ )�cñ )r   c                	ó*   € \         P                  4       # rD   )ÚUPGRADE_CANCELLEDÚstripr,   s   &r   r.   ÚCancelled.copy�   s   € ä ×&Ñ&Ó(Ð(r   r   N)
r4   r5   r6   r7   r8   r#   r9   r:   r.   r;   r   r   r   rs   rs   ‰   s!   ‡ áhà%€Dˆ-Ó%àô)ó ô)r   rs   c                  óJ   € ] tR t^”t$ RtR]R&   RtR]R&   ]R R l4       tR	t	R
# )ÚTimedOutr!   r   ÚdetailÚ	timed_outr"   r#   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ÚTimedOut.__annotate__›   s   € ÷ !ñ !�cñ !r   c                	ó   € \         # rD   )ÚUPGRADE_TIMED_OUTr,   s   &r   r.   ÚTimedOut.copyš   s   € ä Ð r   r   N)
r4   r5   r6   r7   r~   r9   r#   r:   r.   r;   r   r   r   r}   r}   ”   s*   ‡ ð €FˆCÓØ%€Dˆ-Ó%àô!ó ô!r   r}   c                  ó–   € ] tR t^Ÿt$ RtRtR]R&   RtR]R&   RtR]R&   R	t	R
]R&   ]
R R l4       t]
R R l4       t]
R R l4       tRtR# )ÚFaileda*  ``reason``: an ``anon_*`` code naming the service's verdict (busy, unreachable...), or "" for
anything unnamed. ``retry_after``: the wait the service asked for, in seconds (0 when it named
none). ``retryable``: whether a later attempt can succeed, so a renderer knows to offer "try
again" and when.r!   r   Úreasonr~   ç        ÚfloatÚretry_afterÚfailedr"   r#   c               ó   € V ^8„  d   QhRR/# )r   r   rX   r   )r   s   "r   r   ÚFailed.__annotate__¬   s   € ÷ fñ f˜4ñ fr   c                	ó˜   € ^ RI Hp \        V P                  P	                  R4      ;'       d    V P                  VP
                  9  4      # )é    ©Ú	anon_authÚanon_)Ú
hermes_clir‘   rX   r‡   Ú
startswithÚANON_TERMINAL_CODES©r-   Ú_cores   & r   Ú	retryableÚFailed.retryable«   s6   € å1Ü�D—K‘K×*Ñ*¨7Ó3×dÐd¸¿¹È5×KdÑKdÑ8dÓeÐer   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   r�   ±   s   € ÷ %ñ %�cñ %r   c                	ó   € ^ RI Hp V P                  VP                  9   d   \        # V P                  VP
                  VP                  39   d:   \        P                  TP                  V P                  ;'       g    ^<4      R7      # V P                  VP                  9   d(   VP                  V P                  V P                  R7      # \        # )r�   r�   )Úwait)rŠ   )r“   r‘   r‡   ÚANON_UNREACHABLE_CODESÚUPGRADE_SERVICE_UNREACHABLEÚANON_RATE_LIMITEDÚANON_GATE_PAUSEDÚUPGRADE_SERVICE_BUSYr   Úfriendly_waitrŠ   ÚANON_FAILURE_COPYÚanon_failure_copyÚUPGRADE_NOT_COMPLETEDr–   s   & r   r.   ÚFailed.copy°   s    € å1Ø�;‰;˜%×6Ñ6Ô6Ü.Ð.Ø�;‰;˜5×2Ñ2°E×4JÑ4JÐKÔKÜ'×.Ñ.°E×4GÑ4GÈ×HXÑHX×H^ÐH^Ð\^Ó4_Ð.Ó`Ð`Ø�;‰;˜%×1Ñ1Ô1Ø×*Ñ*¨4¯;©;ÀD×DTÑDTÐ*ÓUÐUÜ$Ð$r   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   r�   ¼   s   € ÷ Zñ Z˜sñ Zr   c                	ó¶   € V P                   '       d"   V P                  \        8w  d   V P                  # V P                  '       d   R V P                   2# \        # )zSign-in failed: )r‡   r.   r¥   r~   r,   s   &r   r2   ÚFailed.copy_terminal»   sA   € à�;�;ˆ;˜4Ÿ9™9Ô(=Ô=Ø—9‘9ÐØ37·;·;°;Ð! $§+¡+ Ð/ÐYÔDYÐYr   r   N)r4   r5   r6   r7   r8   r‡   r9   r~   rŠ   r#   r:   r˜   r.   r2   r;   r   r   r   r†   r†   Ÿ   so   ‡ ñð
 €FˆCÓØ€FˆCÓØ€K�ÓØ"€Dˆ-Ó"àôfó ðfð ô%ó ð%ð ôZó ôZr   r†   c                  óX   € ] tR t^Ât$ RtR]R&   RtR]R&   RtR]R&   ]R R	 l4       t	R
t
R# )ÚAlreadySignedInÚalready_signed_inr"   r#   Tr$   r&   r'   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ÚAlreadySignedIn.__annotate__É   rw   r   c                	ó   € \         # rD   )ÚUPGRADE_ALREADY_SIGNED_INr,   s   &r   r.   ÚAlreadySignedIn.copyÈ   s   € ä(Ð(r   r   N)r4   r5   r6   r7   r#   r9   r&   r'   r:   r.   r;   r   r   r   r«   r«   Â   s2   ‡ à-€Dˆ-Ó-Ø€BˆÓØ#'€L�.Ó'àô)ó ô)r   r«   c               ó    € V ^8„  d   QhRRRR/# )r   ÚexcÚBaseExceptionr   r†   r   )r   s   "r   r   r   Í   s   € ÷ ]ñ ] ð ]°&ñ ]r   c                óX  € ^ RI Hp VP                  V 4      p\        VP                  ;'       g    R4      pW1P
                  8X  d2   \        WP                  4      '       g   \        R\        V 4      R7      # \        T\        V 4      \        VP                  ;'       g    R4      R7      # )zúA ``Failed`` that keeps the service's own verdict: the ``anon_*`` code and wait hint an
``AuthError`` carries, or the wire's shape for a transport error. The raw detail never reaches a
chat; ``copy_terminal`` may show it when nothing better is known.r�   r!   ©r‡   r~   rˆ   )r‡   r~   rŠ   )r“   r‘   Úclassify_mint_exceptionr   r?   ÚANON_SERVER_ERRORÚ
isinstanceÚ	AuthErrorr†   r‰   rŠ   )r³   r—   Úerrr‡   s   &   r   Ú_failed_from_exceptionr¼   Í   s}   € õ .Ø
×
'Ñ
'¨Ó
,€CÜ�—‘—�˜RÓ €FØ×(Ñ(Ô(´¸CÇÁ×1QÒ1Qô ˜R¬¨C«Ô1Ð1Ü˜¬¨C«¼eÀCÇOÁO×DZÐDZÐWZÓ>[Ô\Ð\r   c               ó    € V ^8„  d   QhRRRR/# )r   Úis_cancelledzCallable[[], bool]r   z"Callable[[], ContextManager[bool]]r   )r   s   "r   r   r   Û   s   € ÷ ñ Ð);ð Ð@bñ r   c                ó:   a € \         P                  V 3R l4       pV# )zZThe persist guard used when a surface brings none: proceed unless the attempt was stopped.c               3  ó,   <"  € S ! 4       '       * x € R # 5irD   r   )r¾   s   €r   Ú_guardÚ&_default_persist_guard.<locals>._guardÝ   s   øé € á“.Ô Ô ùs   ƒ)Ú
contextlibÚcontextmanager)r¾   rÁ   s   f r   Ú_default_persist_guardrÅ   Û   s    ø€ ä×Ñô!ó ð!à€Mr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úaccount_statezdict[str, Any]ÚfallbackzOptional[str]r   r   r   )r   s   "r   r   r   ã   s!   € ÷ 0ñ 0 .ð 0¸Mð 0Ècñ 0r   c                ó´   € ^ RI Hp V! V P                  R4      4      P                  R4      p\        T;'       g    T;'       g    R4      P	                  4       # )z>The signed-in account's email, read from its own access token.)Ú_decode_jwt_claimsÚaccess_tokenrV   r!   )Úhermes_cli.auth_constantsrÊ   Úgetr   rz   )rÇ   rÈ   rÊ   rV   s   &&  r   Ú_account_emailrÎ   ã   sI   € å<Ù˜}×0Ñ0°Ó@ÓA×EÑEÀgÓN€EÜˆu×&Ð&˜×&Ð& BÓ'×-Ñ-Ó/Ð/r   c               ó    € V ^8„  d   QhRRRR/# )r   Úresultsúlist[dict[str, Any]]r   rZ   r   )r   s   "r   r   r   ê   s   € ÷ Jñ JÐ0ð J°_ñ Jr   c                ót   a€ ^ RI Ho \        ;QJ d    . V3R lV  4       F  NK  	  5# ! V3R lV  4       4      # )r�   )Úresult_linesc              3  óD   <"  € T F  pS! V4       F  q"x € K  	  K  	  R # 5irD   r   )Ú.0ÚviewÚlinerÓ   s   &  €r   Ú	<genexpr>Ú!_handoff_lines.<locals>.<genexpr>ì   s   øé € ÐI¡'˜$±lÀ4Ö6H¨d”Ñ6H‘£'ùs   ƒ )Úhermes_cli.guest_handoffrÓ   Útuple)rÐ   rÓ   s   &@r   Ú_handoff_linesrÜ   ê   s(   ø€ Ý5ßŒ5ÔI¡'ÓI�5ÐIˆ5ÔI¡'ÓIÓIÐIr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rÐ   rÑ   Úreplacedr\   r   r   )r   s   "r   r   r   ï   s$   € ÷ 
3ñ 
3Ð1ð 
3Ð=Uð 
3ÐZrñ 
3r   c                ó  € ^ RI Hp ^ RIHpHp V '       d   V! V R,          4      # VP                  V4      '       d   VP                  R4      MRp\        V\        4      '       d   V'       d	   V! V4      MRpV'       d	   V! V4      # R# )a%  The handoff a completed sign-in reports (``guest_handoff.wire_status`` form): the latest record its
own run attempted, else the replaced free tier's saved record (another process held the claim, or
the run's budget ran out first), else None when it replaced no free tier. Read under the scope.r�   )Úrecord_statusÚwire_statusÚ
anon_tokenNéÿÿÿÿ)	r“   r‘   rÚ   rà   rá   Úis_guest_staterÍ   r¹   r   )rÐ   rÞ   r—   rà   rá   râ   Ústatuss   &&     r   Ú_handoff_statusræ   ï   sj   € õ .ßCßÙ˜7 2�;Ó'Ð'Ø/4×/CÑ/CÀH×/MÒ/M�—‘˜lÔ+ÐSW€JÜ*4°ZÄ×*EÒ*EÏ*‰]˜:Ô&ÐZ^€Fß"(‰;�vÓÐ2¨dÐ2r   Útimeout_secondsg      .@rt   Úreplace_accountFÚpersist_guardÚscopeÚclient_factoryc               ó4   € V ^8„  d   QhRRRRRRRRR	R
RRRR/# )r   rç   r‰   rt   zOptional[Callable[[], bool]]rè   rX   ré   z,Optional[Callable[[], ContextManager[bool]]]rê   z+Optional[Callable[[], ContextManager[Any]]]rë   z>Optional[Callable[[float, Any], ContextManager[httpx.Client]]]r   zIterator[SignInState]r   )r   s   "r   r   r   ü   s[   € ÷ v'ñ v'àðv'ð ,ðv'ð ð	v'ð
 @ðv'ð 7ðv'ð Sðv'ð ñv'r   c              #  ó 
  "  € ^ RI Hp ^ RIHpHp ^ RIHp	Hp
 ^ RIH	p ^ RI
HpHp ^ RIHp T;'       g    R pT;'       g    \        P                   pRp V! 4       ;_uu_ 4        VP#                  4       pT! T;'       g    / 4      pRRR4       T'       d.   TP+                  T4      '       g   T'       g   \-        4       x € R#  TR,          pTP.                  TP0                  ppT! RRRR7      pT;'       g    TpT! T T4      ;_uu_ 4       pT
! TXTT4      p\3        TR,          4      p\3        TP5                  R4      ;'       g    ^4      p\6        P8                  ! 4       \;        ^T4      ,           p\=        \)        TR,          4      \)        TR,          4      TTR7      x € T! 4       '       d   \?        4       x €  RRR4       R# \A        4       x € TPC                  TTT\)        TR,          4      \;        ^\3        T\6        P8                  ! 4       ,
          4      4      TTR7      pRRR4       TPE                  XXTTTT R7      pT;'       g    \S        T4      p! T! 4       ;_uu_ 4        T! 4       ;_uu_ 4       p"T!! 4       ;_uu_ 4       p#T#'       d   TPU                  T4       RRR4       RRR4       X#'       d(   TPW                  T4      p$\Y        X"PZ                  T4      p%RRR4       X#'       g   \?        4       x € R# \]        \_        TX"P`                  4      \)        X$P5                  R4      ;'       g    R	4      \c        T$P5                  R4      4      \e        T"PZ                  4      X%R7      x € R#   + '       g   i     ELþ; i  \$         d$   p\'        R	\)        T4      R
7      x €  Rp?R# Rp?ii ; i  + '       g   i     ELž; i  T	 d    \?        4       x €  R# \F         dd   p\I        TPJ                  \L        4      '       d   TPJ                  MRp T '       d   \O        T 4      M\Q        \)        T4      R7      x €  Rp?R# Rp?i\$         d<   pT! T4      '       d   \Q        \)        T4      R7      M
\O        T4      x €  Rp?R# Rp?ii ; i  + '       g   i     ELþ; i  + '       g   i     EL
; i  + '       g   i     ELç; i  \$         d$   p\'        R	\)        T4      R
7      x €  Rp?R# Rp?ii ; i5i)a°  Sign in with a Nous account: the plain device-code login. Yields :class:`SignInState`s.

One composition behind every surface: device code, then a cancel-aware token poll on one
deadline, then the save. The save is where the guest handoff hooks in (``guest_handoff``): a free
tier the account replaces has its apps moved once the surface's lock is released, and the result
rides :class:`Completed`. :func:`settle_after_upgrade` runs exactly once per completion. Works
with or without a free tier on disk. It always ends by yielding exactly one state whose
``terminal`` is True: a persist or settle failure becomes ``Failed``, never an exception out of
``next()``.

*cancelled* is polled before the wait, on a <= 1 s tick inside the token poll, and once more
under *persist_guard* before the save; a cancel always wins and nothing is saved.
*replace_account* lets a signed-in install sign in again (the desktop's "connect another
account"); without it a signed-in install yields ``AlreadySignedIn`` before any network.
*persist_guard* lets a surface make its own cancel check and the save atomic under its own lock.
*scope* is entered only around the two non-network blocks (precondition, persist/settle), never
across a ``yield``: ``run_in_executor`` does not carry contextvars, so the scope has to be
entered inside the generator, on whichever thread is advancing it.
*client_factory* is the HTTP client seam, ``client_factory(timeout_seconds, verify)``.
r�   )ÚPROVIDER_REGISTRYÚ_resolve_verify)ÚDeviceFlowCancelledÚ_request_device_code)Úis_device_code_expired)Ú_nous_http_clientÚ_nous_portal_base_url)Údeferredc                 ó   € R # )Fr   r   r   r   Ú<lambda>Úrun_sign_in.<locals>.<lambda>   s   € ©r   Nr!   r¶   Únous)ÚinsecureÚ	ca_bundleÚ
auth_stater   r@   Úverification_uri_completeÚ	user_code)r>   r?   r   r@   Údevice_code)ÚclientÚportal_base_urlÚ	client_idrÿ   r   Úpoll_intervalrt   )r  r  rê   Úverifyrç   )r~   rW   Úchanged)rV   rW   rY   r[   r]   )3r“   r‘   Úhermes_cli.authrî   rï   Úhermes_cli.auth_device_flowrð   rñ   Úhermes_cli.auth_error_copyrò   Úhermes_cli.auth_nousró   rô   rÚ   rõ   rÃ   ÚnullcontextÚcurrent_nous_stateÚ	Exceptionr†   r   rä   r«   r  rê   r   rÍ   ÚtimeÚ	monotonicr   r=   rs   rM   Ú_poll_for_tokenÚ_account_state_from_tokenÚTimeoutErrorr¹   Ú	__cause__ÚConnectionErrorr¼   r}   rÅ   Úpersist_nous_credentialsÚsettle_after_upgraderæ   rÐ   rU   rÎ   Úaccount_emailrX   rÜ   )&rç   rt   rè   ré   rê   rë   r—   rî   rï   rð   rñ   rò   ró   rô   rõ   r¾   Ú
open_scopeÚstateÚportalr³   Úpconfigr  Ú	scope_strr  Úopen_clientr   Údevicer   r@   ÚdeadlineÚ
token_datarÇ   ÚoutageÚguardr[   Úmay_persistÚsettledr]   s&   $$$$$$                                r   Úrun_sign_inr$  ü   så  é € õ: .ßBßUÝAßMÝ1à×/Ð/¡€LØ×0Ð0œ*×0Ñ0€Jð '+€EðÙ�\�\Ø×,Ñ,Ó.ˆEñ +¨5¯;¨;°BÓ7ˆF÷	 ÷ �U×)Ñ)¨%×0Ò0¿ÜÓÒÙð$Ø# FÕ+ˆØ&×0Ñ0°'·-±-�9ˆ	á ¨$¸$È4ÔPˆØ$×9Ð9Ð(9ˆÙ˜¨&×1Ô1°VÙ)¨&°&¸)ÀYÓOˆFÜ˜V LÕ1Ó2ˆJÜ˜6Ÿ:™: jÓ1×6Ð6°QÓ7ˆHÜ—~’~Ó'¬#¨a°Ó*<Õ<ˆHÜœC Ð'BÕ CÓDÌ3ÈvÐVaÕObÓKcØ",°xôAò Aá�~Š~Ü“kÒ!Ø÷ 2Ñ1ô “)ŠOØ×.Ñ.Ø¨vÀÜ  }Õ 5Ó6Ä3ÀqÌ#ÈhÔY]×YgÒYgÓYiÕNiÓJjÓCkØ&°,ð /ó @ˆJ÷ 2ð ×7Ñ7Ø¨¸)È9Ø¨?ð 8ó <ˆð" ×AÐAÔ3°LÓA€EðÙ�\�\á—”˜wÙ—W”W ß"Ø×6Ñ6°}ÔE÷ ÷ ÷ Ø×4Ñ4°]ÓC�Ü!0°·±À%Ó!H�÷ ÷ Ü‹kÒÙä
Ü˜]¨G×,AÑ,AÓBÜ�'—+‘+˜gÓ&×,Ð,¨"Ó-Ü˜7Ÿ;™; yÓ1Ó2Ü˜wŸ™Ó/Ø%ô'ô '÷O �\ˆ\ûô
 ô Ü˜B¤s¨3£xÔ0Ò0Ýûðú÷ 2×1Ð1ûð$ ô Ü‹kÒÚÜô ô #-¨S¯]©]¼O×"LÒ"L�—’ÐRVˆß06Ô$ VÔ,¼HÌCÐPSËHÔ<UÒUÝûÜô á+AÀ#×+FÒ+FŒhœc #›hÕ'ÔLbÐcfÓLgÒgÝûðú÷ —W�Wú÷ —�ú÷ �\ˆ\ûô ô ô ˜B¤s¨3£xÔ0Ò0Ýûðüs‰  ‚A TÁTÁN Á&#M>Â	N ÂTÂTÂ0TÂ8TÃ4O Ã<O ÄB3OÇO ÇTÇA!OÈ.O ÉTÉTÉ#S É2S	ÊR5	ÊR!Ê,R5	Ê4S	Ë'S	Ë+S Ë3TË;BTÍ>N	Î	N ÎTÎN ÎO ÎN;Î5TÎ;O Ï TÏO	Ï	O ÏRÏ*TÏ-RÏ6RÏ75QÐ-"QÑTÑRÑ"RÑ#0RÒTÒRÒTÒ!R2Ò,	R5	Ò5SÓ 	S	Ó	S	ÓS ÓTÓS ÓTÓ(TÔ TÔTÔT)3r8   Ú
__future__r   rÃ   r   r  Údataclassesr   Útypingr   r   r   r   r   r	   rÌ   r
   ÚUPGRADE_STARTr°   rE   rƒ   r¥   r¡   rž   rp   rl   rR   r   ry   ÚLOGIN_COMMANDÚLOGIN_STARTINGÚLOGIN_DM_ONLYÚLOGIN_BUSY_ELSEWHEREÚLOGIN_NOT_ALLOWEDÚFREE_TIER_RATE_LIMIT_CARDÚFREE_TIER_RATE_LIMIT_CHATr   r    r=   rM   rU   rs   r}   r†   r«   r¼   rÅ   rÎ   rÜ   ræ   r$  r   r   r   Ú<module>r0     s  ðÙ hå "ã Û Û Ý !ß N× Nå +ð O€Ø0Ð Ø0Ð ØWÐ ØQÐ ð[Ð ð kÐ ð ]Ð ØPÐ Ø*€Ø?Ð Ø*Ð Ø€Ø&€Ø<€ØgÐ ØEÐ ð1ð ð 6Ð8NÕNÐ õ]ñ �$Ô÷ð ó ðñ& �$ÔôMˆ;ó Mó ðMñ( �$Ôôˆkó ó ðñ �$Ôô8�ó 8ó ð8ñ8 �$Ôô)�ó )ó ð)ñ �$Ôô!ˆ{ó !ó ð!ñ �$ÔôZˆ[ó Zó ðZñD �$Ôô)�kó )ó ð)õ]õõ0õJõ

3ðv'à!ðv'ð /3ðv'ð "ð	v'ð
 CGðv'ð :>ðv'ð VZ÷v'ñ v'r   