+
    jHàj7O  ã                  óÄ  a € 0 t $ R t^ RIHt ^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ]P                  ! ]4      tRtRtRtR	tR
tRtR R ltR R ltR R ltR:R R llt]! RR7       ! R R4      4       tR R ltR R ltR R ltR R ltR:R  R! lltR" R# ltR:R$ R% lltR& R' lt R( R) lt!. t"R*]#R+&   R, R- lt$R. R/ lt%R0 R1 lt&R2 R3 lt'R:R4 R5 llt(R:R6 R7 llt)R8 R9 lt*R# );uc  Boot-time verdict for ``gateway.multiplex_profiles`` (the default is on, and there is no opt-out).

``GatewayConfig.from_dict`` leaves the flag ``None`` when neither config.yaml nor
``GATEWAY_MULTIPLEX_PROFILES`` set it. Turning the default on must not make a default gateway
double-bind a fleet that still runs per-profile gateways (two pollers on one bot token, port
fights), so the implicit default is a *request*: the gateway runs the same preflight
``hermes gateway migrate --multiplex`` runs and multiplexes only when the fold would have been
safe. An explicit ``true`` is never second-guessed.

An explicit ``false`` is RETIRED (multiplex-only ruling): it parses, it is logged, and it is then
resolved exactly like an unset key. The key itself survives because it is still the RUNTIME
mode flag every scoped code path reads (``config.multiplex_profiles``) â€” what it can no longer do
is pin a second gateway process onto this host.

The refusal is logged, never fatal: the gateway comes up standalone exactly as before the
default flipped, and the log names the blocker plus ``hermes gateway migrate --multiplex``.
)ÚannotationsN)Ú	dataclass)ÚPath)ÚOptionalz.only one profile exists (nothing to multiplex)zLthis profile is standalone (gateway.standalone: true); it serves only itselfz—gateway.auto_multiplex_migration is false, so this gateway serves only its own profile; run `hermes gateway migrate --multiplex` to serve every profileuÁ   gateway.standalone is a temporary compatibility shim while multiplexing gaps are fixed; it will be removed once they are â€” plan to fold this profile with `hermes gateway migrate --multiplex`.zÞgateway.multiplex_profiles: false is retired and was rewritten to true; one gateway per host serves every profile. A per-profile gateway is `gateway.standalone: true` in that profile's config (temporary shim) or `--force`.z.multiplex_opt_out_rewrittenc               ó    € V ^8„  d   QhRRRR/# )é   Údefault_homer   ÚreturnúOptional[bool]© )Úformats   "ÚF/home/ubuntu/.hermes/hermes-agent/hermes_cli/gateway_multiplex_mode.pyÚ__annotate__r   :   s   € ÷ ñ ¨$ð °>ñ ó    c                óÚ  € ^ RI HpHp V! 4       pVe   V# \        V 4      R,          pVP	                  4       '       g   R# ^ RIHp V! V4      ;'       g    / p\        VP                  R4      \        4      '       d   VP                  R4      M/ pVP                  R4      pVf   VP                  R4      pVf   R# \        V\        4      '       d   V! V4      p	V	f   R# T	# \        V4      # )aj  The operator's explicit choice for the DEFAULT profile's gateway: a recognized
``GATEWAY_MULTIPLEX_PROFILES``, else ``gateway.multiplex_profiles`` (or the top-level alias) as
written in its config.yaml; ``None`` when neither is set. Raw read on purpose: the callers are
other processes (``hermes -p X ...`` has X's config loaded) asking about the default's file.)Ú_bool_tokenÚ _env_multiplex_profiles_overrideNúconfig.yaml©Úread_user_config_rawÚgatewayÚmultiplex_profilesT)Úgateway.configr   r   r   ÚexistsÚhermes_cli.configr   Ú
isinstanceÚgetÚdictÚstrÚbool)
r   r   r   ÚenvÚcfg_pathr   ÚcfgÚgateway_sectionÚvalueÚparseds
   &         r   Úexplicit_multiplex_flagr&   :   sÑ   € ÷
 MÙ
