+
    jHàj˜H  ã                   ó¼  a € R/ t-0 t R 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Ht ^ RIHtHtHt ^ RIHt ]P(                  ! R4      t]t]! 4       t] ^ k ]	P2                  R0/t] ^k R R ltR	 R
 ltR R ltRRRR/R R lltR R ltR R lt R R lt!R R lt"R R lt#R R lt$R R  lt%R! R" lt&R# R$ lt'R% R& lt(R' R( lt)R) R* lt*R+ R, lt+R- R. lt,R# )1u  Environment-variable overrides for the gateway config (``_apply_env_overrides``).

Runs after ``GatewayConfig.from_dict`` so env always wins over config.yaml / gateway.json.
Most platforms follow one shape â€” "credentials present in env â‡’ enable the platform and
copy the values into ``extra``" â€” declared by each platform plugin as ``PlatformEntry.env_overrides``
(``gateway.platform_env.EnvCred`` rows; see that module). Core-only platforms (api_server, webhook,
msgraph_webhook, relay) keep their small functions here.
N)ÚOptional)ÚGatewayConfigÚHomeChannelÚPlatformÚPlatformConfigÚ_getenv_strÚ_has_usable_api_server_keyÚ SHARED_LISTENER_MIRROR_PLATFORMS)ÚINTÚ
csv_extrasÚ
env_extras)Úis_truthy_valuezgateway.configc                ó0   € V ^8„  d   QhR\         R\        /# )é   ÚplatformÚreturn)r   Útuple)Úformats   "Ú7/home/ubuntu/.hermes/hermes-agent/gateway/config_env.pyÚ__annotate__r   *   s   € ÷ ñ ¤xð ´Eñ ó    c                ó  € V \         9   d   \         V ,          # ^ RIHp VP                  V P                  4      p\        \        VRR4      ;'       g    R4      pV'       g*   ^ RIHp V! V P                  4      ;'       g    R^,          pV# )z´WARNING credential names: the core row, else the platform entry's declaration. The entry is
already materialized (its own env step is what is warning), so the lookup never imports.©Úplatform_registryÚenv_enable_credentials)Úbundled_env_rows© )r   r   )	Ú_ENV_ENABLE_CREDENTIALSÚgateway.platform_registryr   ÚgetÚvaluer   ÚgetattrÚgateway.platform_envr   )r   r   ÚentryÚnamesr   s   &    r   Ú_enable_credential_namesr%   *   sq   € ð Ô*Ô*Ü& xÕ0Ð0Ý;Ø×!Ñ! (§.¡.Ó1€EÜ”'˜%Ð!9¸2Ó>×DÐDÀ"ÓE€EßÝ9Ù! (§.¡.Ó1×=Ð=°X¸qÕAˆØ€Lr   c                ó(   € V ^8„  d   QhR\         RR/# )r   r   r   N)r   )r   s   "r   r   r   8   s   € ÷ ñ ¬xð ¸Dñ r   c                óÀ  € V \         9   d   R# \         P                  V 4       \        V 4      pV Uu. uFD  p\        P                  P                  V4      ;'       g    RP                  4       '       g   KB  VNKF  	  ppRP                  T;'       g    T4      ;'       g    Rp\        P                  RV P                  V P                  W@P                  4       R# u upi )z¥One-time WARNING: ``platforms.<x>.enabled: false`` wins over env creds (which
used to force-enable), so users relying on "creds in .env = on" learn why it went dark.NÚ z, zits credentialsa%  Platform '%s' is explicitly disabled by platforms.%s.enabled: false in config.yaml, so the credentials found in the environment (%s) will NOT start its adapter. Environment credentials no longer override an explicit disable. Remove the key or set platforms.%s.enabled: true to turn it back on.)Ú_EXPLICIT_DISABLE_WARNEDÚaddr%   ÚosÚenvironr   ÚstripÚjoinÚloggerÚwarningr    )r   r$   ÚnÚpresentÚcredss   &    r   Ú _warn_explicit_disable_beats_envr4   8   s©   € ð Ô+Ô+ÙÜ× Ñ  Ô*Ü$ XÓ.€EÙÓE™%�Q¤B§J¡J§N¡N°1Ó$5×$;Ð$;¸×#BÑ#B×#D�qˆq™%€GÐEØ�I‰I�g×&Ð& Ó'×<Ð<Ð+<€EÜ
‡N�Nð	ð
 	�‰˜Ÿ™¨¯~©~öùò Fs   ²*CÁCÁ6Cc                ó$   € V ^8„  d   QhR\         /# ©r   r   )Úbool)r   s   "r   r   r   K   s   € ÷ eñ e¬dñ er   c                 ó†   € ^ RI Hp  ^ RIHpHp V! 4       p\        V4      ;'       d    V ! 4       ;'       d    V! V4      R8g  # )zÌTrue while a multiplexer loads a NON-default profile's config (``_profile_runtime_scope`` sets the
