+
    .pÐj—w  ã                  óö   € 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 ^ RIHt ^ RIHt ]P                   ! ]4      tRtRtRtR	 R
 lt ! R R4      tR R ltR tR tRR ltR R ltR tR tR tR# )aÎ  Hot-serve for ``gateway.multiplex_profiles``: keep the served-profile set in step with ``profiles/``
while the multiplexer runs, instead of snapshotting it once at boot.

Three things were start-time snapshots: the secondary adapter set (``_start_secondary_profile_adapters``),
the ``served_profiles`` record in ``gateway_state.json`` (``_record_served_profiles``) and the cron
ticker's ``profile_homes`` list. Everything else (``/p/<profile>/`` prefixes, profile-route eligibility,
handoff/kanban watchers, shared ingress) already reads ``profiles_to_serve()`` / ``_profile_adapters``
live, so reconciling those three is enough for a profile created after boot to be served.

``reconcile_served_profiles`` runs on the loop under one lock, triggered by the ``rescan-profiles`` control
verb (``hermes_cli/profiles.py`` create/delete fire it through the control socket) and by the supervised
``_profile_reconcile_watcher`` every ``_PROFILE_RESCAN_INTERVAL_SECS`` as the safety net. A served profile whose ``config.yaml``/``.env``
changed since its adapters were last built is re-scanned too: creators make the profile first and add the
bot token afterwards, and without this an adapter-less profile would stay adapter-less forever.
)ÚannotationsN)ÚPath)ÚAnyÚDictÚOptional)Ú_log_suppressed)Úfile_signatureg      >@ç      @c               ó    € V ^8„  d   QhRRRR/# )é   Úhomer   ÚreturnÚtuple© )Úformats   "Ú,/opt/hermes/gateway/run_profile_reconcile.pyÚ__annotate__r   %   s   € ÷ 	ñ 	 $ð 	¨5ñ 	ó    c                óþ   € . p\          FD  p \        P                  ! \        V 4      V,          4      pVP	                  \        V4      4       KF  	  \        V4      #   \         d    TP	                  R4        Kr  i ; i)zYCheap change detector for a served profile's credentials/config: file signature per file.N)Ú_PROFILE_SIGNATURE_FILESÚosÚstatr   Úappendr   ÚOSErrorr   )r   ÚsigÚnameÚsts   &   r   Úprofile_serve_signaturer   %   sg   € à
€Cß(ˆð	Ü—’œ˜d› dÕ*Ó+ˆBØ�J‰J”~ bÓ)Ö*ñ )ô �‹:Ðøô ô 	Ø�J‰J�t×ð	ús   �A AÁA<Á;A<c                  óÖ   € ] tR t^1t$ Rt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tR R lt]3R R lltRR/R R lltR tR R ltR R ltR R ltRtR# ) ÚGatewayProfileReconcileMixinzbRuntime reconciliation of the multiplexed served-profile set (hot add / unroute / credential-add).NzOptional[dict[str, Path]]Ú_served_profile_homeszOptional[dict[str, tuple]]Ú_served_profile_signatureszOptional[asyncio.Lock]Ú_profile_reconcile_lockzOptional[set[str]]Ú_profile_own_gateway_warnedÚ_profile_probe_timeout_warnedc               ó   € V ^8„  d   QhRR/# )r   r   zasyncio.Lockr   )r   s   "r   r   Ú)GatewayProfileReconcileMixin.__annotate__<   s   € ÷ ,ñ , ñ ,r   c                	ój   € V P                   f   \        P                  ! 4       V n         V P                   # ©N)r"   ÚasyncioÚLock)Úselfs   &r   Ú_reconcile_lockÚ,GatewayProfileReconcileMixin._reconcile_lock<   s(   € Ø×'Ñ'Ò/Ü+2¯<ª<«>ˆDÔ(Ø×+Ñ+Ð+r   c               ó   € V ^8„  d   QhRR/# )r   r   Úlistr   )r   s   "r   r   r&   A   s   € ÷ lñ l dñ lr   c                óº   a€ V P                   ;'       g    / p\        V RR4      ;'       g    RoSV9   g	   V'       g   S.M. \        V3R lV 4       4      ,           # )zUProfiles this multiplexer currently serves (active first), from the live bookkeeping.Ú_primary_profile_nameNÚdefaultc              3  ó8   <"  € T F  qS8w  g   K  Vx € K  	  R # 5ir(   r   )Ú.0ÚnÚactives   & €r   Ú	<genexpr>ÚDGatewayProfileReconcileMixin.served_profile_names.<locals>.<genexpr>E   s   øé € ÐJkÑV[ÐQRÐdjÑ_jÏ1Ê1ÓV[ùs   ƒ�
)r    ÚgetattrÚsorted)r+   Úhomesr6   s   & @r   Úserved_profile_namesÚ1GatewayProfileReconcileMixin.served_profile_namesA   sP   ø€ à×*Ñ*×0Ð0¨bˆÜ˜Ð6¸Ó=×JÐJÀˆØ" eœO·5�‘¸bÄFÔJkÑV[ÓJkÓDkÕkÐkr   c               ó   € V ^8„  d   QhRR/# ©r   r   ÚNoner   )r   s   "r   r   r&   G   s   € ÷ Lñ L°dñ Lr   c                ól  € V UUu/ uF  w  r#\        V4      \        V4      bK  	  pppW@n        \        V P                  \
        4      '       d   V P                  M/ pVP                  4        UUu/ uF)  w  r#Y%P                  V4      ;'       g    \        V4      bK+  	  uppV n        R# u uppi u uppi )zYCalled by ``_record_served_profiles``: remember the served set and each home's signature.N)	Ústrr   r    Ú