*Ó
,€CØ
‚Øˆ
Ü�LÓ! MÕ1€HØ�?‰?×ÒÙÝ6Ù
˜xÓ
(×
.Ð
.¨B€CÜ,6°s·w±w¸yÓ7IÌ4×,PÒ,P�c—g‘g˜iÔ(ÐVX€OØ�G‰GÐ(Ó)€EØ‚}Ø×#Ñ#Ð$8Ó9ˆØ‚}ÙÜ�%œ×ÒÙ˜UÓ#ˆØ’~ˆtÐ1¨6Ð1Ü�‹;Ðr   c               ó    € V ^8„  d   QhRRRR/# )r   r$   r
   r	   r   )r   s   "r   r   r   T   s   € ÷ #ñ # ð #°Nñ #r   c                ó   € V '       d   R# R# )z¥How boot reads an explicit ``multiplex_profiles``: ``true`` is final; the retired ``false``
settles exactly like an unset key (``None``: the boot preflight decides).TNr   )r$   s   &r   Úsettled_explicit_flagr)   T   s   € ÷ ˆ4Ð"˜dÐ"r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   Úhomer	   r
   r   )r   s   "r   r   r   Z   s&   € ÷ Hñ H¨Dð H¸ð HÀñ Hr   c                óV   € ^ RI Hp V! V4      '       d   R# \        \        V 4      4      # )aO  Offline twin of the boot verdict for named profile *home* under *default_home*'s gateway:
``False`` for a ``gateway.standalone: true`` secondary (``profiles_to_serve`` never serves it),
``True`` for an explicit ``true`` on the default, ``None`` when boot settles it (unset or the
retired ``false``, see :func:`resolve_multiplex_mode`).©Úprofile_is_standaloneF)Úhermes_cli.profilesr.   r)   r&   )r   r+   r.   s   && r   Úhost_serves_named_profiler0   Z   s&   € õ
 :Ù˜T×"Ò"ÙÜ Ô!8¸Ó!FÓGÐGr   c               ó    € V ^8„  d   QhRRRR/# )r   r   úOptional[Path]r	   r   r   )r   s   "r   r   r   e   s   € ÷ +ñ +¨nð +Èñ +r   c                óš   € ^ RI Hp ^ RIHp V e   \	        V 4      MV! 4       pV! V4      pVe   \        V4      # \        V4      pVf   R# R# )u7  Does the default profile's gateway serve every profile? For CLI/dashboard processes: the LIVE
gateway's ``served_profiles`` record when one runs (it settled the unset default itself), else
the explicit flag, else False â€” an unset flag is decided by the gateway at boot, never guessed
here.

The one thing that can no longer report "standalone" is an explicit ``false``: it is RETIRED
(warned about and ignored at boot, see :func:`resolve_multiplex_mode`), so answering False from
it made every CLI surface contradict the gateway that was about to multiplex anyway.
©Úget_default_hermes_root)Úrecorded_served_profilesFT)Úhermes_constantsr5   Ú#hermes_cli.gateway_multiplex_servedr6   r   r   r&   )r   r5   r6   ÚrootÚrecordedÚflags   &     r   Údefault_gateway_multiplexesr<   e   sR   € õ 9ÝLØ!-Ò!9Œ4�ÔÑ?VÓ?X€DÙ'¨Ó-€HØÒÜ�H‹~ÐÜ" 4Ó(€DØ’Lˆ5Ð* dÐ*r   T)Úfrozenc                  ó:   € ] tR t^yt$ R]R&   R]R&   RtR]R&   RtR# )	ÚMultiplexDecisionr   Úenabledr   ÚsourceÚ Úreasonr   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__rC   Ú__static_attributes__r   r   r   r?   r?   y   s   ‡ àƒMð ƒKØ€FˆC×r   r?   c               ó   € V ^8„  d   QhRR/# )r   r	   r   r   )r   s   "r   r   r   ‚   s   € ÷ `ñ `˜dñ `r   c                 ób   € ^ RI Hp Hp ^ RIHp V ! 4       pV! V4      R9  ;'       d	    V! V4      # )é    ©Úget_hermes_homeÚprofile_name_for_homer-   )NÚdefault)r7   rN   rO   r/   r.   )rN   rO   r.   r+   s       r   Ú_standalone_launcherrQ   ‚   s0   € ßGÝ9áÓ€DÙ  Ó&Ð.?Ñ?×_Ð_ÑDYÐZ^ÓD_Ð_r   c               ó   € V ^8„  d   QhRR/# )r   r	   zOptional[MultiplexDecision]r   )r   s   "r   r   r   Š   s   € ÷ Hñ HÐ,Gñ Hr   c                óV   € \        4       '       g   R# RV n        \        RR\        4      # )zOThe per-profile opt-out also binds callers supplying an explicit GatewayConfig.NFÚguard)rQ   r   r?   ÚSTANDALONE_PROFILE_REASON)Úconfigs   &r   Ústandalone_launcher_decisionrW   Š   s&   € ä×!Ò!ÙØ %€FÔÜ˜U GÔ-FÓGÐGr   c               ó   € V ^8„  d   QhRR/# )r   r	   zOptional[str]r   )r   s   "r   r   r   ’   s   € ÷ 'ñ ' Mñ 'r   c                 ó’  € ^ RI Hp  \        4       '       d   \        # \	        V ! RRR7      4      ^8  d   \
        # ^ RIHpHpH	p V! 4       pV'       d   V# V! 4       pVP                  '       d,   RP                  R VP                   4       4      pRV RV R	2# VP                  '       d   R