home override; the runner sets the multiplex flag). Same signal ``gateway.config`` uses for scoped reads.)Úis_multiplex_active)Úget_hermes_home_overrideÚprofile_name_for_homeÚdefault)Úagent.secret_scoper9   Úhermes_constantsr:   r;   r7   )r9   r:   r;   Úoverrides       r   Ú$_loading_secondary_under_multiplexerr@   K   s<   € õ 7ßPÙ'Ó)€HÜ�‹>×dÐdÑ1Ó3×dÐdÑ8MÈhÓ8WÐ[dÑ8dÐdr   Ú
pop_markerFÚwarnTc          
      óT   € V ^8„  d   QhR\         R\        R\        R\        R\        /# )r   Úconfigr   rA   rB   r   )r   r   r7   r   )r   s   "r   r   r   T   s4   € ÷ ñ ÜðÜ%-ðÜ>BðÜRVðäñr   c               óx  € V P                   P                  V\        4       4      pVP                  pV'       d   VP	                  RR4      MVP                  RR4      pVP                  '       d   V# V'       g/   VP                  \        9   d   \        4       '       g
   RVn        V# V'       d   \        V4       V# )a¢  Enable *platform* on env credentials unless config.yaml explicitly disabled it.

A multiplex secondary profile may pin ``enabled: false`` yet inherit the process env; without
this guard env presence would force-enable it. By default the ``_enabled_explicit`` marker is
READ (the plugin-enable and relay passes still need it) and the disable is warned once;
api_server/webhook POP it (terminal branch) and stay silent.
Ú_enabled_explicitFT)Ú	platformsÚ
setdefaultr   ÚextraÚpopr   Úenabledr    r	   r@   r4   )rD   r   rA   rB   Úplatform_configrI   Úexplicits   &&$$   r   Ú_enable_from_envrN   T   sœ   € ð ×&Ñ&×1Ñ1°(¼NÓ<LÓM€OØ×!Ñ!€Eß8Bˆu�y‰yÐ,¨eÔ4ÈÏ	É	ÐReÐglÓHm€HØ××ÐØÐßØ�‰Ô:Ô:Ô?c×?eÒ?eð #'ˆÔð Ð÷ 
Ü(¨Ô2ØÐr   c                ó(   € V ^8„  d   QhR\         RR/# ©r   rD   r   N©r   )r   s   "r   r   r   p   s   € ÷ @ñ @œð @¨$ñ @r   c                óô   € \        R4      p\        V4      '       g   R# \        V \        P                  RRR7      P
                  pWR&   \        VR\        R4      334       \        VR	R
\        3RR34       R# )zgRequire a usable key: an unauthenticated adapter refuses to start and the reconnect watcher would spin.ÚAPI_SERVER_KEYNTF©rA   rB   ÚkeyÚcors_originsÚAPI_SERVER_CORS_ORIGINSÚportÚAPI_SERVER_PORT)ÚhostÚAPI_SERVER_HOST)Ú
model_nameÚAPI_SERVER_MODEL_NAME)	Úgetenvr   rN   r   Ú
API_SERVERrI   r   r   r
   )rD   rU   rI   s   &  r   Ú_api_serverr`   p   sr   € ä
Ð!Ó
"€CÜ% c×*Ò*ÙÜ˜V¤X×%8Ñ%8ÀTÐPUÔV×\Ñ\€EØˆ%�LÜˆu˜¬Ð/HÓ(IÐJÐLÔMÜˆu˜Ð 1´3Ð7Ð9TÐV}Ð~Ör   c                ó(   € V ^8„  d   QhR\         RR/# rP   rQ   )r   s   "r   r   r   {   s   € ÷ 	dñ 	d”]ð 	d tñ 	dr   c                 óJ  € \        \        R 4      4      pV'       g"   \        P                  V P                  9   g   R# V'       d   \        V \        P                  RRR7      M V P                  \        P                  ,          p\        VP                  RR\        3R34       R# )ÚWEBHOOK_ENABLEDNTFrT   rX   ÚWEBHOOK_PORT)ÚsecretÚWEBHOOK_SECRET)	r   r^   r   ÚWEBHOOKrG   rN   r   rI   r
   )rD   rK   Úwebhook_configs   &  r   Ú_webhookri   {   s~   € ÜœfÐ%6Ó7Ó8€Gß”x×'Ñ'¨6×+;Ñ+;Ô;Ù÷ ô 	˜¤×!1Ñ!1¸dÈÕOà×Ñœh×.Ñ.Õ/ð ô
 ˆ~×#Ñ# v¨~¼sÐ&CÐEaÐ%bÖcr   c                ó(   € V ^8„  d   QhR\         RR/# rP   rQ   )r   s   "r   r   r   ‡   s   € ÷ pñ pœ]ð p¨tñ pr   c                 ó`  € \        \        R 4      4      p\        R4      p\        R4      p\        R4      pV'       gK   \        P                  V P                  9   g,   \        R4      '       g   V'       g   V'       g   V'       g   R# V P                  P                  \        P                  \        4       4      pV'       d   \        V \        P                  RR7       \        VP                  RR\        334       V'       d   W%P                  R	&   \        VP                  R
V3RV334       R# )ÚMSGRAPH_WEBHOOK_ENABLEDÚMSGRAPH_WEBHOOK_CLIENT_STATEÚ"MSGRAPH_WEBHOOK_ACCEPTED_RESOURCESÚ$MSGRAPH_WEBHOOK_ALLOWED_SOURCE_CIDRSÚMSGRAPH_WEBHOOK_PORTNF)rB   rX   Úclient_stateÚaccepted_resourcesÚallowed_source_cidrs)r   r^   r   ÚMSGRAPH_WEBHOOKrG   rH   r   rN   r   rI   r
   r   )rD   rK   rq   Ú	resourcesÚallowed_cidrsÚmsgraph_cfgs   &     r   Ú_msgraph_webhookrx   ‡   sâ   € ÜœfÐ%>Ó?Ó@€GÜÐ8Ó9€LÜÐ;Ó<€IÜÐAÓB€Mß”x×/Ñ/°6×3CÑ3CÔCÄvÐNd×GeÒGeßŸy¯MÙØ×"Ñ"×-Ñ-¬h×.FÑ.FÌÓHXÓY€KßÜ˜¤×!9Ñ!9ÀÕFÜˆ{× Ñ  FÐ,BÄCÐ#HÐ"JÔKßØ,8×Ñ˜.Ñ)Üˆ{× Ñ Ð$8¸)Ð#DÐG]Ð_lÐFmÐ"nÖor   c                ó:   € V ^8„  d   QhR\         \        ,          /# r6   )r   Údict)r   s   "r   r   r   ˜   s   € ÷ 	=ñ 	=¤¬$¥ñ 	=r   c                óü   € V P                   f   R#  V P                  4       p\        T\        4      '       d   T'       d   T# R#   \         d-   p\        P                  RT P                  T4        Rp?R# Rp?ii ; i)z>``env_enablement_fn()`` result as a non-empty dict, else None.Nz#env_enablement_fn for %s raised: %s)Úenv_enablement_fnÚ	Exceptionr/   ÚdebugÚnameÚ
isinstancerz   )r#   ÚseedÚes   &  r   Ú_plugin_probe_seedrƒ   ˜   si   € à×ÑÒ&ÙðØ×&Ñ&Ó(ˆô ˜d¤D×)Ò)¯dˆ4Ð<¸Ð<øô ô Ü�‰Ð:¸E¿J¹JÈÔJÝûðús   ’A ÁA;Á!A6Á6A;c                óR   € V ^8„  d   QhR\         R\        \         ,          R\        /# )r   Úexisting_extrar�   r   )rz   r   r7   )r   s   "r   r   r   ¤   s&   € ÷ ñ ´ð ¼XÄd½^ð ÔPTñ r   c           	     ó�  €  T;'       g    / P                  4        F  w  r4VR8w  g   K  VP                  W44       K!  	  \        V P                  \	        RVR7      4      4      pT'       g!   \        P                  RT P                  4       T#   \
         d-   p\        P                  RT P                  T4        Rp?R# Rp?ii ; i)zk``entry.is_connected`` on a transient ``enabled=True`` view seeded with env extras (never the real config).Úhome_channelT)rK   rI   u6   is_connected for %s raised: %s â€” skipping enablementNFuc   Plugin platform '%s' available but not configured (is_connected returned False) â€” skipping enable)	ÚitemsrH   r7   Úis_connectedr   r}   r/   r~   r   )r#   r…   r�   ÚkÚvÚ
