+
    „WÝj¹  ã                  ó”  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIHtHtH	t	H
t
HtHt ]P                  ! R4      tRtRt]! ]]04      tRRR	R
RRRRRRRRRRRR/tR]R&   RR/tR]R&   ]! 0 RGm4      tR]R&   RRRR R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2R3R4/tR]R5&   R6R7/tR]R8&   RHR9 R: lltR;tRHR< R= lltRHR> R? lltR@RARBR/RC RD lltRE RF ltR# )IaÍ  Where third-party Python plugin code is allowed to run (``plugins.isolation``).

``in_process`` (default) imports every plugin into the Hermes process, as always. ``host`` keeps
third-party plugin code OUT of it: general plugins load in one plugin-host process per profile
(:mod:`hermes_cli.plugin_host`) and talk to Hermes only through ``ctx``; every other path that would
import a user-supplied module in-process (category providers, model-provider profiles, dashboard
plugin APIs) refuses with a stated reason. Bundled plugins ship with Hermes and stay in-process.

That second half is the property a pooled deployment needs: one Hermes process serving many
profiles must never share an interpreter with a profile's plugin code. The same boundary gives a
single-user install crash isolation (a plugin that segfaults or hangs takes down its host, not the
gateway), which is why it is a plain config value and not a cloud-only switch.

The ctx surface tables below are the single source of truth for both the runtime boundary
(:mod:`hermes_cli.plugin_host_child` refuses these methods) and the static audit
(:mod:`hermes_cli.plugin_isolation_audit`), so "the audit says pool-safe" and "it loads in the host"
cannot drift apart.
)ÚannotationsN)ÚAnyÚDictÚ	FrozenSetÚListÚMappingÚOptionalzhermes_cli.pluginsÚ
in_processÚhostÚregister_platformzIplatform adapters run on the gateway's event loop with native SDK clientsÚregister_platform_handlerz=the handler factory receives the platform's native SDK clientÚregister_telegram_handlerz<the handler factory receives the native Telegram ApplicationÚregister_slack_action_handlerz8the callback receives native slack_bolt ack/body objectsÚ register_dashboard_auth_providerz<dashboard auth is owned by the launch process, not a profileÚregister_approval_transportzCapproval transports hold the live approval request/response channelÚpost_messagezIthe returned handle is bound to the gateway's event loop and live adapterÚapost_messagezdict[str, str]ÚHOST_UNSUPPORTED_CTX_METHODSÚregister_cli_commandzB`hermes <command>` subcommands are wired into the local CLI parserÚHOST_SKIPPED_CTX_METHODSzfrozenset[str]ÚHOST_REMOTE_FACADESÚregister_image_gen_providerz)agent.image_gen_provider:ImageGenProviderÚregister_video_gen_providerz)agent.video_gen_provider:VideoGenProviderÚregister_web_search_providerz+agent.web_search_provider:WebSearchProviderÚregister_browser_providerz&agent.browser_provider:BrowserProviderÚ&register_terminal_environment_providerz7agent.terminal_env_provider:TerminalEnvironmentProviderÚregister_secret_sourcez&agent.secret_sources.base:SecretSourceÚregister_tts_providerzagent.tts_provider:TTSProviderÚregister_transcription_providerz2agent.transcription_provider:TranscriptionProviderÚregister_delegation_providerz,agent.delegation_provider:DelegationProviderÚregister_context_enginez"agent.context_engine:ContextEngineÚregister_context_referencez1agent.context_references:ContextReferenceProviderÚregister_memory_providerz$agent.memory_provider:MemoryProviderÚHOST_OBJECT_BASESÚpre_gateway_dispatchz2receives the live gateway runner and session storeÚHOST_DEGRADED_HOOKSc               ó    € V ^8„  d   QhRRRR/# )é   ÚconfigúOptional[Mapping[str, Any]]ÚreturnzMapping[str, Any]© )Úformats   "ÚOC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\plugin_isolation.pyÚ__annotate__r.   Q   s   € ÷ ;ñ ;Ð7ð ;ÐCTñ ;ó    c                ó¾   € V f   ^ RI Hp V! 4       ;'       g    / p \        V \        4      '       d   V P	                  R4      MR p\        V\        4      '       d   V# / # )N)Úload_config_readonlyÚplugins)Úhermes_cli.configr1   Ú
isinstancer   Úget)r(   r1   Úsections   &  r-   Ú_plugins_configr7   Q   sM   € Ø‚~Ý:Ù%Ó'×-Ð-¨2ˆÜ'1°&¼'×'BÒ'Bˆf�j‰j˜Ô#È€GÜ  ¬'×2Ò2ˆ7Ð:¸Ð:r/   ÚHERMES_PLUGIN_HOST_PROCESSc               ó    € V ^8„  d   QhRRRR/# )r'   r(   r)   r*   Ústrr+   )r,   s   "r-   r.   r.   ^   s   € ÷ 
ñ 
Ð6ð 
À#ñ 
r/   c           	     ó²  € \         P                  P                  \        4      R8X  d   \        # \        V 4      P                  R\        4      p\        T;'       g    \        4      P                  4       P                  4       P                  RR4      pV\        9  d:   \        P                  RVRP                  \        \        4      4      4       \        # V# )zZ``plugins.isolation`` for the active profile; an unknown value warns and means in-process.Ú1Ú	isolationÚ-Ú_zAplugins.isolation=%r is not one of %s; loading plugins in-processz, )ÚosÚenvironr5   ÚHOST_PROCESS_ENVÚISOLATION_IN_PROCESSr7   r:   ÚstripÚlowerÚreplaceÚ_ISOLATION_MODESÚloggerÚwarningÚjoinÚsorted)r(   ÚrawÚmodes   &  r-   Úisolation_moderN   ^   s    € ä	‡z�z‡~�~Ô&Ó'¨3Ô.Ü#Ð#Ü
˜&Ó
!×
%Ñ
% kÔ3GÓ
H€CÜˆs×*Ð*Ô*Ó+×1Ñ1Ó3×9Ñ9Ó;×CÑCÀCÈÓM€DØÔ#Ô#Ü�‰ÐZØ˜DŸI™I¤fÔ-=Ó&>Ó?ô	Aä#Ð#Ø€Kr/   c               ó    € V ^8„  d   QhRRRR/# )r'   r(   r)   r*   z	list[str]r+   )r,   s   "r-   r.   r.   k   s   € ÷ 	,ñ 	,Ð5ð 	,Àñ 	,r/   c                ó2  € \        V 4      P                  R4      p\        V\        4      '       d   VP                  R4      MRpV'       g   . # \        V\        4      '       d   ^ RIpVP                  V4      # V Uu. uF  p\	        V4      NK  	  up# u upi )zV``plugins.host.launcher``: argv prefix the host process runs under (a sandbox runner).r
   ÚlauncherN)r7   r5   r4   r   r:   ÚshlexÚsplit)r(   r
   rQ   rR   Úparts   &    r-   Úhost_launcherrU   k   sv   € ä˜6Ó"×&Ñ& vÓ.€DÜ'1°$¼×'@Ò'@ˆt�x‰x˜
Ô#Àd€HßØˆ	Ü�(œC× Ò ÛØ�{‰{˜8Ó$Ð$Ù"*Ó+¡(˜$ŒC�ŽI¡(Ñ+Ð+ùÒ+s   Á=BÚsourceÚuserr(   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r'   Úwhatr:   rV   r(   r)   r*   zOptional[str]r+   )r,   s   "r-   r.   r.   w   s0   € ÷ 
dñ 
d Cð 
d°Cð 
dØ&Að
dØMZñ
dr/   c               óF   € VR8X  g   \        V4      \        8w  d   R# V  R2# )zÒReason an in-process import of third-party code must not happen, or ``None`` when allowed.

Every loader that imports a user-supplied module into the Hermes process asks this first;
bundled code always passes.
ÚbundledNz£ runs only in-process, and plugins.isolation is 'host' (third-party plugin code never runs inside the Hermes process); set plugins.isolation: in_process to load it)rN   ÚISOLATION_HOST)rY   rV   r(   s   &$$r-   Úin_process_import_refusalr]   w   s2   € ð �Ôœn¨VÓ4¼ÔFÙØˆfð bð cð dr/   c               ó   € V ^8„  d   QhRR/# )r'   r*   r   r+   )r,   s   "r-   r.   r.   „   s   € ÷ 	/ñ 	/˜#ñ 	/r/   c                 ób   € \        4       \        8w  d   R# ^ RIHp  V ! 4       P	                  4       # )a  The active profile's plugin host when ``plugins.isolation`` is ``host``, else ``None``.