P                  VP                  4      # R# )uF  Why THIS process must not multiplex right now, or None when it may.

Mirrors what makes ``hermes gateway migrate --multiplex`` refuse or leave a per-profile gateway
in place: hosts whose per-profile gateways the preflight cannot see (s6 slots) stay standalone;
a secondary that still runs its own gateway (live process or installed service) or a preflight
blocker (duplicate bot credential, port binder without a ``/p/<profile>/`` ingress) keeps this
gateway standalone.

Every blocker here is a TRANSIENT, fixable condition, which is why this function is now also
the whole answer for an explicit ``gateway.multiplex_profiles: false`` (see
:func:`resolve_multiplex_mode`): the host converges the moment the blocker is gone.

The launching profile's IDENTITY is deliberately not a blocker: multiplex-only means "the one
host process", whichever profile started it. Gating on ``active == 'default'`` made a host
whose only gateway runs under a named profile permanently standalone â€” and every lifecycle
verb built on "the default's multiplexer" blind to the process actually serving the host.
©Úprofiles_to_serveT©Ú	multiplexÚinclude_parked)ÚMIGRATE_COMMANDÚ_host_supports_migrationÚbuild_migration_planú, c              3  óÀ   "  € T FT  pR VP                    RVP                  '       d   R\        VP                  4      ,           MVP                  4        R2x € KV  	  R# 5i)Ú'z' (zpid Ú)N)ÚnameÚpidr   Úservice_label)Ú.0Úps   & r   Ú	<genexpr>Ú-implicit_multiplex_blocker.<locals>.<genexpr>³   sI   é € ð 2á0�ð �—‘ˆx�s°!·%·%°%˜6¤C¨¯©£JÖ.¸Q¿_¹_Ó=NÐOÈqÕQÛ0ùs
   ‚$A§7Azprofile(s) z. still run their own gateway; fold them with `Ú`z; N)r/   r[   rQ   rU   ÚlenÚSINGLE_PROFILE_REASONÚhermes_cli.gateway_migrater_   r`   ra   Ústandalone_secondariesÚjoinÚblockedÚblockers)r[   r_   r`   ra   Úhost_reasonÚplanÚowneds          r   Úimplicit_multiplex_blockerrx   ’   s¹   € õ$ 6Ü×ÒÜ(Ð(ô
 Ñ t¸DÔAÓBÀQÔFÜ$Ð$ßjÑjÙ*Ó,€KßØÐÙÓ!€DØ×"×"Ð"Ø—	‘	ñ 2à×0Ò0ó2ó 2ˆð ˜U˜GÐ#QÐRaÐQbÐbcÐdÐdØ‡|‡|€|Ø�y‰y˜Ÿ™Ó'Ð'Ùr   c               ó   € V ^8„  d   QhRR/# )r   r	   r   r   )r   s   "r   r   r   ¼   s   € ÷ %ñ %˜tñ %r   c                 ó   € ^ RI Hp  V ! 4       # )rL   r4   )r7   r5   r4   s    r   Ú_default_profile_homer{   ¼   s   € Ý8Ù"Ó$Ð$r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Údecisionr?   r   r2   r	   r   r   )r   s   "r   r   r   Á   s#   € ÷ ñ Ð'8ð Èð Ðbfñ r   c                óè  € V P                   '       d   V P                  R8X  d   R# Ve   \        V4      M	\        4       pVR,          p ^ RIHp VP                  4       '       d   V! V4      ;'       g    / M/ p\        VP                  R4      \        4      '       d   VP                  R4      M/ pVP                  RVP                  R4      4      pVRJ d   R# ^ RI
Hp V! VR4       V P                  R	8X  d*   V\        ,          P                  \        R
,           RR7       \         P%                  RTTf   RM
\'        T4      4       R#   \         d    \         P#                  RRR7        R# i ; i)aå  Write ``gateway.multiplex_profiles: true`` into the DEFAULT profile's config.yaml so the file
reads as the gateway behaves. The key has ONE valid value right now (Teknium ruling): an unset key
is made explicit ("left unset" was read as "off"), a retired ``false`` is rewritten in place and
leaves a one-time marker for the boxed notice. Comment-preserving writer, once, and NEVER on a guard
refusal (the file must not say true while the runtime is standalone). Returns True on a write.rT   Fr   r   r   r   T)Ú_write_multiplex_flagúretired-opt-outÚ
zutf-8)Úencodingz2could not persist gateway.multiplex_profiles: true©Úexc_infoz6Wrote gateway.multiplex_profiles: true to %s (was %s).Úunset)r@   rA   r   r{   r   r   r   r   r   r   rp   r   ÚREWRITTEN_MARKER_NAMEÚ
write_textÚRETIRED_OPT_OUT_REASONÚ	ExceptionÚloggerÚdebugÚinfoÚrepr)r}   r   r!   r   r"   ÚsectionÚin_filer   s   &&      r   Úpersist_resolved_defaultr�   Á   s6  € ð ××Ð˜xŸ™°'Ô9ÙØ)5Ò)A”4˜Ô%ÔG\ÓG^€LØ˜mÕ+€HðÝ:Ø6>·o±o×6GÒ6GÑ" 8Ó,×2Ð2°øÈRˆÜ(2°3·7±7¸9Ó3EÄt×(LÒ(L�#—'‘'˜)Ô$ÐRTˆØ—'‘'Ð.°·±Ð<PÓ0QÓRˆØ�d‹?ÙÝDÙ˜l¨DÔ1Ø�?‰?Ð/Ô/ØÔ1Õ1×=Ñ=Ô>TÐW[Õ>[ÐfmÐ=Ônô ‡K�KÐHÈ(Ø"š?‘´°W³ô?áøô ô Ü�‰ÐIÐTXˆÔYÚðús&   Á	E Á%E Á4A$E ÃA	E Å"E1Å0E1c               ó   € V ^8„  d   QhRR/# ©r   r	   ú	list[str]r   )r   s   "r   r   r   Þ   s   € ÷ 4ñ 4 iñ 4r   c                 ó   € \        . RO4      # )zTThe one-time boxed notice for a rewritten ``false`` (same box as the guard warning).)uK   âš  gateway.multiplex_profiles: false is retired and was rewritten to true;z*one gateway per host serves every profile.zLA per-profile gateway is `gateway.standalone: true` in that profile's configz(temporary shim) or `--force`.)Ú_boxr   r   r   Úretired_opt_out_notice_linesr–   Þ   s   € äò 3ó 4ð 4r   c               ó    € V ^8„  d   QhRRRR/# )r   r   r2   r	   r“   r   )r   s   "r   r   r   æ   s   € ÷ 
*ñ 
*¨>ð 
*ÀYñ 
*r   c                óÚ   € V e   \        V 4      M	\        4       p V \        ,          pVP                  4       '       g   . #  VP	                  4        \        4       #   \
         d    . u # i ; i)zW``hermes update``'s summary: print the rewrite notice ONCE more, then clear the marker.)r   r{   r†   r   ÚunlinkÚOSErrorr–   )r   Úmarkers   & r   Úconsume_rewritten_noticerœ   æ   sa   € à)5Ò)A”4˜Ô%ÔG\ÓG^€LØÔ1Õ1€FØ�=‰=�?Š?Øˆ	ðØ�‰Œô (Ó)Ð)øô ô ØŠ	ðús   Á A ÁA*Á)A*c               ó    € V ^8„  d   QhRRRR/# )r   Úbodyr“   r	   r   )r   s   "r   r   r   ó   s   € ÷ +ñ +ˆyð +˜Yñ +r   c           	     óô   € \        R  V  4       4      ^,           pRRV,          ,           R,           .V  Uu. uF  pRVP                  V^,
          4       R2NK!  	  upORRV,          ,           R,           N# u upi )c              3  ó8   "  € T F  p\        V4      x € K  	  R # 5i©N)rn   )ri   Úlines   & r   rk   Ú_box.<locals>.<genexpr>ô   s   é € Ð+¡d˜d”�D—	�	£dùs   ‚u   â”Œu   â”€u   â”�u   â”‚ u   â”‚u   â””u   â”˜)ÚmaxÚljust)rž   Úwidthr¢   s   &  r   r•   r•   ó   sy   € ÜÑ+¡dÓ+Ó+¨aÕ/€EØ�E˜E•MÕ! EÕ)ð +Ù<@ÓA¹D°D��T—Z‘Z ¨¥	Ó*Ð+¨3Ó/¹DÑAð+à�E˜E•MÕ! EÕ)ð+ð +ùÚAs   µ%A5c               ó   € V ^8„  d   QhRR/# )r   r	   r?   r   )r   s   "r   r   r   ú   s   € ÷ ñ Ð&7ñ r   c                ó¢  € \        V RR4      p\        V 4      pVe   V# \        V4      '       d   \        RR4      # VRJ p \	        4       pV'       d   \        RR