isinstancer!   ÚdictÚitemsÚgetr   )r+   Úprofile_homesr   r   r;   Úsigss   &&    r   Ú_note_served_profilesÚ2GatewayProfileReconcileMixin._note_served_profilesG   sœ   € á9FÔG¹©:¨4”�T“œD ›JÒ&¹ˆÑGØ%*Ô"Ü2<¸T×=\Ñ=\Ô^b×2cÒ2cˆt×.Ò.Ðikˆà=B¿[¹[¼]ô+LÙ=J©z¨tð ,0·±¸$³×1`Ð1`ÔCZÐ[_ÓC`Ò+`Ù=Jò+LˆÖ'ùó Hùó+Ls   † B*Á0B0ÂB0c               ó    € V ^8„  d   QhRRRR/# )r   ÚintervalÚfloatr   r@   r   )r   s   "r   r   r&   Q   s   € ÷ fñ f¸ð fÐcgñ fr   c              ƒ  ó„  "  € V P                  4       '       g   R# V P                  '       dP   \        P                  ! V4      G Rj  x€L
  V P                  '       g   R#  V P	                  RR7      G Rj  x€L
  Ka  R#  L7 L
  \        P
                   d    h \         d    \        P                  RRR7        K¡  i ; i5i)zÀSupervised safety net: rescan ``profiles/`` every ``interval`` seconds (creators signal the
control socket for an immediate rescan). Returns at once, never respawned, when multiplexing is off.NÚwatcher©Úreasonz4Served-profile reconcile failed; retrying next cycleT©Úexc_info)	Ú_multiplex_onÚ_runningr)   ÚsleepÚreconcile_served_profilesÚCancelledErrorÚ	ExceptionÚloggerÚwarning)r+   rL   s   &&r   Ú_profile_reconcile_watcherÚ7GatewayProfileReconcileMixin._profile_reconcile_watcherQ   sž   é € ð ×!Ñ!×#Ò#ÙØ�m�mˆmÜ—-’- Ó)×)Ð)Ø—=—=�=ÙðfØ×4Ñ4¸IÐ4ÓF×FÒFñ Ù)ñ GøÜ×)Ñ)ô ØÜô fÜ—‘ÐUÐ`d�×eðfüsX   ‚*C ­C ÁA>ÁC ÁC Á B Á5B Á6B Á:C Â B ÂB=Â!B=Â9C Â<B=Â=C rQ   Úrequestc               ó    € V ^8„  d   QhRRRR/# )r   rQ   rB   r   zdict[str, Any]r   )r   s   "r   r   r&   c   s   € ÷ 9fñ 9f¸ð 9fÈ^ñ 9fr   c          
   ƒ  óÚ  "  € ^ RI Hp R. R. R. RV/pV P                  4       '       g   / VCRRRV P                  4       /C# V P                  '       d   V P
                  f   / VCR
RRV P                  4       /C# V P                  4       ;_uu_4       GR	j  x€L
  \        V RR	4      ;'       g    RpV! V P                  4       UUu/ uF  w  rV\        V4      \        V4      bK  	  ppp\        V P
                  ;'       g    / 4      p^ RIHp	 \        4       p
\        4       pV P                  ;'       g    \        4       pV P                   ;'       g    \        4       p\#        V4       F�  pWT8X  g   WX9   d   K   \$        P&                  ! V P)                  W—V,          4      \*        R7      G R	j  x€L
 pTf   KR  T
P/                  T4       Y\9  d   \0        P5                  RT4       Yu Kƒ  	  W n        W°n        V P6                  ;'       g    / pV Uu. uF  pVV9  g   K  VV8w  g   K  VNK  	  ppV Uu. uF  pVV9  g   K  VV8w  g   K  VNK  	  ppV Uu. uFH  pVV9   g   K  VV8w  g   K  VV9  g   K  \9        VV,          4      VP;                  V4      8w  g   KF  VNKJ  	  ppV P=                  VVVVVR7      G R	j  x€L
 uuR	R	R	4      GR	j  x€L
  #  ELEu uppi  EL3  \,         dH    TP/                  T4       Y]9   d   \0        P2                  M\0        P4                  pT! RT4       Yu  EKÎ  i ; iu upi u upi u upi  L† Lw  + GR	j  x€L 
 '       g   i     R	# ; i5i)a  Diff ``profiles/`` against the served set: start adapters for new profiles, tear down and