Category loaders (memory providers, context engines, cron schedulers) ask this before importing
a user plugin directory, so the same plugins keep working with their code in the host.
N©Úget_plugin_manager)rN   r\   Úhermes_cli.pluginsra   Ú_plugin_hostr`   s    r-   Úuser_plugin_hostrd   „   s'   € ô Óœ>Ô)ÙÝ5ÙÓ×,Ñ,Ó.Ð.r/   >   ÚllmÚstateÚplatform_actionsÚsubagent_lifecycleÚdelegation_backends)N)Ú__conditional_annotations__Ú__doc__Ú
__future__r   Úloggingr@   Útypingr   r   r   r   r   r   Ú	getLoggerrH   rC   r\   Ú	frozensetrG   r   Ú__annotations__r   r   r#   r%   r7   rB   rN   rU   r]   rd   )rj   s   @r-   Ú<module>rr      s]  øðôõ& #ã Û 	ß @× @à	×	Ò	Ð/Ó	0€à#Ð Ø€ÙÐ2°NÐCÓDÐ ð ÐdØÐ!`ØÐ!_Ø#Ð%_Ø&Ð(fØ!Ð#hØÐ_ØÐ`ð	0Ð ˜nó 	ð Ð`ð,Ð ˜.ó ñ
 '0ò 1ó 'Ð �^ó ð "Ð#NØ!Ð#NØ"Ð$QØÐ!IØ,Ð.gØÐFØÐ=Ø%Ð'[Ø"Ð$RØÐCØ Ð"UØÐ Fð%Ð �>ó ð$ ÐPð'Ð �^ó ÷
;ð 0Ð ÷
÷	,ð
d¸&ð 
dØDH÷
d÷	/r/   