configuredÚexcs   &&&    r   Ú_plugin_is_configuredrŽ   ¤   s¨   € ðØ—Z�Z˜R×&Ñ&Ö(‰DˆAØ�NÖ"Ø×)Ñ)¨!Ö/ñ )ô ˜%×,Ñ,¬^ÀDÐP^Ô-_Ó`Óaˆ
÷ Ü�‰ð@à�J‰Jô	
ð
 Ðøô ô Ü�‰ÐMÈuÏzÉzÐ[^Ô_Ýûðús!   ‚B ‹B ª:B ÂCÂ!C Ã Cc                ó(   € V ^8„  d   QhR\         RR/# rP   rQ   )r   s   "r   r   r   ·   s   € ÷ *ñ *¤Mð *¸Tñ *r   c           	      ó  €  \        VP                  4      pT P
                  P                  T4      pTRJ;'       d    TP                  pTe    \        TP                  ;'       g    / 4      M/ pTe#   T'       g   TP                  RR4      '       d   R# \        T4      pT'       g#   TP                  e   \        YT4      '       g   R#  \        TP                  4       4      pT'       g   TP                  f   R# T P
                  P!                  T\#        4       4      p	RT	n        T'       dÛ   \        T4      pTP%                  RR4      p
T	P                  P'                  T4       \)        T
\        4      '       d‹   T
P                  R4      '       dr   \+        T\-        T
R,          4      \-        T
P                  R4      ;'       g    R	4      T
P                  R
4      '       d   \-        T
R
,          4      MRR7      T	n        R# R# R# R#   \         d-   p\        P	                  R TP                  T4        Rp?R# Rp?ii ; i  \         d/   p\        P	                  RTP                  T4       Rp Rp?EL•Rp?ii ; i)zunknown platform name %r: %sNrF   Fzcheck_fn for %s raised: %sTr‡   Úchat_idr   ÚHomeÚ	thread_id)r   r‘   r   r“   )r   r   r}   r/   r~   rG   r   rK   rz   rI   rƒ   r‰   rŽ   r7   Úcheck_fnÚensure_deps_fnrH   r   rJ   Úupdater€   r   Ústrr‡   )rD   r#   r   r‚   Úexisting_cfgÚalready_enabledr…   r�   Údeps_okrL   Úhomes   &&         r   Ú_enable_plugin_platformrœ   ·   sû  € ðÜ˜EŸJ™JÓ'ˆð ×#Ñ#×'Ñ'¨Ó1€LØ"¨$Ð.×GÐG°<×3GÑ3G€OØ7CÒ7O”T˜,×,Ñ,×2Ð2°Ô3ÐUW€NàÒ¯¸N×<NÑ<NÐObÐdi×<jÒ<jÙÜ˜eÓ$€Dç˜u×1Ñ1Ò=ÔF[Ð\aÐsw×FxÒFxÙðô �u—~‘~Ó'Ó(ˆ÷ �u×+Ñ+Ò3ÙØ×&Ñ&×1Ñ1°(¼NÓ<LÓM€OØ"€OÔßÜ�D‹zˆØ�x‰x˜¨Ó-ˆØ×Ñ×$Ñ$ TÔ*Ü�dœD×!Ò! d§h¡h¨y×&9Ò&9Ü+6Ø!¬3¨t°I­Ó+?ÄcÈ$Ï(É(ÐSYÓJZ×JdÐJdÐ^dÓFeØ48·H±H¸[×4IÒ4Iœ#˜d ;Õ/Ô0Ètô,ˆOÖ(ñ ':Ñ!ñ	 øô? ô Ü�‰Ð3°U·Z±ZÀÔCÝûðûô0 ô Ü�‰Ð1°5·:±:¸qÔAØŽûðús/   ‚H ÃI ÈIÈ!H=È=IÉI>É#I9É9I>c                ó0   € V ^8„  d   QhR\         R\        /# )r   rD   r   ©r   Úlist)r   s   "r   r   r   ä   s   € ÷ ñ ¤}ð ¼ñ r   c                óÀ   €  ^ RI Hp V! 4        ^ RIHp ^ RIHp V! V/ V P                  R7      #   \         d#   p\        P                  RT4       . u Rp?# Rp?ii ; i)ug  Plugin entries with activation evidence (config block, env/.env, credential pool); only those
are imported â€” an unconfigured adapter has nothing to enable. See gateway.platform_activation.
config.yaml blocks already materialized their adapters in load_yaml_layer (and every merged
block is in config.platforms), so the YAML is not parsed a second time here.)Údiscover_pluginsr   )Úconfigured_plugin_entries©Úyaml_cfgÚplatform_namesz6Plugin platform discovery for env overrides failed: %sN)
Úhermes_cli.pluginsr¡   r   r   Úgateway.platform_activationr¢   rG   r}   r/   r~   )rD   r¡   r   r¢   r‚   s   &    r   Ú_configured_plugin_entriesr¨   ä   sQ   € ð
Ý7ÙÔÝ?ÝIÙ(Ð):ÀRÐX^×XhÑXhÔiÐiøÜô Ü�‰ÐMÈqÔQØ�	ûðús   ‚-0 °A»AÁAÁAc                ó<   € V ^8„  d   QhR\         R\        R\        /# )r   rD   Úentriesr   rž   )r   s   "r   r   r   ô   s!   € ÷ ñ ¤=ð ¼4ð ÄDñ r   c           	     ó   € ^ RI Hp ^ RIHp ^ RIHpHp V Uu0 uF  p\        VRR4      kK  	  pp\        \        P                  ! 4       ^ ,          4      \        V4      ,          V,
          pV'       g   . # V! / V P                  R7      p	. p