unroute deleted ones, (re)build adapters for served profiles whose config/.env changed. Other
profiles' adapters are never touched. Returns ``{"added", "removed", "rescanned", "served_profiles"}``.)Ú_multiplex_profile_homesÚaddedÚremovedÚ	rescannedrQ   Ú	multiplexFÚserved_profilesNÚpendingTr1   r2   )Úlive_gateway_pid_for_home©ÚtimeoutzS[MULTIPLEX] Own-gateway probe for profile '%s' timed out; not serving it this cyclezc[MULTIPLEX] Profile '%s' still runs its own gateway; stop it before the host can serve this profilerP   )Úgateway.runra   rT   r<   rU   r    r,   r9   ÚconfigrB   r   rD   Úgateway.statusrh   Úsetr#   r$   r/   r)   Úwait_forÚ_run_housekeeping_in_executorÚ_OWN_GATEWAY_PROBE_TIMEOUT_SECSÚTimeoutErrorÚaddrZ   Údebugr[   r!   r   rF   Ú_apply_profile_changes)r+   rQ   ra   Úresultr6   r   r   ÚcurrentÚknownrh   ÚblockedÚ	timed_outÚwarnedÚtimeout_warnedÚpidÚlogrH   r5   rb   rc   Úchangeds   &$                   r   rW   Ú6GatewayProfileReconcileMixin.reconcile_served_profilesc   s  é € õ 	9Ø")¨2¨y¸"¸kÈ2ÈxÐY_Ð!`ˆØ×!Ñ!×#Ò#Øa�fÐa˜k¨5Ð2CÀT×E^ÑE^ÓE`ÑaÐaØ�}�}ˆ} × :Ñ :Ò Bà^�fÐ^˜i¨Ð/@À$×B[ÑB[ÓB]Ñ^Ð^Ø×'Ñ'×)×)Õ)Ü˜TÐ#:¸DÓA×NÐNÀYˆFÙ?WÐX\×XcÑXcÔ?dÔeÑ?d±°”s˜4“y¤$ t£*Ò,Ñ?dˆGÑeÜ˜×3Ñ3×9Ð9°rÓ:ˆEÝ@ä“eˆGÜ›ˆIØ×5Ñ5×>Ð>¼»ˆFØ!×?Ñ?×HÐHÄ3Ã5ˆNÜ˜Wž�Ø”> T¤]ÙðÜ '× 0Ò 0Ø×:Ñ:Ð;TÐ^bÕVcÓdÜ ?ô!A÷ A�Cð ”?Ø—K‘K Ô%ØÔ)ÜŸ™ð (XØY]ô_àšñ9 &ð: 07Ô,Ø1:Ô.Ø×2Ñ2×8Ð8°bˆDÙ 'ÓJ¡˜1¨1°E©>”Q¸aÀ6¹k—Q�Q¡ˆEÐJÙ"'ÓL¡%˜Q¨1°GÑ+;”qÀÀVÁ—q�q¡%ˆGÐLÙ")ó O¡'˜Q¨Q°%©Z”q¸AÀ¹K”qÈAÐUZÉN”qÜ2°7¸1µ:Ó>À$Ç(Á(È1Ã+ÑM÷ �q¡'ˆGð Oà×4Ñ4°W¸eÀWÈgÐ^dÐ4Óe×e÷] *×)Õ)ùãeò$Aøô $ô 	ð —M‘M $Ô'Ø*.Ô*@œ&Ÿ,š,ÄfÇnÁn�CÙð 4Ø59ô;à˜Ûð	üò& KùÚLùòOáe÷] *×)×)Ó)üs  ‚AM+ÁAM+ÂKÂM+Â-MÃ K
Ã&MÄ3MÄ5MÅ'MÅ;5K&Æ0K#
Æ1K&Æ5MÆ;AMÈMÈ	L;È"L;È+L;È1MÈ7	M ÉM ÉM ÉMÉ	MÉ(MÉ1MÉ:#MÊ"MÊ(MËM
ËMËM+ËMËM+ËMË#K&Ë&AL8	Ì3MÌ7L8	Ì8MÍM+ÍM(	ÍMÍ
M(	Í M(	Í"	M+c             ƒ  óv  "  € ^ RI HpHp \        V RR4      ;'       g    RpR. R. R. RV/p	V'       g'   V'       g   V'       g   / V	CR	V P	                  4       /C# V FE  p
V P                  W P                  V
,          4      G Rj  x€L
  V	R,          P                  V
4       KG  	  V P                  ;'       g    / pV P                  V4      p\        4       pW$,            FŸ  p
\        W,          4      p V P                  W¡V
,          V4      G Rj  x€L
 pWëV
&   W¢9   d2   \        P#                  RW¯V4       V	R,          P                  V
4       Kq  \        P#                  RW¯4       V	R,          P                  V
4       K¡  	  W°n        V! V P$                  4       U
Uu0 uF  w  p
p\'        V
4      kK  	  pp
pV Uu. uF  pVV9  g   K  VV8w  g   K  VNK  	  up F]  p
V P                  W¡P)                  V
4      4      G Rj  x€L
  V	R,          P                  V
4       V Uu. uF  pVV
8w  g   K  VNK  	  ppK_  	  V P+                  V\-        VP/                  4       4      4       V Fv  p
\1        V P                  \2        4      '       d   V P                  P)                  V
R4       \        V RR4      p\1        V\2        4      '       g   Kd  VP)                  V
R4       Kx  	  V'       d3   T P5                  V Uu. uF  pVVV,          3NK  	  up4      G Rj  x€L
  V P	                  4       V	R	&   V	#  EL« EL#  T d)   p\        P                  R
T
T4       ^ pYëT
&    Rp?ELGRp?i\         d0    \        P                  RT
RR7       ^ pTP!                  T
4        ELƒi ; iu upp
i u upi  ELªu upi u upi  L¡5i)zXApply a selected diff under the reconcile lock, shared by the watcher and control verbs.)ÚMultiplexConfigErrorra   r1   Nr2   rb   rc   rd   rQ   rf   z'[MULTIPLEX] Profile '%s' not served: %sz5[MULTIPLEX] Failed to start adapters for profile '%s'TrR   zB[MULTIPLEX] Now serving profile '%s' (%s adapter(s) connected; %s)zV[MULTIPLEX] Re-scanned profile '%s' after config/.env change (%s adapter(s) connected)Ú_profile_configs)rk   r‚   ra   r9   r<   Ú_unserve_profiler    r   r!   Ú_live_resource_claimsrn   r   Ú_start_one_profile_adaptersrZ   ÚerrorrY   rs   Úinforl   rB   ÚpopÚ_record_served_profilesr/   rE   rC   rD   Ú_after_profiles_added)r+   rw   rb   rc   r   rQ   r‚   ra   r6   rv   r   rH   ÚclaimedÚtransient_failedÚscan_signatureÚ	connectedÚexcÚ_homeÚlive_nowr5   Úconfigss   &&&&&$               r   ru   Ú3GatewayProfileReconcileMixin._apply_profile_changesž   sB  é € çNÜ˜Ð6¸Ó=×JÐJÀˆØ˜2˜y¨"¨k¸2¸xÈÐPˆßŸ§GØM�fÐMÐ/°×1JÑ1JÓ1LÑMÐMÛˆDØ×'Ñ'¨×.HÑ.HÈÕ.NÓO×OÐOØ�9Õ×$Ñ$ TÖ*ñ ð ×.Ñ.×4Ð4°"ˆØ×,Ñ,¨VÓ4ˆÜ›5ÐØ—O�OˆDô 5°Wµ]ÓCˆNð,Ø"&×"BÑ"BÀ4ÐQUÍÐX_Ó"`×`�	ð ,�T‘
ØŒ}Ü—‘Ð`ÐbfÐsyÔzØ�w•×&Ñ& tÖ,ä—‘ÐtÐvzô  GØ�{Õ#×*Ñ*¨4Ö0ñ+ $ð, +/Ô'á1IÈ$Ï+É+Ô1VÔWÑ1V¡+ $¨”C˜–IÑ1VˆÑWÙ 'ÓM¡˜1¨1°HÑ+<”QÀÀfÁ—Q�Q¡ÔMˆDØ×'Ñ'¨¯k©k¸$Ó.?Ó@×@Ð@Ø�9Õ×$Ñ$ TÔ*Ù %Ó3¡˜1¨¨d©—Q�Q¡ˆEÐ3‰Eñ Nð 	×$Ñ$ V¬T°'·-±-³/Ó-BÔCã$ˆDÜ˜$×9Ñ9¼4×@Ò@Ø×/Ñ/×3Ñ3°D¸$Ô?Ü˜dÐ$6¸Ó=ˆGÜ˜'¤4×(Ô(Ø—‘˜D $Ö'ñ %÷ Ø×,Ñ,ÁuÓ-MÁuÀ!¨q°'¸!µ*«oÁuÑ-MÓN×NÐNØ$(×$=Ñ$=Ó$?ˆÐ Ñ!Øˆò[ Pò aøØ'ô ,Ü—‘ÐFÈÈcÔRØ�	Ø+�T—
ûÜô +Ü—‘ÐTÐVZÐei�ÔjØ�	Ø ×$Ñ$ T×*ð+üó XùÚMÚ@ùâ3ùò .NÑNùsä   ‚1N9´N9¼N9ÁA N9ÂL/Â2N9Â8:N9Ã3L5ÄL2ÄL5ÄBN9ÆNÆ3N9Æ:	N%ÇN%ÇN%Ç)N9È N*È N9È!	N-È/N-È5BN9Ë
N9Ë(N9Ë7N2Ì
N9ÌN7ÌN9Ì2L5Ì5NÌ<MÍN9ÍNÍ,,NÎN9ÎNÎN9Î-N9c               ó    € V ^8„  d   QhRRRR/# )r   r6   rB   r   zdict[tuple, str]r   )r   s   "r   r   r&   Õ   s   € ÷ ñ ¨Cð Ð4Dñ r   c                ó.  € V P                  V4      p\        V RR4      ;'       g    / P                  4        FZ  w  r4\        VP                  4       4       F8  w  rVV P	                  WV4      V P                  WV4      3 F  pVf   K	  W2V&   K  	  K:  	  K\  	  V# )zÆStartup's ``claimed`` map rebuilt from what is live now: primary claims plus every connected
secondary's credential/listener, so a hot-added profile reusing a token is parked, never a
second poller.Ú_profile_adaptersN)Ú_primary_resource_claimsr9   rE   r/   Ú_adapter_credential_claimÚ_adapter_listener_claim)r+   r6   rŒ   Úprofile_nameÚadaptersÚplatformÚadapterÚclaims   &&      r   r…   Ú2GatewayProfileReconcileMixin._live_resource_claimsÕ   s•   € ð ×/Ñ/°Ó7ˆÜ'.¨tÐ5HÈ$Ó'O×'UÐ'UÐSU×&\Ñ&\Ö&^Ñ"ˆLÜ%)¨(¯.©.Ó*:Ö%;Ñ!�Ø"×<Ñ<¸XÓOØ"×:Ñ:¸8ÓMóO�EàÔ(Ø)5 ›óOó &<ñ '_ð ˆr   c               ó   € V ^8„  d   QhRR/# r?   r   )r   s   "r   r   r&   â   s   € ÷ jñ j¸Dñ jr   c           
   ƒ  ó–  "  € ^ RI HpHp ^ RIHp \        \        P                  RRR7      ;_uu_ 4        V! V P                  4       RRR4       ^ RI	H
p \        P                  ! 4       pV Fp  w  rx ^ RIHp	 V! \        V4      4      ;_uu_ 4        V! 4       ;_uu_ 4        VP!                  RV! 4       P"                  V	4      G Rj  x€L
  RRR4       RRR4       Kr  	  R#   + '       g   i     L£; i L-  + '       g   i     L3; i  + '       g   i     K¯  ; i  \$         d    \&        P)                  R	TRR7        KØ  i ; i5i)
z\Per-profile startup side effects for hot-added profiles: log routing + scoped MCP discovery.)Ú_enable_multiplex_log_routingÚ_profile_runtime_scope)Úcopy_contextzlog routing refresh failedTrR   N©Úsuppress_interactive_oauth)Údiscover_mcp_toolsz*MCP tool discovery failed for profile '%s')rk   r£   r¤   Úcontextvarsr¥   r   ÚloggingÚDEBUGrl   Útools.mcp_oauthr§   r)   Úget_running_loopÚtools.mcp_tool_discoveryr¨   r   Úrun_in_executorÚrunrY   rZ   r[   )
r+   rG   r£   r¤   r¥   r§   Úloopr›   Úprofile_homer¨   s
   &&        r   r‹   Ú2GatewayProfileReconcileMixin._after_profiles_addedâ   sè   é € çUÝ,ÜœWŸ]™]Ð,HÐSW×XÖXÙ)¨$¯+©+Ô6÷ Yå>Ü×'Ò'Ó)ˆÛ*7Ñ&ˆLðjÝGÙ+¬D°Ó,>×?Õ?ÑA[×A]ÕA]Ø×.Ñ.¨t±\³^×5GÑ5GÐI[Ó\×\Ð\÷ B^×?Ñ?ó +8÷	 Y×Xúñ ]÷ B^×A]ú×?×?Ð?ûäô jÜ—‘ÐKÈ\Ðdh�×iðjüsŽ   ‚3E	µC#Á*E	Á3DÂDÂ"&C8ÃC6Ã	C8ÃDÃDÃE	Ã#C3	Ã.E	Ã6C8Ã8DÄDÄDÄDÄE	ÄDÄ#EÅE	ÅEÅE	c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   rB   r   r   r   r@   r   )r   s   "r   r   r&   ò   s+   € ÷ Ayñ Ay¨3ð Ay°dð Ay¸tñ Ayr   c           
   ƒ  ó¨	  "  € ^ RI HpHp \        V RR4      ;'       g    / P	                  VR4      ;'       g    / pVP                  4        Uu. uF?  p\        V\        P                  4      '       g   K%  VP                  4       '       d   K=  VNKA  	  ppV F  pVP                  4        K  	  V'       d.   \        P                  ! WpP                  4       R7      G Rj  x€L
  V! \        V4      RR7      ;_uu_ 4        \        V RR4      ;'       g    / P	                  VR4      ;'       g    / p	\        V	P                  4       4       F   w  r«V P!                  WºVR7      G Rj  x€L
  K"  	  V! VR	7       R F9  p\        WR4      p\        V\"        4      '       g   K'  VP	                  VR4       K;  	  \        V P$                  \"        4      '       d   V P$                  P	                  VR4       \        V P&                  \"        4      '       d   V P&                  P	                  VR4       ^ R
IHp V! V4      R,           p\        V RR4      p\        T;'       g    / 4       Uu. uF'  p\-        V4      P/                  V4      '       g   K%  VNK)  	  up FB  p\1        \2        P4                  RVRR7      ;_uu_ 4        V P7                  V4       RRR4       KD  	  \1        \2        P4                  RRR7      ;_uu_ 4        ^ RIHp V! V4       RRR4       \1        \2        P4                  RRR7      ;_uu_ 4        ^ RIHp V! RR4      P@                  PC                  V4       RRR4       \1        \2        P4                  RRR7      ;_uu_ 4        ^ RI"H#p ^ RI$H%p \        PL                  ! VV! V4      R7      G Rj  x€L
  RRR4       \1        \2        P4                  RRR7      ;_uu_ 4        ^ RI'H(p \        PL                  ! VV4      G Rj  x€L
  RRR4       \R        PU                  RV\W        V	4      4       RRR4       R# u upi  ELn ELëu upi   + '       g   i     EKÓ  ; i  + '       g   i     ELf; i  + '       g   i     EL%; i LÕ  + '       g   i     LÛ; i L˜  + '       g   i     Lž; i  + '       g   i     R# ; i5i)uê  Stop and unroute one profile: cancel its reconnects, tear down its adapters, drop its
bookkeeping and release this process's handles into its home so the deleter's rmtree succeeds.
The releasing process is not always the deleter (#130244): under multiplexing THIS gateway
process routes the profile's logs and owns its scoped MCP servers, so both must be released
here too or the deleter's rmtree still fails on ``logs/.__agent.lock`` / ``mcp-stderr.log``.

The whole teardown runs inside the removed profile's own runtime scope: adapter disconnect
hooks, the agent-cache eviction (provider/memory shutdown) and the state/memory handle
release all read config and credentials at call time, and this coroutine runs on the
reconcile task with no profile bound â€” unscoped they resolved against the LAUNCH home, so a
teardown hook needing this profile's credential failed closed (or, worse, borrowed the launch
profile's). Secrets are not re-hydrated: teardown must not block the loop on a source fetch.
)r¤   Ú_write_runtime_status_quietÚ_profile_failed_platformsNri   F)Úhydrate_secretsr—   )Úprofile)Údrop_profile_platforms)Ú_session_key_namespaceÚ:Ú_agent_cachezagent eviction failed for %sTrR   zprofile handle release failed)Úclose_all_underzmemory-store release failed)Úimport_provider_moduleÚholographicÚstorezscoped MCP shutdown failed)Úhermes_home_key)Úshutdown_mcp_servers)Úscopez"profile log handler release failed)Úrelease_profile_log_handlersuH   [MULTIPLEX] Profile '%s' unserved â€” %d adapter(s) stopped and unrouted)Úpairing_storesÚ_busy_text_modes_by_profileÚ_busy_input_modes_by_profileÚ_busy_text_timing_by_profileÚ_human_delay_by_profilerƒ   ),rk   r¤   r¶   r9   r‰   ÚvaluesrC   r)   ÚTaskÚdoneÚcancelÚwaitÚ _adapter_disconnect_timeout_secsr   r/   rE   Ú_bounded_adapter_teardownrD   r    r!   Úgateway.sessionr»   rB   Ú
startswithr   rª   r«   Ú_evict_cached_agentÚhermes_state_registryr¾   Úplugins.memoryr¿   ÚMemoryStoreÚrelease_all_underÚhermes_constantsrÂ   Útools.mcp_tool_lifecyclerÃ   Ú	to_threadÚhermes_loggingrÅ   rZ   rˆ   Úlen)r+   r   r   r¤   r¶   rg   ÚtÚtasksÚtaskrœ   r�   rž   ÚattrrÁ   r»   ÚprefixÚcacheÚkÚkeyr¾   r¿   rÂ   rÃ   rÅ   s   &&&                     r   r„   Ú-GatewayProfileReconcileMixin._unserve_profileò   s˜  é € ÷ 	TÜ˜4Ð!<¸dÓC×IÐIÀr×NÑNÈtÐUYÓZ×`Ð`Ð^`ˆØ#ŸN™NÔ,Ó]Ñ,�q´
¸1¼g¿l¹l×0K”ÐTU×TZÑTZ×T\—�Ñ,ˆÐ]ÛˆDØ�K‰KŽMñ çÜ—,’,˜u×.SÑ.SÓ.UÔV×VÐVÙ#¤D¨£JÀ×FÖFÜ Ð&9¸4Ó@×FÐFÀB×KÑKÈDÐRVÓW×]Ð]Ð[]ˆHÜ%)¨(¯.©.Ó*:Ö%;Ñ!�Ø×4Ñ4°WÐPTÐ4ÓU×UÒUñ &<ñ (¸tÕDóh�ä ¨DÓ1�Ü˜e¤T×*Ô*Ø—I‘I˜d DÖ)ñ	hô
 ˜$×4Ñ4´d×;Ò;Ø×*Ñ*×.Ñ.¨t°TÔ:Ü˜$×9Ñ9¼4×@Ò@Ø×/Ñ/×3Ñ3°D¸$Ô?Ý>Ù+¨DÓ1°CÕ7ˆFÜ˜D .°$Ó7ˆEÜ#'¨¯¨°Ô#4ÓRÑ#4˜a¼¸A»×8IÑ8IÈ&×8QŸ˜Ñ#4ÔR�Ü$¤W§]¡]Ð4RÐTWÐbf×gÖgØ×,Ñ,¨SÔ1÷ hÑgñ Sô !¤§¡Ð0OÐZ^×_Ö_ÝAÙ Ô%÷ `ô !¤§¡Ð0MÐX\×]Ö]ÝAÙ& }°gÓ>×JÑJ×\Ñ\Ð]aÔb÷ ^ô !¤§¡Ð0LÐW[×\Ö\Ý<ÝIÜ×'Ò'Ð(<ÁOÐTXÓDYÔZ×ZÐZ÷ ]ô !¤§¡Ð0TÐ_c×dÖdÝGÜ×'Ò'Ð(DÀdÓK×KÐK÷ eô �K‰KÐbÐdhÔjmÐnvÓjwÔx÷Y GÑFùò ^ò Wò Vùò Sßg×gÑgúç_×_Ð_ú÷ ^×]Ð]úñ  [÷ ]×\úñ L÷ e×dú÷S G×FÐFüs%  ‚6S¹SÁ"QÁ5QÂQÂ"SÂ6(SÃQÃSÃ>.R>Ä-7R>Å$Q