V4      pM'V'       d   \        RR\        4      pM\        RRR4      pVP                  V n
        V#   \
         d)   p\        P                  RTRR7       RT R	2p Rp?L~Rp?ii ; i)ué  Settle ``config.multiplex_profiles`` for one gateway boot; the config is updated in place.

``gateway.multiplex_profiles: false`` is RETIRED as a topology opt-out (multiplex-only ruling).
The key still parses and still drives the runtime mode this function writes back, but an
explicit ``false`` no longer pins a per-profile fleet: it is warned about and resolved exactly
like an unset key. That is safe because the unset path is not optimistic â€” it refuses to
multiplex while any real blocker holds (an s6 container, a secondary that still owns a gateway,
a duplicate bot credential), so a host that genuinely cannot fold still comes up standalone and
says why, and it converges by itself once ``hermes gateway migrate --multiplex`` has run.
r   NTrV   Fz3Multiplex preflight failed; starting standalone: %srƒ   zpreflight failed (re   rT   r€   rP   z1gateway.multiplex_profiles unset; default applies)ÚgetattrrW   r)   r?   rx   r‰   rŠ   Úwarningrˆ   r@   r   )rV   ÚcurrentÚ
standaloneÚretired_opt_outÚblockerÚexcr}   s   &      r   Úresolve_multiplex_moder°   ú   sÔ   € ô �fÐ2°DÓ9€GÜ-¨fÓ5€JØÒØÐÜ˜W×%Ò%Ü   xÓ0Ð0Ø Ð&€Oð.Ü,Ó.ˆ÷ Ü$ U¨G°WÓ=‰ß	Ü$ TÐ+<Ô>TÓU‰ä$ T¨9Ð6iÓjˆØ (× 0Ñ 0€FÔØ€Oøô ô .Ü�‰ÐLÈcÐ\`ˆÔaØ& s e¨1Ð-�ûð.ús   Á
B ÂCÂ&C	Ã	Czlist[MultiplexDecision]Ú_pending_decisionc               ó    € V ^8„  d   QhRRRR/# ©r   r}   r?   r	   ÚNoner   )r   s   "r   r   r     s   € ÷ Oñ OÐ(9ð O¸dñ Or   c                ó  €  ^ RI HpHp V! 4       '       g   V .\        R&   R# \        P	                  4        T! V P
                  R8X  d   V P                  MRR7       R#   \         d    \        P                  RRR7        R# i ; i)	a’  Persist a guard refusal into ``gateway_state.json`` so `hermes gateway status` can show why this
gateway serves one profile while the default says multiplex; any other verdict clears the field.

Only the runtime-lock owner writes that file. The decision is made while the config loads, before
the lock claim, and a pre-lock write published this process's pid as a live ``starting`` gateway:
a launch racing it read that as an owner and refused, leaving no gateway at all. Until this process
holds the lock the decision stays pending; ``publish_pending_multiplex_decision`` writes it once
the claim succeeds, and a launch that loses the claim never writes it.)Úowns_gateway_runtime_lockÚwrite_runtime_status:NNNNrT   )Úmultiplex_standalone_reasonz'could not record the multiplex decisionTrƒ   )
Úgateway.statusr¶   r·   r±   ÚclearrA   rC   r‰   rŠ   r‹   )r}   r¶   r·   s   &  r   Úrecord_multiplex_decisionr»     sm   € ðOßRÙ(×*Ò*Ø$, :Ô˜aÑ ÙÜ×ÑÔ!ÙÈHÏOÉOÐ_fÔLf¸¿ºÐlp×qøÜô OÜ�‰Ð>Èˆ×NðOús   ‚A —
A £:A Á"BÂBc               ó   € V ^8„  d   QhRR/# )r   r	   r´   r   )r   s   "r   r   r   2  s   € ÷ 9ñ 9¨Dñ 9r   c                 óN   € \         '       d   \        \         R,          4       R# R# )zZWrite the decision held back before the runtime-lock claim (called right after the claim).Néÿÿÿÿ)r±   r»   r   r   r   Ú"publish_pending_multiplex_decisionr¿   2  s   € çÓÜ!Ô"3°BÕ"7Ö8ñ r   c               ó    € V ^8„  d   QhRRRR/# r³   r   )r   s   "r   r   r   8  s   € ÷ +ñ +Ð%6ð +¸4ñ +r   c                óD  € \        V 4       V P                  R 8X  dD   \        P                  R\        4       \        V 4       \        4        F  p\        V4       K  	  R# V P                  R8X  d-   V P                  \        8X  d   \        P                  R4       R# V P                  R8X  d@   \        P                  RV P                  4       \        V 4       F  p\        V4       K  	  R# V P                  R8X  d#   \        P                  R4       \        V 4       R# R# )r€   z%srT   z[Single-profile install: gateway.multiplex_profiles unset, serving the default profile only.zHThis gateway stays standalone: %s. It serves only the launching profile.rP   zRServing every profile on this host (gateway.multiplex_profiles unset; default on).N)r»   rA   rŠ   rª   rˆ   r�   r–   ÚprintrC   ro   rŒ   Ústandalone_warning_lines)r}   r¢   s   & r   Úlog_multiplex_decisionrÄ   8  sÇ   € Ü˜hÔ'Ø‡�Ð+Ô+Ü�‰�tÔ3Ô4Ü  Ô*Ü0Ö2ˆDÜ�$ŽKó 3à	�‰˜GÔ	#¨¯©Ô;PÔ(PÜ�‰ÐqÖrØ	�‰˜GÔ	#Ü�‰ØVØ�O‰Oô	ô -¨XÖ6ˆDÜ�$ŽKó 7à	�‰˜IÔ	%Ü�‰ÐhÔiÜ  Ö*ñ 
&r   c               ó   € V ^8„  d   QhRR/# r’   r   )r   s   "r   r   r   L  s   € ÷ jñ j˜9ñ jr   c                 ó¤   € ^ RI Hp Hp ^ RIHp V! V ! 4       4      ;'       g    RpV! RRR7       UUu. uF  w  rEWC8w  g   K  VNK  	  upp# u uppi )zZNamed profiles a standalone gateway leaves without a bot (the whole point of the warning).rM   rZ   rP   Tr\   )r7   rN   rO   r/   r[   )rN   rO   r[   Úmerf   Ú_homes         r   Úunserved_profilesrÉ   L  sI   € çGÝ5Ù	™Ó0Ó	1×	>Ð	>°Y€BÙ$5ÀÐUYÕ$ZÔiÑ$Z‘[�TÐ^bÑ^h�DˆDÑ$ZÒiÐiùÓis   ³
AÁAc               ó$   € V ^8„  d   QhRRRRRR/# )r   r}   r?   ÚunservedzOptional[list[str]]r	   r“   r   )r   s   "r   r   r   T  s$   € ÷ ñ Ð'8ð ÐDWð Ðclñ r   c                ó$  € V P                   R8w  g   V P                  \        8X  d   . # Vf    \        4       pV'       g   . # ^ RIHp RRRP                  V4      ,           RV P                   2RV 2.p\        V4      #   \         d    . p LVi ; i)ak  The boxed warning a multi-profile host prints when a guard keeps its gateway standalone.

Empty for anything but a guard refusal on a host with other profiles to serve: a single-profile
install has nothing unserved, so there is nothing to shout about. The same box appears at
gateway start, in the ``hermes update`` summary and (as text) in the dashboard banner.
rT   )r_   u?   âš  This gateway is STANDALONE: it serves only its own profile.z.Profiles NOT served (their bots stay silent): rb   zWhy: zFix: )	rA   rC   ro   rÉ   r‰   rp   r_   rr   r•   )r}   rË   r_   rž   s   &&  r   rÃ   rÃ   T  s˜   € ð ‡�˜'Ô! X§_¡_Ô8MÔ%MØˆ	ØÒð	Ü(Ó*ˆH÷ Øˆ	Ý:àIØ8¸4¿9¹9ÀXÓ;NÕNØ
�—‘Ð Ð!Ø
�Ð Ð!ð	€Dô �‹:Ðøô ô 	ØŠHð	ús   ®
A? Á?BÂBc               ó    € V ^8„  d   QhRRRR/# )r   Ú
state_pathzPath | Noner	   z
str | Noner   )r   s   "r   r   r   n  s   € ÷ Gñ G¨;ð GÀ*ñ Gr   c                óN  €  ^ RI HpHp V! V 4      ;'       g    / pVP                  R4      R9   d   R# V! V4      '       g   R# VP                  R4      p\        T\        4      '       d   T'       d   \        T4      # R#   \        \
        \        \        \        3 d     R# i ; i)z¸The guard refusal a LIVE standalone gateway published in its ``gateway_state.json`` (this
home's, or *state_path*), else ``None``. A stopped, failed or dead record's reason is history.)Úread_runtime_statusÚruntime_status_pid_is_liveÚgateway_stateNr¸   )NÚstoppedÚstartup_failed)r¹   rÐ   rÑ   r   rš   Ú
ValueErrorÚ	TypeErrorÚAttributeErrorÚOverflowErrorr   r   )rÎ   rÐ   rÑ   ÚrecordrC   s   &    r   Úrecorded_standalone_reasonrÚ   n  sŽ   € ðßRÙ$ ZÓ0×6Ð6°BˆØ�:‰:�oÓ&Ð*MÔMÙñ *¨&×1Ò1ÙØ—‘Ð9Ó:ˆô
 % V¬S×1Ò1·fŒ3ˆv‹;ÐFÀ$ÐFøô ”Z¤¬N¼MÐJô Úðús!   ‚B  ™B  ´B  ÁB  Â  B$Â#B$c               ó   € V ^8„  d   QhRR/# r’   r   )r   s   "r   r   r   ‚  s   € ÷ Oñ O¨9ñ Or   c                 óV   € \        4       p V '       g   . # \        \        RRV 4      4      # )z§Same box, rebuilt from the live gateway's ``gateway_state.json`` for processes that did not
make the decision (``hermes update``'s summary, ``hermes gateway status``).FrT   )rÚ   rÃ   r?   )rC   s    r   Ú!recorded_standalone_warning_linesrÝ   ‚  s)   € ô (Ó)€FßØˆ	Ü#Ô$5°e¸WÀfÓ$MÓNÐNr   r¡   )+Ú__conditional_annotations__Ú__doc__Ú
__future__r   ÚloggingÚdataclassesr   Úpathlibr   Útypingr   Ú	getLoggerrD   rŠ   ro   rU   ÚAUTO_MIGRATION_OPTED_OUT_REASONÚSTANDALONE_DEPRECATION_NOTICErˆ   r†   r&   r)   r0   r<   r?   rQ   rW   rx   r{   r�   r–   rœ   r•   r°   r±   rH   r»   r¿   rÄ   rÉ   rÃ   rÚ   rÝ   )rÞ   s   @r   Ú<module>rè      sù   øðôõ$ #ã Ý !Ý Ý à	×	Ò	˜8Ó	$€àHÐ ØjÐ ðFð  ðpð ð,ð ð 7Ð õõ4#õH÷+ñ( �$Ô÷ð ó ðõ`õHõ'õT%÷
õ:4÷
*õ+õðB .0Ð Ð*Ó /õOõ(9õ+õ(j÷÷4G÷(Or   