\        V4       F]  pV	! V4      '       d	   V! V4      MRpV'       g   K%  V^ ,          '       g   K6  V
P                  V! W¼^ ,          V^,          R7      4       K_  	  V
# u upi )	a  Env rows of bundled platforms with activation evidence but no registry entry (discovery
suppressed or the plugin disabled), read from their ``gateway_env`` files; see
``gateway.platform_env.bundled_env_rows``. They only run the env steps, never the enable pass.)ÚSimpleNamespace)Úactivation_predicate)Ú_BUNDLED_ENV_SIBLINGSr   r   r(   r£   N)r   Úenv_overridesr   )Útypesr¬   r§   r­   r"   r®   r   r!   Úsetr   Ú_scan_bundled_plugin_platformsrG   ÚsortedÚappend)rD   rª   r¬   r­   r®   r   r‚   Úhaver$   ÚwantedÚoutr   Úrowss   &&           r   Ú_bundled_env_fallbacksr¹   ô   sÌ   € õ &Ý@ßLÙ,3Ó4©G qŒG�A�v˜rÖ"©G€DÐ4Ü”×8Ò8Ó:¸1Õ=Ó>ÄÐEZÓA[Õ[Ð_cÕc€EßØˆ	Ù!¨2¸f×>NÑ>NÔO€FØ
€CÜ�u–ˆÙ)/°¯ªÑ Ô%¸4ˆß‰4�D˜—G–GØ�J‰J‘¨DÀQÅÐ`dÐefÕ`gÔhÖiñ ð €Jùò 5s   ™C;c                ó$   € V ^8„  d   QhR\         /# r6   )Úint)r   s   "r   r   r     s   € ÷ ñ œSñ r   c                 óÞ   € \        \        P                  P                  4       4      p VP	                  \        V P
                  4      4      #   \        \        3 d    \        T4      u # i ; i)N)	rŸ   r   Ú__members__ÚvaluesÚindexr   Ú
ValueErrorÚKeyErrorÚlen)r#   Úmemberss   & r   Ú_platform_rankrÄ     sX   € ô ”8×'Ñ'×.Ñ.Ó0Ó1€GðØ�}‰}œX e§j¡jÓ1Ó2Ð2øÜœÐ!ô Ü�7‹|Òðús   ©#A ÁA,Á+A,c                ó4   € V ^8„  d   QhR\         R\        RR/# ©r   rD   rª   r   Nrž   )r   s   "r   r   r     s&   € ÷ 	Nñ 	N¬ð 	NÄð 	NÈñ 	Nr   c                óø   € \        V\        R7       F*  p\        VRR4      ;'       g    R F  p V! V 4       K  	  K,  	  R#   \         d-   p\        P                  RTP                  T4        Rp?KH  Rp?ii ; i)a  Run each plugin platform's declared ``env_overrides`` steps (credential enable, home channel,
reply mode, ...). Every step touches only its own platform, so only the order WITHIN an entry is
significant (e.g. Telegram's reply mode may create the entry its home channel then attaches to).)rU   r¯   zenv override for %s raised: %sNr   )r³   rÄ   r!   r}   r/   r~   r   )rD   rª   r#   Ústepr‚   s   &&   r   Ú_apply_plugin_env_overridesrÉ     sl   € ô ˜¤^×4ˆÜ˜E ?°BÓ7×=Ð=¸2Ò=ˆDðNÙ�V–ó >ó 5øô ô NÜ—‘Ð=¸u¿z¹zÈ1×MÒMûðNús   °AÁA9Á!A4Á4A9c                ó4   € V ^8„  d   QhR\         R\        RR/# rÆ   rž   )r   s   "r   r   r     s&   € ÷ Yñ Y¬mð YÄdð YÈtñ Yr   c                ó¤   € V F  p \        W4       K  	  R#   \         d-   p\        P                  RTP                  T4        Rp?KG  Rp?ii ; i)u‰  Registry-driven enable for plugin platforms whose ``env_overrides`` did not already enable them.

Enabled when credentials are configured (``is_connected`` MUST gate: ``check_fn`` alone would
enable unconfigured platforms that retry-connect forever) and deps are present (``check_fn``) or
installable later by ``create_adapter()`` â€” never here: installing in this sweep boot-looped the app.
z-Plugin platform enable pass failed for %s: %sN)rœ   r}   r/   r~   r   )rD   rª   r#   r‚   s   &&  r   Ú!_enable_plugin_platforms_from_envrÌ     sI   € ó ˆð	YÜ# FÖ2ó øô ô 	YÜ�L‰LÐHÈ%Ï*É*ÐVW×XÒXûð	Yús   ‡˜A£!A
Á
Ac                ó(   € V ^8„  d   QhR\         RR/# rP   rQ   )r   s   "r   r   r   ,  s   € ÷ ,(ñ ,(”=ð ,( Tñ ,(r   c                óæ  € \        R4      P                  4       pV P                  P                  \        P
                  4      pV'       d=   \        VP                  P                  R4      ;'       g    R4      P                  4       MRpT;'       g    TpV'       dM   \        V \        P
                  4      pVP                  R4      VP                  R&   VP                  '       g   R# V'       d   \        \        R4      4      '       d   R# \        P
                  \        P                  \        P                  \        P                  0pV P                  P                  4        Fˆ  w  rxWv9   g   VP                  '       g   K  VP                  P                  R4      '       d"   \         P#                  RVP$                  4       M \         P'                  R	VP$                  4       R
Vn
        KŠ  	  R# )uÃ  Relay (connector-fronted, EXPERIMENTAL): enabled by GATEWAY_RELAY_URL or gateway.relay_url;
the URL is mirrored into extra["relay_url"] for the connected-checker.

Relay-exclusive: the GATEWAY_RELAY_URL env stamp means the connector owns every platform
connection; a directly-connected adapter would be a second unmanaged ingress (duplicate
deliveries, split sessions, a socket disarming scale-to-zero). So the env stamp disables all
other messaging platforms â€” even explicitly enabled ones â€” except non-messaging surfaces (local,
api_server, webhook; same set as the scale-to-zero arm gate). relay_url from YAML only keeps the
additive behavior. Opt out with GATEWAY_RELAY_ALLOW_DIRECT_PLATFORMS=true.
ÚGATEWAY_RELAY_URLÚ	relay_urlr(   Ú/NÚ$GATEWAY_RELAY_ALLOW_DIRECT_PLATFORMSrF   a>  Relay connector is configured via GATEWAY_RELAY_URL; disabling directly-connected platform '%s' even though it is explicitly enabled in this profile's configuration. All messaging goes through the connector on this deployment. Set GATEWAY_RELAY_ALLOW_DIRECT_PLATFORMS=true to keep direct platforms alongside the relay.z`Relay connector is configured via GATEWAY_RELAY_URL; disabling directly-connected platform '%s'.F)r^   r-   rG   r   r   ÚRELAYr—   rI   rN   ÚrstriprK   r   ÚLOCALr_   rg   rˆ   r/   r0   r    Úinfo)	rD   Úrelay_url_envÚexisting_relayÚrelay_url_yamlÚrelay_url_valÚrelay_configÚskipr   rL   s	   &        r   Ú_relayrÝ   ,  sl  € ô Ð.Ó/×5Ñ5Ó7€MØ×%Ñ%×)Ñ)¬(¯.©.Ó9€NßQ_”S˜×-Ñ-×1Ñ1°+Ó>×DÐDÀ"ÓE×KÑKÔMÐeg€NØ!×3Ð3 ^€MßÜ'¨´·±Ó?ˆØ*7×*>Ñ*>¸sÓ*Cˆ×Ñ˜;Ñ'à×#×#Ð#ÙçœO¬FÐ3YÓ,Z×[Ò[ÙÜ�N‰NœHŸN™N¬H×,?Ñ,?Ä×AQÑAQÐR€DØ%+×%5Ñ%5×%;Ñ%;Ö%=Ñ!ˆØÔ ?×#:×#:Ð#:ÙØ× Ñ ×$Ñ$Ð%8×9Ò9Ü�N‰Nð@ð —‘õô �K‰Kð>à—‘ôð
 #(ˆÖó' &>r   c                ó(   € V ^8„  d   QhR\         RR/# rP   rQ   )r   s   "r   r   r   [  s   € ÷ =ñ =¤Mð =°dñ =r   c                 ó€   € V P                   P                  4        F  pVP                  P                  R R4       K!  	  R# )rF   N)rG   r¾   rI   rJ   )rD   rL   s   & r   Ú_scrub_explicit_markersrà   [  s2   € Ø!×+Ñ+×2Ñ2Ö4ˆØ×Ñ×!Ñ!Ð"5°tÖ<ó 5r   c                ó(   € V ^8„  d   QhR\         RR/# rP   rQ   )r   s   "r   r   r   `  s   € ÷ $ñ $¤ð $°4ñ $r   c                óÖ   € \        V 4      p\        W\        W4      ,           4       \        V 4       \	        V 4       \        V 4       \        W4       \        V 4       \        V 4       R# )aH  Apply environment variable overrides to *config*.

Order: plugin platforms' declared env rows, then the core-only rows (api_server, webhook,
msgraph_webhook; each touches only its own platform), then the registry enable pass, relay
disabling (needs every platform's final ``enabled``), and the marker scrub, which must be last.
N)	r¨   rÉ   r¹   r`   ri   rx   rÌ   rÝ   rà   )rD   rª   s   & r   Ú_apply_env_overridesrã   `  sP   € ô )¨Ó0€GÜ Ô2HÈÓ2YÕ(YÔZÜ�ÔÜˆVÔÜ�VÔÜ% fÔ6Ü
ˆ6„NÜ˜FÖ#r   c                óh   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   ^\         9   d
   \        ;R&   # )r   r)   r   )Ú__conditional_annotations__r±   rz   )r   s   "r   r   r      s8   € ÷ ñ ÷@ &Ò %œ#Ñ %ñA÷Hò œñ òIr   )rÏ   ).rå   Ú__doc__Úloggingr+   Útypingr   Úgateway.configr   r   r   r   r   r   r	   r"   r
   r   r   Úutilsr   Ú	getLoggerr/   r^   r±   r)   rÓ   r   r%   r4   r@   rN   r`   ri   rx   rƒ   rŽ   rœ   r¨   r¹   rÄ   rÉ   rÌ   rÝ   rà   rã   r   )rå   s   @r   Ú<module>rì      sà   øðöó Û 	Ý ÷÷ ñ ÷ =Ñ <Ý !ð 
×	Ò	Ð+Ó	,€à	€ñ !$£Ð Ó %ð
 ‡N�NÐ*ð!Ð ó õ
õõ&eðØEJðØY]÷õ8@õ	dõpõ"	=õõ&*õZõ õ(õ	NõYõ,(õ^=÷
$r   