Å%5R>ÆB=R>É	R>É&"QÊQÊ+R>Ê>QË0R>Ì Q,	Ì,R>Ì;)R 	Í$,R>Î.R	Î>RÎ?R	Ï,R>Ï/!R+	ÐR)ÐR+	Ð(R>Ð=SÑR>ÑR>ÑQ)Ñ"
R>Ñ,Q=Ñ7	R>Ò RÒ	R>ÒR	ÒR&Ò!R>Ò)R+	Ò+R;Ò6R>Ò>S	Ó		S)r#   r$   r"   r    r!   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r    Ú__annotations__r!   r"   r#   r$   r,   r<   rI   Ú_PROFILE_RESCAN_INTERVAL_SECSr\   rW   ru   r…   r‹   r„   Ú__static_attributes__r   r   r   r   r   1   s�   ‡ Ùlà7;ÐÐ4Ó;Ø=AÐÐ :ÓAØ6:ÐÐ3Ó:Ø6:ÐÐ!3Ó:Ø8<Ð!Ð#5Ó<õ,õ
lõLð B_÷ fð$9f¸y÷ 9fòv5õnõj÷ Ayñ Ayr   r   c               ó   € V ^8„  d   QhRR/# )r   ÚserveÚboolr   )r   s   "r   r   r   6  s   € ÷ +ñ +¨dñ +r   c               óV   a aaa€ \         P                  ! 4       oV V3R loVVV 3R lpV# )zMBuild on the owning loop; socket handlers themselves run on executor threads.c           
   “  ó8  <"  € ^ RI HpHp SP                  4       '       d!   SP                  '       d   SP
                  f   RR/# SP                  4       ;_uu_4       GRj  x€L
  \        SRR4      ;'       g    Rp\        V \        4      '       d   V '       d   W8X  d   RR/uuRRR4      GRj  x€L
  # \        SP
                  4      pS'       g˜   W9  d   RRV  R	2/uuRRR4      GRj  x€L
  # SP                  WP                  V 4      4      G Rj  x€L
  SP                  V\        VP                  4       4      4       R
V RSP!                  4       /uuRRR4      GRj  x€L
  # \        V! RRR7      4      pW9  d   RRV  R2/uuRRR4      GRj  x€L
  # V R8w  d/   V! WP,          4      '       d   RRV  R2/uuRRR4      GRj  x€L
  # W9   d   RRV  R2/uuRRR4      GRj  x€L
  # WP,          W@&   SP#                  W@.. . RR7      G Rj  x€L
 pWR,          9  d   RRV  R2/uuRRR4      GRj  x€L
  # RV RVR,          /uuRRR4      GRj  x€L
  #  EL  EL³ ELy ELS EL L× L¤ L† L_ L; L  + GRj  x€L 
 '       g   i     R# ; i5i)é    )Úprofiles_to_serveÚprofile_is_parkedNr‡   zhost multiplexer is not readyr1   r2   z%a non-launch profile name is requiredz	profile 'z' is not servedÚunservedrf   T)Úinclude_parkedzunknown profile 'Ú'z' is parked (gateway.parked)z' is already servedzcontrol-socketrP   z&' was removed or parked during startupÚserved)Úhermes_cli.profilesrõ   rö   rT   rU   r    r,   r9   rC   rB   rD   r„   r‰   rŠ   r/   rE   r<   ru   )	r   rõ   rö   r6   rx   Ú	installedrv   Úrunnerrð   s	   &      €€r   ÚapplyÚ&_profile_lifecycle_verb.<locals>.apply:  s?  øé € ßLØ×#Ñ#×%Ò%¨V¯_¯_¨_À×@\Ñ@\Ò@dØÐ<Ð=Ð=Ø×)Ñ)×+×+Õ+Ü˜VÐ%<¸dÓC×PÐPÀyˆFÜ˜d¤C×(Ò(·¸¼ØÐ!HÐI÷ ,×+Ò+ô ˜×5Ñ5Ó6ˆEßØÔ$Ø# y°°°oÐ%FÐG÷ ,×+Ò+ð ×-Ñ-¨d·I±I¸d³OÓD×DÐDØ×.Ñ.¨v´t¸E¿K¹K»MÓ7JÔKØ" DÐ*;¸V×=XÑ=XÓ=ZÐ[÷ ,×+Ò+ô Ñ.¨tÀDÔIÓJˆIØÔ$ØÐ#4°T°F¸!Ð!<Ð=÷ ,×+Ò+ð �yÔ Ñ%6°yµ×%GÒ%GØ 9¨T¨FÐ2NÐ!OÐP÷ ,×+Ò+ð  Œ}Ø 9¨T¨FÐ2EÐ!FÐG÷# ,×+Ò+ð$ $�/ˆE‰KØ!×8Ñ8¸ÀÈÈBÐWgÐ8Óh×hˆFØÐ"3Õ4Ô4Ø 9¨T¨FÐ2XÐ!YÐZ÷+ ,×+Ò+ð, ˜dÐ$5°vÐ>OÕ7PÐQ÷- ,×+×+Ó+ò E÷ ,Ð+ñ& i÷' ,×+×+Õ+üsO  ƒ0J´.JÁ"I"Á#JÁ&5I=Â	I=Â%JÂ2I%Â3JÂ8*I=Ã"JÃ/I(Ã0JÃ5#I=ÄI+ÄA I=ÅJÅ&I.Å'JÅ, I=ÆJÆI1ÆJÆ"I=ÇJÇI3ÇJÇI=Ç!JÇ.I5Ç/JÇ4#I=ÈI7ÈI=È0JÈ=I9È>JÉI=ÉJÉI;ÉJÉ%JÉ(JÉ+I=É.JÉ1JÉ3JÉ5JÉ7I=É9JÉ;JÉ=J	ÊJÊ
J	ÊJ	Ê	Jc                óX  <€ \         P                  ! S! V P                  R 4      4      S4      p VP                  RR7      #   \         d    RRRSP                  4       /u # \         d>   p\        P                  RRR7       R\        T4      P                   R	T 2/u R
p?# R
p?ii ; i)r   r	   ri   rg   Trf   z Profile lifecycle request failedrR   r‡   ú: N)r)   Úrun_coroutine_threadsaferF   rv   rr   r<   rY   rZ   r[   Útyperç   )ÚparamsÚfuturer�   rþ   r±   rý   s   &  €€€r   ÚhandlerÚ(_profile_lifecycle_verb.<locals>.handlerV  s�   ø€ Ü×1Ò1±%¸¿
¹
À6Ó8JÓ2KÈTÓRˆð	=Ø—=‘=¨�=Ó-Ð-øÜô 	Wà˜tÐ%6¸×8SÑ8SÓ8UÐVÒVÜô 	=Ü�N‰NÐ=ÈˆNÔMØ¤ S£	× 2Ñ 2Ð3°2°c°UÐ;Ð<Õ<ûð	=ús)   ¯A ÁB)Á"B)Á+B)Á,2B$ÂB)Â$B))r)   r­   )rý   rð   r  rþ   r±   s   fd @@r   Ú_profile_lifecycle_verbr  6  s#   û€ ä×#Ò#Ó%€DöR÷8	=ð €Nr   c                ó   € \        V R R7      # )F©rð   ©r  ©rý   s   &r   Úunserve_profile_verbr  d  s   € Ü" 6°Ô7Ð7r   c                ó   € \        V R R7      # )Tr
  r  r  s   &r   Úserve_profile_verbr  h  s   € Ü" 6°Ô6Ð6r   c                ó<   a aa€ \        4       oR V3R lloVV 3R l# )uŽ  Housekeeping chore keeping live MCP servers in step with ``mcp_servers`` on disk, every tick
after the first (startup discovery owns that one). Reconciling on DRIFT rather than only on a
config EDIT is what brings back a server whose FIRST connect failed (#112445): it never reached
``_servers``, so the parked self-probe â€” a property of a task that connected once â€” cannot revive
it, and its config never changes. The reconcile is a cached config read plus set compares when
nothing moved; a server dropped from config is torn down (a parked one otherwise self-probes
every ``_PARKED_RETRY_INTERVAL`` for the life of the process) and a missing one is reconnected
only once its per-server connect cooldown (30sâ†’600s backoff) has lapsed, so a chronically failing
server is retried on that schedule, not every tick. Interactive OAuth is suppressed â€” this runs
on a housekeeping thread nobody is watching.c               ó    € V ^8„  d   QhRRRR/# )r   ÚlabelrB   r   r@   r   )r   s   "r   r   Ú,_mcp_config_reconciler.<locals>.__annotate__y  s   € ÷ 
Cñ 
C #ð 
C¨$ñ 
Cr   c                óB  <€ ^ RI Hp ^ RIHp V S9  d   SP	                  V 4       R# V! 4       ;_uu_ 4        V! 4       pRRR4       XR,          '       g   VR,          '       d(   \
        P                  RWR,          VR,          4       R# R#   + '       g   i     LW; i)rô   r¦   )Ú!reconcile_mcp_servers_with_configNrc   rb   z<MCP servers reconciled with config (%s): removed=%s added=%s)r¬   r§   r®   r  rs   rZ   rˆ   )r  r§   r  rv   Úprimeds   &   €r   Ú_reconcile_currentÚ2_mcp_config_reconciler.<locals>._reconcile_currenty  su   ø€ Ý>ÝNØ˜ÔØ�J‰J�uÔÙÙ'×)Õ)Ù6Ó8ˆF÷ *à�)×Ô  w§¤Ü�K‰KÐVØ iÕ0°&¸µ/öCñ !0÷ *×)ús   ·BÂB	c                 ó   <€ \        SS 4      # r(   ©Ú_for_each_served_profile)r  rý   s   €€r   Ú<lambda>Ú(_mcp_config_reconciler.<locals>.<lambda>…  s   ø€ Ô+¨FÐ4FÔGr   )rn   )rý   r  r  s   f@@r   Ú_mcp_config_reconcilerr  l  s!   ú€ ô “%€F÷
Cð 
Cõ HÐGr   c               ó   € V ^8„  d   QhRR/# r?   r   )r   s   "r   r   r   ˆ  s   € ÷ Wñ W¨dñ Wr   c                óð  € ^ RI HpHp \        V RR4      p\        VRR4      '       g2   ^ RIHp VP                  4       ;_uu_ 4        V! R4       RRR4       R# V! V4       F9  w  rg V! \        V4      4      ;_uu_ 4        V! \        V4      4       RRR4       K;  	  R#   + '       g   i     R# ; i  + '       g   i     Kd  ; i  \         d"   p\        P                  RYh4        Rp?KŽ  Rp?ii ; i)	u  Run ``body(profile_label)`` once per served profile, inside that profile's runtime scope.

Housekeeping runs on a bare thread with no turn on the stack, so nothing binds a profile for it:
``get_hermes_home()`` and ``get_secret()`` see the LAUNCH profile's values, and under
``gateway.multiplex_profiles`` a fail-closed credential read logs ``no profile secret scope on a
multiplexed call`` on every tick (the skills-sync pulls resolved Nous credentials this way, four
WARNINGs per hourly tick per chore). A single-profile gateway runs ``body`` once, unscoped:
there the process env IS the profile's own value â€” unless a hosted room already flipped the
process-wide guard (#112878), in which case the launch profile's OWN scope is bound, as
``run_turn.py::_standalone_launch_scope`` does for turns.)ra   r¤   rl   NÚmultiplex_profilesF)ÚGatewayTurnMixinr2   z'Housekeeping for profile %s skipped: %s)rk   ra   r¤   r9   Úgateway.run_turnr"  Ú_standalone_launch_scoper   rB   rY   rZ   rt   )	rý   Úbodyra   r¤   rl   r"  r›   r²   r�   s	   &&       r   r  r  ˆ  sÀ   € ÷ MÜ�V˜X tÓ,€FÜ�6Ð/°×7Ò7Ý5Ø×6Ñ6×8Õ8Ù�ŒO÷ 9áÙ&>¸vÖ&FÑ"ˆð
	WÙ'¬¨\Ó(:×;Õ;Ù”S˜Ó&Ô'÷ <Ñ;ó 'G÷ 9Ö8áú÷ <×;Ð;ûäô 	WÜ�L‰LÐBÀL×VÒVûð	WúsB   Á	B!Á(C	ÂB5ÂC	Â!B2	Â5CÃ C	ÃC	Ã	C5ÃC0Ã0C5c                ó   a a€ VV 3R l# )z¹Wrap a zero-arg housekeeping chore that reads the profile's home, config or credentials so it
runs once per served profile under that profile's scope (see ``_for_each_served_profile``).c                 ó$   <€ \        SV 3R  l4      # )c                ó   <€ S! 4       # r(   r   )Ú_labelÚchores   &€r   r  Ú8profile_scoped_chore.<locals>.<lambda>.<locals>.<lambda>©  s   ø€ Á5Ä7r   r  )r*  rý   s   €€r   r  Ú&profile_scoped_chore.<locals>.<lambda>©  s   ø€ Ô+¨FÔ4JÔKr   r   )rý   r*  s   ffr   Úprofile_scoped_chorer-  ¦  s   ù€ õ LÐKr   c                ó   a € R V 3R llpV# )aÇ  Build the ``migrate-profile-identity`` control-verb handler for ``hermes profile rename``
(#111926). The live multiplexer owns the routing index in memory and writes it back
periodically, so a CLI-side rewrite of ``agent:<old>:*`` would be clobbered on the next save;
the CLI therefore asks this process to rekey both durable stores AND ``SessionStore._entries``.
Runs on the control-socket executor thread; ``rekey_profile_routing`` takes the store lock.c               ó    € V ^8„  d   QhRRRR/# ©r   r  rD   r   r   )r   s   "r   r   Ú3migrate_profile_identity_verb.<locals>.__annotate__³  s   € ÷ ^ñ ^˜ð ^ $ñ ^r   c           	     óì  <€ \        V P                  R 4      ;'       g    R4      P                  4       \        V P                  R4      ;'       g    R4      P                  4       r!V'       d   V'       d   W8X  d   RRRR/# \        SRR4      pVf   RRRR	/# . p ^ R
IHpHp / p\        VRR4      pVe'   \        VR4      '       d   VP                  W4      VR&   \        VRR4      p	V	'       d!   \        V	4      R,          V,          R,          MRp
V
eD   V
P                  4       '       d.   V! V
4      pVP                  V4       VP                  W4      VR&   VP                  W4      pRRRVRV/V F  p V! V4       K  	  #   \         d    \        P                  RRR7        K6  i ; i  \         d{   p\        P!                  RYT4       RRR\#        T4      P$                   RT 2/u Rp?T F5  p X! T4       K    \         d    \        P                  RRR7        K3  i ; i	  # Rp?ii ; i  T F5  p X! T4       K    \         d    \        P                  RRR7        K3  i ; i	  i ; i)ÚoldÚ ÚnewÚokFr‡   z old/new required and must differÚsession_storeNú!live gateway has no session store)ÚacquireÚrelease_or_closeÚ_routing_dbÚrekey_profile_stateÚroutingÚ_routing_homeÚprofileszstate.dbr¹   TÚrekeyedÚdbz*Failed to release renamed profile state DBrR   z0Profile identity migration failed for %r->%r: %sr  )rB   rF   Ústripr9   rÕ   r9  r:  Úhasattrr<  r   Úexistsr   Úrekey_profile_routingrY   rZ   rt   r[   r  rç   )r  r3  r5  rÁ   Úacquiredr9  r:  Ú	db_countsÚ
routing_dbÚrouting_homeÚprofile_pathÚ
profile_dbr@  rA  r�   rý   s   &              €r   Ú_handlerÚ/migrate_profile_identity_verb.<locals>._handler³  s[  ø€ Ü�v—z‘z %Ó(×.Ð.¨BÓ/×5Ñ5Ó7¼¸V¿Z¹ZÈÓ=N×=TÐ=TÐRTÓ9U×9[Ñ9[Ó9]ˆSßŸ# ¤Ø˜% Ð*LÐMÐMÜ˜ °Ó6ˆØŠ=Ø˜% Ð*MÐNÐNØˆð	^ßGØ35ˆIÜ  ¨°tÓ<ˆJØÒ%¬'°*Ð>S×*TÒ*TØ'1×'EÑ'EÀcÓ'O�	˜)Ñ$Ü" 5¨/¸4Ó@ˆLßQ]œ4 Ó-°
Õ:¸SÕ@À:ÖMÐcgˆLØÒ'¨L×,?Ñ,?×,AÒ,AÙ$ \Ó2�
Ø—‘ 
Ô+Ø'1×'EÑ'EÀcÓ'O�	˜)Ñ$Ø×1Ñ1°#Ó;ˆGØ˜$ 	¨7°D¸)ÐDó
 �ð^Ù$ RÖ(ò øô !ô ^Ü—L‘LÐ!MÐX\�L×]ð^ûô ô 	JÜ�N‰NÐMÈsÐY\Ô]Ø˜% ¬T°#«Y×-?Ñ-?Ð,@ÀÀ3À%Ð*HÐIÔIã�ð^Ù$ RÖ(øÜ ô ^Ü—L‘LÐ!MÐX\�L×]ð^úò ûð		Jûó �ð^Ù$ RÖ(øÜ ô ^Ü—L‘LÐ!MÐX\�L×]ð^úò ús€   ÂBF. Ä-AF. Å8FÆ"F+Æ*F+Æ.H3Æ94H.Ç-H3Ç.H6 Ç8HÈ"H(È'H(È.H3È3H6 È6I3È=IÉI3É"I-	É)I3É,I-	É-I3r   ©rý   rL  s   f r   Úmigrate_profile_identity_verbrO  ¬  s   ø€ ÷^ð ^ð@ €Or   c                ó   a € R V 3R llpV# )u4  Build the ``purge-profile-identity`` control-verb handler for ``hermes profile delete``
(#111926, delete side). The live multiplexer owns the routing index in memory and writes it back
periodically, so a CLI-side DELETE of ``agent:<name>:*`` rows would be undone by its next save;
the CLI therefore asks this process to drop the durable rows AND ``SessionStore._entries``.

Deliberately NOT part of ``_unserve_profile()``: that path also unserves names that are still
alive elsewhere in the identity story â€” a rename's old name leaves the served set exactly like a
delete does (its directory is gone either way) â€” and purging there would race the rekey it is
supposed to leave intact. Only the delete path invokes this verb. Runs on the control-socket
executor thread; ``purge_profile_routing`` takes the store lock.c               ó    € V ^8„  d   QhRRRR/# r0  r   )r   s   "r   r   Ú1purge_profile_identity_verb.<locals>.__annotate__â  s   € ÷ Jñ J˜ð J $ñ Jr   c                óð  <€ \        V P                  R 4      ;'       g    R4      P                  4       pV'       g   RRRR/# \        SRR4      pVf   RRRR/#  / p\        VR	R4      pVe'   \	        VR
4      '       d   VP                  V4      VR&   VP                  V4      pRRRVRV/#   \         d?   p\        P                  RY4       RRR\        T4      P                   RT 2/u Rp?# Rp?ii ; i)r   r4  r6  Fr‡   zname requiredr7  Nr8  r;  Úpurge_profile_stater=  TÚdroppedrA  z(Profile identity purge failed for %r: %sr  )rB   rF   rB  r9   rC  rT  Úpurge_profile_routingrY   rZ   r[   r  rç   )r  r   rÁ   rG  rH  rU  r�   rý   s   &      €r   rL  Ú-purge_profile_identity_verb.<locals>._handlerâ  s  ø€ Ü�6—:‘:˜fÓ%×+Ð+¨Ó,×2Ñ2Ó4ˆßØ˜% ¨/Ð:Ð:Ü˜ °Ó6ˆØŠ=Ø˜% Ð*MÐNÐNð		JØ35ˆIÜ  ¨°tÓ<ˆJØÒ%¬'°*Ð>S×*TÒ*TØ'1×'EÑ'EÀdÓ'K�	˜)Ñ$Ø×1Ñ1°$Ó7ˆGØ˜$ 	¨7°D¸)ÐDÐDøÜô 	JÜ�N‰NÐEÀtÔQØ˜% ¬T°#«Y×-?Ñ-?Ð,@ÀÀ3À%Ð*HÐIÕIûð	Jús   ÁAB, Â,C5Â73C0Ã*C5Ã0C5r   rN  s   f r   Úpurge_profile_identity_verbrX  Ö  s   ø€ ÷Jð Jð$ €Or   )zconfig.yamlz.envr(   ) rë   Ú
__future__r   r)   rª   r   Úpathlibr   Útypingr   r   r   Úgateway.run_shutdownr   Úutilsr   Ú	getLoggerrç   rZ   rí   r   rq   r   r   r  r  r  r  r  r-  rO  rX  r   r   r   Ú<module>r_     sŒ   ðñõ #ã Û Û 	Ý ß &Ñ &å 0Ý  à	×	Ò	˜8Ó	$€à $Ð Ø2Ð ð #&Ð õ	÷Byñ ByõJ+ò\8ò7ôHõ8Wò<Lò'ôTr   