+
    jHàjÖ ã                   ó~  a€ RW tV0 t R t^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RIt^ RI
t
^ RIt^ RIHt ^ RIHt ]P                   ! ]4      t]! 0 RXm4      tRYtRtR	tR
tR tRR/R ltR tR tRZtR[tR\t]! RRR7      t ] ^ k ]! RRR7      t!] ^k RRRRRRRRRRRR/t"]! RR04      t#]! ]"4      ]#,
          t$]! 0 R]m4      t%R t&R ]$ 4        U Uu/ uF  p V  F  pWbK  	  K  	  upp t'R^R lt(R_t)]! RR7       ! R  R!4      4       t*R" t+R# t,R$ t-R% t.R& t/R' t0R(RR)RR*RR+R/R, lt1R- t2R. t3R/ t4R0 t5R1 t6R2 t7R`R3 lt8R4 t9RaR5 lt:R6 t;R7 t<R8 t=R9 t>R: t?R;RR<RR=R/R> lt@R? tAR@ tBRA tCRB tDRC tERD tFRE tG]H3RF RG lltIRH tJRI tK]RJ 4       tLRK tMRL RM ltNRN RO ltO]RPR/RQ l4       tPRR tQRS tRRT tS]RU 4       tTRV tUR# u upp i )bzHFrozen, explicit local-client launch policy for the existing TurnRunner.)Úcontextmanager)Ú
ContextVar)Ú	dataclass)Úcached_propertyN)ÚPath©ÚRuntimeStoreErrorÚfollow_adoptedÚdesktop_localÚsession_pinsc                ó¶   € V P                  \        4      p\        V\        4      '       d.   \        VP                  V4      \        4      '       d	   W1,          # T# )z^Whether *field* is the session's own choice: its last committed session edit, else *launched*.)ÚgetÚSESSION_PINSÚ
isinstanceÚdictÚbool)ÚconfigÚfieldÚlaunchedÚpinss   &&& Ú;/home/ubuntu/.hermes/hermes-agent/gateway/session_policy.pyÚsession_pinnedr   *   s?   € à�:‰:”lÓ#€DÜ$ T¬4×0Ò0´ZÀÇÁÈÃÔQU×5VÒ5Vˆ4�;ÐdÐ\dÐdó    ÚsessionFc               óÌ   € WP                  R/ 4      R&   V R,          P                  RR4       V'       d/   / V P                  \        4      ;'       g    / CRR/CV \        &   R# R# )zàWrite an explicit session reasoning level into *config*: it wins over a per-model default
(``reasoning_overrides``), at creation, on ``/reasoning`` and on a model pick that carries one.
A *session* edit also records the pin.ÚagentÚreasoning_effortÚreasoning_overridesNÚ	reasoningT)Ú
setdefaultÚpopr   r   )r   Úeffortr   s   &&$r   Úpin_reasoning_effortr"   0   s`   € ð :@×Ñ�g˜rÓ"Ð#5Ñ6Ø
ˆ7…O×ÑÐ-¨tÔ4ßØV 6§:¡:¬lÓ#;×#AÐ#A¸rÐVÀKÐQUÑVˆŒ|Óñ r   c                ó¨   € ^ RI Hp \        V! \        V P                  P
                  4      P                  4       P                  R,          4      4      # )zPThe owning profile's current ``config.yaml`` (its present sections), read fresh.©Ú_load_gateway_configúconfig.yaml)Úgateway.runr%   Úpresent_sectionsr   ÚdbÚdb_pathÚresolveÚparent)Ú	authorityr%   s   & r   Úprofile_configr.   :   s:   € å0ÜÑ0´°i·l±l×6JÑ6JÓ1K×1SÑ1SÓ1U×1\Ñ1\Ð_lÕ1lÓmÓnÐnr   c                ó"  € ^ RI Hp \        VP                  R4      \        4      '       d   VP                  R4      M/ pV P                  R/ 4      pR F  pV! WCV4       K  	  / V P                  \        4      ;'       g    / CRR/CV \        &   R# )z»``/reasoning reset``: the level is *profile*'s (its current config) again, re-read every turn by a
following session and on each resume by any other; a create-time ``reasoning`` included.)Ú_followr   r   FN)r   r   )Úgateway.session_policy_refreshr0   r   r   r   r   r   )r   Úprofiler0   Úfollowedr   Úkeys   &&    r   Úunpin_reasoningr5   @   sz   € õ 7Ü'1°'·+±+¸gÓ2FÌ×'MÒ'Mˆw�{‰{˜7Ô#ÐSU€HØ×Ñ˜g rÓ*€EÛ:ˆÙ� Ö%ñ ;àS˜vŸz™z¬,Ó7×=Ð=¸2ÐSÀÈUÑS€FŒ<Ór   Úlocal_session_policy©ÚdefaultÚfollow_profile_readÚcliÚtuiÚguiÚdesktopÚacpÚtoolÚoneshotc                óP   € V \         9   d   R# V \        9   d   \        V ,          # T # )a  ``created_source`` for a policy or live label.

``local`` and ``unknown`` are not surfaces. A label stored as ``local`` maps
through ``SURFACES`` (``gui`` is ``desktop``). Any other label, including
``tool`` and ``oneshot``, is kept as itself: created_source is provenance.
N)Ú_NOT_A_SURFACEÚSTORED_AS_LOCALÚSURFACES)Úlabels   &r   Úcreated_surfacerF   ^   s%   € ð ”ÔÙØ#¤Ô6Œ8�E�?ÐA¸EÐAr   c              #   óR   "  € T F  p\        V\        V,          04      x € K  	  R # 5i©N)Ú	frozensetrD   )Ú.0rE   s   & r   Ú	<genexpr>rK   m   s$   é € Ð+mÑ]lÐTY¬I°u¼hÀu½oÐ6N×,OÐ,OÓ]lùs   ‚%'c                ó   € \        RWR7      h)ae  One named refusal: the launch field the check read, and why it failed.

``reason`` stays the bounded wire code every caller compares as a string; ``field`` and
``detail`` are what tells ~20 different create checks apart, in the client and in the
gateway log, without a second run to find out which one fired (``RuntimeStoreError`` bounds
and flattens both).Úinvalid_params©r   Údetailr   rN   s   &&r   Ú_refuserP   q   s   € ô Ð,°EÔ
IÐIr   T)Úfrozenc                   ó^  a € ] tR t^t o RtRtRtRtRtRt	Rt
RtRtRtRtRtR tR tRRR/R lltRRR/R	 llt]R
 4       tR tR tRR ltR tR t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t ]R 4       t!]R 4       t"]R 4       t#]R 4       t$]R 4       t%V 3R lt&Rt'V t(R# )ÚLocalSessionPolicyNFÚaskc                ób   € V P                   f   R # \        P                  ! V P                   4      # rH   )Úclient_env_jsonÚjsonÚloads©Úselfs   &r   Ú
client_envÚLocalSessionPolicy.client_env¦   s'   € Ø×+Ñ+Ò3ˆtÐY¼¿ºÀD×DXÑDXÓ9YÐYr   c                ó¾   € ^ RI Hp V P                  f   RM\        P                  ! V P                  4      pV! V P                  4       V P                  '       * VR7      # )é    )Úclient_env_scopeN)ÚlocalÚrules)Úagent.session_client_envr_   Úclient_env_rules_jsonrW   rX   r[   Úclient_env_remote)rZ   r_   ra   s   &  r   r_   Ú#LocalSessionPolicy.client_env_scope©   sF   € Ý=Ø×2Ñ2Ò:‘ÄÇ
Â
È4×KeÑKeÓ@fˆÙ §¡Ó 1¸T×=SÑ=SÔ9SÐ[`ÔaÐar   ÚsecretsTc               ó4   € V P                  WR 7      ^ ,          # )©rf   ©Ú	effective)rZ   r-   rf   s   &&$r   r   ÚLocalSessionPolicy.config®   s   € Ø�~‰~˜iˆ~Ó9¸!Õ<Ð<r   c          	     óð  € \        \        P                  ! V P                  4      4      pV P	                  V4      pV P
                  e¬   Ve¨   V'       d    ^ RIHpHp V! W4      pVP                  4        F[  w  r‰V^ ,          f   K  Tp
VRR  F3  p\        V
\        4      '       d   V
P                  V/ 4      MW«,          p
K5  	  WšVR,          &   K]  	  V! V\        VRR4      \        VRR4      4       V P                  pV'       EdÕ   VP                  R4      ;'       g    / \        P                  ! V P                   4      ríVP                  R4      pVRJ;'       d+    V\#        \%        V4      4      8H  ;'       d    \'        WÔ4      pRV9   d   RR	0M	\)        4       p\+        VR
R
V9   4      pTV'       d   RR0M	\)        4       ,          pTRV9   d   R0M	\)        4       ,          p\,         F0  pVV9   d   K  W´9   d   WK,          W;&   K  VP/                  VR4       K2  	  V'       d)   \1        YÓP                  R4      ;'       g    / 4      VR&   M"^ RIHp V! V4      ;'       g    V P                  pVP                  R/ 4      VP                  R4      ;'       g    / pp\6         F3  pVV9   d   K  VV9   d   VV,          VV&   K!  VP/                  VR4       K5  	  \        VP                  R4      \        4      '       d+   VP                  R4      ;'       g    / P                  R4      MRpV'       d@   Tp	V F,  p\        V	\        4      '       d   V	P                  V4      MRp	K.  	  W“R,          R&   W<3# )a¦  ``(config, model)`` the next turn runs, both from ONE read of the owning profile when following
(the turn's policy scope holds that read): a route never pairs one profile's model with another's
endpoint. Explicit choices (create-time reasoning / tier / toolsets, a session ``/reasoning`` until
reset, a pick that still holds) are applied over the followed defaults; frozen secrets of followed
sections are never recovered.N)Údisable_dropped_secretsÚrecover_config_secretsÚdroppedr   ÚmodelÚselection_profileÚtoolsetsÚplatform_toolsetsÚdisabled_toolsetsr   r   r   Úservice_tier)Ú_resolve_gateway_modelr   Úapi_key_fromÚapi_keyéÿÿÿÿ© )r(   rW   rX   Úconfig_jsonÚread_profileÚconfig_secret_refÚ"gateway.session_policy_credentialsrm   rn   Úitemsr   r   r   Úgetattrrp   r   Úrequest_jsonÚlistÚprofile_targetÚentry_servesÚsetr   ÚFOLLOW_SECTIONSr    Ú
_held_pickr'   rv   ÚFOLLOW_AGENT_KEYS)rZ   r-   rf   r   Úliverm   rn   Ú	recoveredÚpathÚvalueÚtargetr4   rp   rQ   ÚrequestÚpickÚheldÚpinnedÚchosenrv   r   Ú
live_agentÚsourceÚparts   &&$                     r   rj   ÚLocalSessionPolicy.effective±   só  € ô "¤$§*¢*¨T×-=Ñ-=Ó">Ó?ˆØ× Ñ  Ó+ˆØ×!Ñ!Ò-°)Ò2GÏGßjÙ.¨yÓ?ˆIØ(Ÿ™Ö0‘�Ø˜•7’?ÙØ�Ø  ›9�Cä;EÀfÌd×;SÒ;S˜V×.Ñ.¨s°BÔ7ÐY_ÕYd’Fñ %ð $)�t˜B•xÓ ñ  1ñ $ F¬G°I¸yÈ"Ó,MÌwÐW`ÐbkÐmqÓOrÔsØ—
‘
ˆßˆ4Ø$Ÿj™j¨Ó1×7Ð7°R¼¿ºÀD×DUÑDUÓ9V�GØ—:‘:Ð1Ó2ˆDØ˜tÐ#×iÐi¨´´^ÀDÓ5IÓ0JÑ(J×iÐiÌ|Ð\bÓOiˆDØCMÐQXÔCXÐ)Ð+>Ñ?Ô^aÓ^cˆFÜ# F¨K¸ÈÑ9OÓPˆFØÇVÐ)Ð+@ÑAÔQTÓQVÕVˆFØ¨.¸GÔ*C�~Ñ&ÌËÕNˆFß&�Ø˜&”=ÙØ”;Ø"&¥)�F“Kà—J‘J˜s DÖ)ñ '÷ Ü",¨V·Z±ZÀÓ5H×5NÐ5NÈBÓ"O��w’å>Ù.¨tÓ4×BÐB¸¿
¹
�Ø &× 1Ñ 1°'¸2Ó >ÀÇÁÈÓ@Q×@WÐ@WÐUW�:ˆEß(�Ø˜&”=ÙØ˜*Ô$Ø!+¨C¥�E˜#“Jà—I‘I˜c 4Ö(ñ )ô EOÈvÏzÉzÐZaÓObÔdh×DiÒDi�&—*‘*˜WÓ%×+Ð+¨×0Ñ0°Ô@ÐosˆßàˆEÛ�Ü+5°e¼T×+BÒ+B˜Ÿ	™	 $œÈ’ñ à).�7�O˜IÑ&Øˆ}Ðr   c                óÞ   € \         P                  ! V P                  4      P                  R 4      RJ ;'       g6    \         P                  ! V P                  4      P                  \
        4      RJ # )Úfollow_profile_configT)rW   rX   r�   r   r{   ÚFOLLOW_ADOPTEDrY   s   &r   Úfollows_profileÚ"LocalSessionPolicy.follows_profileë   s[   € ô —
’
˜4×,Ñ,Ó-×1Ñ1Ð2IÓJÈdÐR÷ Lð LÜ—:’:˜d×.Ñ.Ó/×3Ñ3´NÓCÀtÐKð	Mr   c                ó¦   € Ve   V P                   '       g   R# \        P                  4       pVe   V^ ,          V 8X  d
   V^,          # \        V4      # )z}The owning profile's current config for a following session, else None; inside this policy's
turn scope, the turn's one read.N)rš   Ú_TURN_PROFILEr   r.   )rZ   r-   r�   s   && r   r|   ÚLocalSessionPolicy.read_profileò   sJ   € ð Ò D×$8×$8Ð$8ÙÜ× Ñ Ó"ˆØÒ  Q¥¨4¤Ø˜•7ˆNÜ˜iÓ(Ð(r   c                óJ  € V P                   '       dI   V P                  \        9  g4   V P                  f&   R\        P
                  ! V P                  4      9   d   V P                  # \        \        \        / WP                  V P                  V P                  4      4      4      # )zºThe next turn's toolsets from its resolved *config*: a following session without an explicit
toolset pick runs the profile's current selection (main #124211), else the frozen launch set.rr   )rš   r”   rD   Úeditor_mcp_jsonrW   rX   r�   rr   ÚtupleÚsortedÚ_resolve_toolsetsÚ	safe_modeÚcoding_posture)rZ   r   s   &&r   Úcurrent_toolsetsÚ#LocalSessionPolicy.current_toolsetsü   st   € ð ×$×$Ð$¨¯©¼8Ô(CÀt×G[ÑG[ÒGgØ¤§¢¨D×,=Ñ,=Ó!>Ô>Ø—=‘=Ð ô ”VÔ-¨b°&¿+¹+ÀtÇ~Á~ÐW[×WjÑWjÓkÓlÓmÐmr   c                ól  € \        VRR4      pV'       d   Ve	   V! V4      MRpVe8   VP                  P                  e    \        VP                  P                  4      # V P                  '       g   V P
                  # ^ RIHp ^ RIH	p V P                  V! V4      RR7      w  rxT! Yx;'       g    R4      # )z The next turn's reasoning: a typed session /reasoning (the messaging handler's override), else
the profile's current effort when following, else the frozen one.Ú_peek_session_stateN©Úactive_authority©Úresolve_reasoning_configFrh   Ú )r€   ÚconversationÚreasoning_overrider   rš   Úreasoning_configÚgateway.session_authoritiesr«   Úhermes_constantsr­   rj   )	rZ   ÚrunnerÚsession_keyÚpeekÚstater«   r­   r   rp   s	   &&&      r   Úcurrent_reasoning_configÚ+LocalSessionPolicy.current_reasoning_config  s�   € ô �vÐ4°dÓ;ˆß%0°TÒ5E‘�[Ô!È4ˆØÒ ×!3Ñ!3×!FÑ!FÒ!RÜ˜×*Ñ*×=Ñ=Ó>Ð>Ø×#×#Ð#Ø×(Ñ(Ð(Ý@Ý=ØŸ™Ñ'7¸Ó'?È˜ÓO‰ˆÙ'¨·°¸Ó<Ð<r   c                óV  € ^ RI Hp ^ RIHp ^ RIHp V'       d   VP                  V4      MRpVe1   VP                  P                  VJd   VP                  P                  # V P                  V! V4      RR7      pT! VP                  R4      ;'       g    / P                  R4      4      # )	ziThe next turn's tier: a typed session /fast, else the policy's (frozen, or the profile's when following).)Úparse_service_tierrª   )ÚSERVICE_TIER_UNSETNFrh   r   ru   )Úagent.fast_moder»   r²   r«   Úgateway.session_stater¼   r©   r¯   Úservice_tier_overrider   r   )rZ   r´   rµ   r»   r«   r¼   r·   r   s   &&&     r   Úcurrent_service_tierÚ'LocalSessionPolicy.current_service_tier  sŠ   € å6Ý@Ý<ß;F�×*Ñ*¨;Ô7ÈDˆØÒ ×!3Ñ!3×!IÑ!IÐQcÓ!cØ×%Ñ%×;Ñ;Ð;Ø—‘Ñ-¨fÓ5¸u�ÓEˆÙ! 6§:¡:¨gÓ#6×#<Ð#<¸"×"AÑ"AÀ.Ó"QÓRÐRr   c                ó6   € V P                  VRR7      ^,          # )zVThe model this session's next turn runs: the profile's current default when following.Frh   ri   )rZ   r-   s   &&r   Úcurrent_modelÚ LocalSessionPolicy.current_model  s   € à�~‰~˜i°ˆ~Ó7¸Õ:Ð:r   c                ó`   € V P                  4       P                  R / 4      P                  R4      # )rp   Úprovider©r   r   rY   s   &r   rÆ   ÚLocalSessionPolicy.provider#  ó&   € à�{‰{‹}× Ñ  ¨"Ó-×1Ñ1°*Ó=Ð=r   c                ó`   € V P                  4       P                  R / 4      P                  R4      # )rp   Úbase_urlrÇ   rY   s   &r   rË   ÚLocalSessionPolicy.base_url'  rÉ   r   c                óŠ   € V P                   ;'       g1    \        P                  ! V P                  4      P	                  R R4      # )Úignore_rulesF)r¤   rW   rX   r�   r   rY   s   &r   rÎ   ÚLocalSessionPolicy.ignore_rules+  s1   € à�~‰~×YÐY¤§¢¨D×,=Ñ,=Ó!>×!BÑ!BÀ>ÐSXÓ!YÐYr   c                ób   € \         P                  ! V P                  4      P                  RR4      # )z©`hermes chat --yolo`: this session's dangerous-command approvals are bypassed, exactly the
scope `/yolo` gives a messaging chat; never the process-wide HERMES_YOLO_MODE.ÚyoloF©rW   rX   r�   r   rY   s   &r   rÑ   ÚLocalSessionPolicy.yolo/  s&   € ô �zŠz˜$×+Ñ+Ó,×0Ñ0°¸Ó?Ð?r   c                ób   € \         P                  ! V P                  4      P                  RR4      # )zD`--pass-session-id`: the session id rides the agent's system prompt.Úpass_session_idFrÒ   rY   s   &r   rÕ   Ú"LocalSessionPolicy.pass_session_id5  s'   € ô �zŠz˜$×+Ñ+Ó,×0Ñ0Ð1BÀEÓJÐJr   c                ó°   € V P                  4       P                  R/ 4      p\        \        V\        4      '       d   VP                  RR4      4      # T4      # )zXFrozen `checkpoints.enabled` (`--checkpoints` folds into it); legacy bool form accepted.ÚcheckpointsÚenabledF)r   r   r   r   r   )rZ   Úsections   & r   Úcheckpoints_enabledÚ&LocalSessionPolicy.checkpoints_enabled:  sG   € ð —+‘+“-×#Ñ# M°2Ó6ˆÜ´ZÀÌ×5NÒ5N�G—K‘K 	¨5Ó1Ó\Ð\ÐT[Ó\Ð\r   c                óœ   € ^ RI Hp V P                  4       pV! VP                  R/ 4      P                  RVP                  R4      4      4      # )r^   ©Úresolve_turn_limitr   Ú	max_turns)Úhermes_cli.configrß   r   r   )rZ   rß   Úcfgs   &  r   rà   ÚLocalSessionPolicy.max_turns@  s=   € å8Ø�k‰k‹mˆÙ! #§'¡'¨'°2Ó"6×":Ñ":¸;ÈÏÉÐP[ÓH\Ó"]Ó^Ð^r   c                ób   € \         P                  ! V P                  4      P                  RR4      # )z§`hermes chat -v`: the session's agent runs with quiet_mode off, so its status lines reach the
viewer (``agent.print``) as main's in-process verbose agent printed them.ÚverboseFrÒ   rY   s   &r   rå   ÚLocalSessionPolicy.verboseF  s&   € ô �zŠz˜$×+Ñ+Ó,×0Ñ0°¸EÓBÐBr   c                óx   € ^ RI Hp V! V P                  4       P                  R/ 4      P                  R4      4      # )zSFrozen `agent.run_budget_seconds` (`--run-budget` folds into it); None = no budget.)Ú_normalize_run_budget_secondsr   Úrun_budget_seconds)Úagent.agent_initrè   r   r   )rZ   rè   s   & r   ré   Ú%LocalSessionPolicy.run_budget_secondsL  s2   € õ 	CÙ,¨T¯[©[«]×->Ñ->¸wÈÓ-K×-OÑ-OÐPdÓ-eÓfÐfr   c                ód   € ^ RI Hp T! V P                  4       V P                  ;'       g    R4      # )r^   r¬   r®   )r³   r­   r   rp   )rZ   r­   s   & r   r±   Ú#LocalSessionPolicy.reasoning_configR  s$   € å=Ù'¨¯©«°t·z±z×7GÐ7GÀRÓHÐHr   c                óŽ  <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ R,          ;R&   S[S[ R3,          ;R&   S[ ;R&   S[ ;R	&   S[ ;R
&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[;R&   S[;R&   S[ R,          ;R&   S[;R&   S[ R,          ;R&   S[;R&   S[ R,          ;R&   S[ ;R&   # )é   r”   ÚplatformÚcwdNrp   .rr   r{   r�   Úterminal_jsonÚcredential_refr}   r    Úkanban_jsonr¤   Úignore_user_configÚskills_promptr¥   rV   rd   rc   Úedit_approval_policy)Ústrr¡   r   )ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚLocalSessionPolicy.__annotate__   s0  ø‡ ‚ á�Kñ ñ �Mñ ñ 
�Hñ	 ñ
 ��:Ññ ñ ‘C˜�H�oÑñ ñ Ññ ñ Ññ ñ Ññ ñ ˜$•JÑ%ñ ñ ˜T•zÑ(ñ ñ ˜4•ZÑ&ñ ñ �t•Ñ"ñ ñ  Ññ! ñ" Ñ$ñ# ñ( ˜•:Ñ$ñ) ñ0 Ñ ñ1 ñ6 ˜4•ZÑ&ñ7 ñ< Ñ#ñ= ñD  �:Ñ,ñE ñJ Ñ%òK r   rz   rH   ))Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ró   r}   r    rô   r¤   rõ   rö   r¥   rV   rd   rc   r÷   r[   r_   r   rj   r   rš   r|   r¦   r¸   rÀ   rÃ   ÚpropertyrÆ   rË   rÎ   rÑ   rÕ   rÛ   rà   rå   ré   r±   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)rú   s   @r   rS   rS      sŒ  ø‡ € ð "&€NØ$(ÐØ"&€OØ"€Kð €IØ$Ðð !%€Mð !€Nð #'€Oð $Ðð )-Ðð !&ÐòZòbñ
=°õ =ñ8°4õ 8ðt ñMó ðMò)ònô=ò	Sò;ð ñ>ó ð>ð ñ>ó ð>ð ñZó ðZð ñ@ó ð@ð
 ñKó ðKð ñ]ó ð]ð
 ñ_ó ð_ð
 ñCó ðCð
 ñgó ðgð
 ñIó ðI÷i ƒ r   rS   c                ó¤  € V P                  R4      p\        V\        4      '       d   \        VP                  R4      ;'       g    R4      P	                  4       p\        VP                  R4      ;'       g    R4      P	                  4       VP                  4       R8X  d   R3# T3# \        V\        4      '       d   VP	                  4       R3# RR3# )z`(model, provider) a profile config selects; 'auto' is no provider (main's _config_model_target).rp   rÆ   r®   r8   Úauto)r   r   r   rø   ÚstripÚlower)r   rp   rÆ   s   &  r   rƒ   rƒ   X  sª   € à�J‰J�wÓ€EÜ�%œ×ÒÜ�u—y‘y Ó,×2Ð2°Ó3×9Ñ9Ó;ˆÜ�5—9‘9˜YÓ'×-Ð-¨2Ó.×4Ñ4Ó6¸h¿n¹nÓ>NÐRXÔ>X¸ÐfÐfÐ^fÐfÐfÜ'¨¬s×3Ò3ˆE�K‰K‹M¸bÐ@Ð@¸¸bÐ@Ð@r   c                óð   € ^ RI Hp \        V \        4      '       d   T M/ p \	        V P                  R4      ;'       g    R4      P                  4       P                  4       V! V P                  R4      4      3# )zf``(provider, endpoint)`` identity of a ``model:`` block: what an endpoint-bound credential belongs to.©Únormalize_route_base_urlrÆ   r®   rË   )Úhermes_cli.route_identityr  r   r   rø   r   r  r  )Úblockr  s   & r   Úmodel_router  a  s^   € åBÜ ¤t×,Ò,‰E°"€EÜˆu�y‰y˜Ó$×*Ð*¨Ó+×1Ñ1Ó3×9Ñ9Ó;Ñ=UÐV[×V_ÑV_Ð`jÓVkÓ=lÐlÐlr   c                óî   € ^ RI HpHp \        V \        4      '       d   T M/ p V! W4      w  rgRWd! W#4      ^ ,          39   d   \        V 4      \        V4      8H  # T! V'       d   / V CRV/CW#4      # T W#4      # )aW  True when *block* (resolved in *config*) is the route *bound* was bound to, *bound* resolved in
the config it was bound in: a respelled provider on one endpoint is one route, and a named entry
whose ``base_url`` moved is another. An ``auto``/unset side keeps the literal comparison: a
credential never follows a route the resolver picks later.)Úresolved_routeÚ
same_router  rË   )Úgateway.session_route_identityr  r  r   r   r  )ÚboundÚbound_configr  r   r  r  ÚidentityÚurls   &&&&    r   Úbound_route_holdsr  h  sy   € ÷
 JÜ ¤t×,Ò,‰E°"€EÙ" 5Ó7�M€HØ�(˜N¨5Ó9¸!Õ<Ð=Ô=Ü˜5Ó!¤[°Ó%7Ñ7Ð7Ù·CÐ0˜Ð0 
¨CÑ0ÀEÓRÐR¸UÀEÓRÐRr   c                ó”  aa	€ ^ RI Ho \        V \        4      '       d   T M/ p S! V P	                  R4      4      o	S	'       g   R# ^ RIHp \        V P	                  R4      ;'       g    R4      P                  4       pV'       d
   V! W14      .M. pV P	                  R4      p\        V\        4      '       dY   \        V4      ^8”  dI   TpVRR  F,  p\        V\        4      '       d   VP	                  V4      MRpK.  	  VP                  V4       \        ;QJ d     VV	3R	 lV 4       F  '       d   K   R
# 	  R# ! VV	3R	 lV 4       4      # )a„  False when *block* pins a ``base_url`` that the config entry its credential comes from no longer
serves in *config*: its named provider (``providers:`` / ``custom_providers:``), or the alias its
``api_key_from`` points into. That entry's key (inline, ``key_env``, ``key_cmd``) authenticates the
entry's own endpoint, so a pick held on the old one ends rather than carry the new key there.r
  rË   T)Ú_named_entryrÆ   r®   rw   Nc              3   óü   <"  € T Fq  p\        V\        4      '       g   K  \        VP                  R 4      ;'       g    R4      P	                  4       '       g   KU  S! VP                  R 4      4      S8H  x € Ks  	  R# 5i)rË   r®   N)r   r   rø   r   r  )rJ   Úentryr  r  s   & €€r   rK   Úentry_serves.<locals>.<genexpr>ˆ  sb   øé € ð XÑSZÈ%Ü˜U¤D×)ô FÜ.1°%·)±)¸JÓ2G×2MÐ2MÈ2Ó.N×.TÑ.T×.Vô FÑ'¨¯	©	°*Ó(=Ó>À#ÖEÓSZùs   ƒA< A<½A<Á"A<Fry   )r  r  r   r   r   r  r  rø   r  r‚   ÚlenÚappendÚall)
r  r   r  rÆ   Úentriesr”   Úaliasr•   r  r  s
   &&      @@r   r„   r„   u  s  ù€ õ
 CÜ ¤t×,Ò,‰E°"€EÙ
" 5§9¡9¨ZÓ#8Ó
9€CßÙÝ;Ü�5—9‘9˜ZÓ(×.Ð.¨BÓ/×5Ñ5Ó7€Hß2:‰|˜HÓ-Ñ.À€GØ�Y‰Y�~Ó&€FÜ�&œ$×Ò¤C¨£K°!¤OØˆØ˜3˜B“KˆDÜ'1°%¼×'>Ò'>�E—I‘I˜d”OÀDŠEñ  à�‰�uÔß‹3õ XÑSZó X�3Œ3ð XŠ3ð Xˆ3õ XÑSZó Xó Xð Xr   c                óþ   € \        V 4      \        V4      8w  d   V # / VP                  4        UUu/ uF  w  r#V\        9  g   K  W#bK  	  uppC\         Uu/ uF  q"V 9   g   K  W V,          bK  	  upC# u uppi u upi )z¶A pick that still holds keeps its selection; on the profile's own endpoint the rest of the
``model:`` block (a rotated key included) is the profile's. Another endpoint never gets it.)r  r   ÚSELECTION_KEYS)rQ   r‰   ÚkÚvs   &&  r   r‡   r‡   Œ  s{   € ô �6Óœk¨$Ó/Ô/ØˆðE §
¡
¤ÔH¡™˜°¼Ñ0GŒtˆqŠt¡ÒHð EÝ%3ÓC¡^ ¸F±{Œ|ˆq˜•)Š|¡^ÑCðEð EùÓHùÚCs   °A4ÁA4ÁA:Á#A:c                ó  € V P                  4        UUu/ uF  w  rVf   K  WbK  	  p pp\        V P                  R4      \        4      '       d.   V R,          P	                  4       '       d   RV R,          /M/ V R&   V # u uppi )zÍA bare ``gateway:`` key parses as YAML null; like load_config's merge (#58277), treat it as absent so
``cfg.get('gateway', {}).get(...)`` reads the default instead of crashing a fresh install's first turn.rp   r8   )r   r   r   rø   r  )r   r4   rŒ   s   &  r   r(   r(   •  sn   € ð ,2¯<©<¬>ÔO©>™Z˜S¸UŒjˆcŠj©>€FÑOä�&—*‘*˜WÓ%¤s×+Ò+Ø:@À½/×:OÑ:O×:QÒ:Q˜9 f¨W¥oÑ6ÐWYˆˆw‰Ø€Mùó	 Ps
   ”A>¡A>Úprivate_secretsÚprofile_terminalÚworkspace_postureÚclient_localc                ó<  a € ^ RI Hp ^ RIHpHp ^ RIHp	 S P                  RR4      p
V
R8X  d   ^ RIH	p V! S WR7      # \        \        S 4      \        ,
          4      pV'       g"   \        V
\        4      '       d   V
\        9  d/   \!        V'       d   R	V^ ,           2MRV'       d   R
MRV
: 24       \#        V 3R l\$         4       R4      pV'       d   \!        VR4       S P                  RR4      pT;'       g    S P                  RR4      pRS 9   dG   \        S R,          \        4      '       d   S R,          P'                  4       '       g   \!        RR4       S P                  R4      pRS 9   d9   \        V\        4      '       d   VP'                  4       '       g   \!        RR4       S P                  R\        V! 4       4      4      p\        V\        4      '       d?   \)        V4      P+                  4       '       d    \)        V4      P-                  4       '       g   \!        RR4       S P                  R4      pRS 9   dJ   \        V\        4      '       d(   V'       d,   \)        V4      P+                  4       '       g   \!        RR4       S P                  R4      RJ d"   RS 9   d   \/        V	! 4       4      ;'       g    Tp^ RIHp V! V
S P                  R4      4       \5        S 4       \7        \8        P:                  ! \8        P<                  ! V4      4      4      p0 R)m\        \?        S 4      4      ,          pS P                  R4      RJ d0   V'       d(   \A        \C        V4      4      VPE                  R/ 4      R&   \G        S V4       T;'       d     V
R8g  ;'       d    RS 9   ;'       d    R S 9  pT;'       d    \I        WV4      p\K        S WVVVR!7      pV'       d   V! V	! 4       4      MV! 4       pS P                  R4      RJ g   \M        V4      '       d   VVR"&   R;ppR#S 9   dQ   ^ R$I'H(pH)p V! WR%7      p \8        P<                  ! V! S R#,          V4      RR&7      p\8        P<                  ! VRR&7      pS PW                  4        UUu/ uF  w  ppVR*9  g   K  VVbK  	  p ppV PE                  RR4       ^ R'I,H-p! V!! V V4       \]        W4       \]        VVR+4       \_        T
\        V
,          TT\a        \        V4      4      \8        P<                  ! V4      \8        P<                  ! V RR&7      \8        P<                  ! V4      YïTTVRJ;'       d    V'       * VR(7      #   \T         d!   p\!        R#\        T4      4        Rp?EL)Rp?ii ; iu uppi ),r^   )Úresolve_agent_cwd)Úbuild_profile_terminal_scopeÚdefault_terminal_scope)Úget_hermes_homer”   r:   Úa2a)Úbuild_forward_policy)r'  zparams.zunknown create fieldznot a surface: c              3   óp   <"  € T F+  qS9   g   K  \        SV,          4      \        Jg   K'  Vx € K-  	  R # 5irH   ©Útyper   ©rJ   ÚnameÚparamss   & €r   rK   Úbuild_policy.<locals>.<genexpr>­  s-   øé € Ðk© À¹”tÌDÐQWÐX\ÕQ]ÓL^ÔfjÐLj—t’t«ùs   ƒ6�6¬
6Númust be a booleanr¤   Frõ   rx   úmust be a non-empty stringrp   rñ   z1must be an absolute path to an existing directoryÚrow_cwdz!must be an absolute path when setÚcwd_explicit)Úvalidate_editorÚeditorr˜   Trq   r?   rr   )ÚbypassÚTERMINAL_CWDr[   )Úclient_env_rulesÚnormalise_client_env)r`   )Ú	sort_keys)Úprivate_editor_request)r¤   rõ   r¥   rV   rd   rc   >   rp   rË   rÆ   >   rx   r[   Ú
request_idrH   )1Úagent.runtime_cwdr,  Útools.terminal_scoper-  r.  r³   r/  r   Úgateway.session_a2ar1  r¢   r…   ÚCREATE_FIELDSr   rø   rD   rP   ÚnextÚBYPASS_FIELDSr  r   Úis_absoluteÚis_dirÚ_profile_workspace_cwdÚgateway.session_local_editorr=  Úlaunch_skillsr(   rW   rX   ÚdumpsÚ_without_auto_pickr‚   rƒ   r   Ú_apply_launch_overridesÚ_in_coding_workspacer£   Úterminal_uses_host_cwdrb   rA  rB  Ú
ValueErrorr   Úgateway.session_local_mcprD  Ú_extract_config_secretsrS   r¡   )"r7  r   r'  r(  r)  r*  r,  r-  r.  r/  r”   r1  ÚunknownÚ
bad_bypassr¤   rõ   rp   rñ   r;  r=  Úpicked_routeÚnamedr¥   rÙ   Úterminalr[   ra   rA  rB  Úexcr$  r%  rŽ   rD  s"   f&$$$$                            r   Úbuild_policyr_  Ÿ  sq  ø€ å3ßYÝ0à�Z‰Z˜ %Ó(€FØ�„Ý<Ù# F¨FÔTÐTÜ”S˜“[¤=Õ0Ó1€Gß”j ¬×-Ò-°¼xÔ1GÜ¯'�'˜' !�*˜Ñ&°xß*1Ñ&¸ÈÉ
Ð7Sô	UäÔk­ÓkÐmqÓr€JßÜ�
Ð/Ô0Ø—
‘
˜;¨Ó.€IØ"×MÐM f§j¡jÐ1EÀuÓ&MÐØ�FÔ¤J¨v°iÕ/@Ä#×$FÒ$FÈfÐU^ÕN_×NeÑNe×NgÒNgÜ�	Ð7Ô8Ø�J‰J�wÓ€EØ�&Ô¤*¨U´C×"8Ò"8ÀÇÁÇÂÜ�Ð5Ô6Ø
�*‰*�UœCÑ 1Ó 3Ó4Ó
5€CÜ�cœ3×Ò¤t¨C£y×'<Ñ'<×'>Ò'>ÄdÈ3Ãi×FVÑFV×FXÒFXÜ�ÐJÔKØ�j‰j˜Ó#€GØ�FÔ¤J¨w¼×$<Ò$<ÇÔQUÐV]ÓQ^×QjÑQj×QlÒQlÜ�	Ð>Ô?Ø‡z�z�.Ó! UÓ*¨u¸¬Ü$¡_Ó%6Ó7×>Ð>¸3ˆÝ<Ù�F˜FŸJ™J xÓ0Ô1Ü�&ÔÜœdŸjšj¬¯ª°FÓ);Ó<Ó=€FÚ4´sÔ;MÈfÓ;UÓ7VÕV€LØ‡z�zÐ)Ó*¨dÓ2·|ô ?CÄ>ÐRXÓCYÓ>Zˆ×Ñ˜' 2Ó&Ð':Ñ;Ü˜F FÔ+ð ×cÐc &¨FÑ"2×cÐc°uÀ±×cÐcÈ:Ð]cÑKc€EØ×HÐHÔ3°FÀCÓH€NÜ ¨¸	À>ÐZlÔm€GßBRÑ+©OÓ,=Ô>ÑXnÓXp€Hð ‡z�z�.Ó! TÓ)Ô-CÀH×-MÒ-MØ#&ˆ�Ñ ØÐ€J�Ø�vÔßSÙ  Ô<ˆð	,ÜŸšÑ$8¸ÀÕ9MÈuÓ$UÐaeÔfˆJô —
’
˜5¨DÔ1ˆà &§¡¤Ôc¡™˜˜1°!Ð;bÑ2bŒtˆq�!Št¡€GÑcØ×Ñ�x Ô'Ý@Ù˜7 OÔ4Ü˜FÔ4Ü˜H o°wÔ?Ü˜f¤h¨vÕ&6¸¸UÄEÌ&ÐQXË/ÓDZÜ"Ÿjšj¨Ó0´$·*²*¸WÐPTÔ2UÔW[×WaÒWaÐbjÓWkØ(1Ø-;ÈZØ0:À$Ð0F×0[Ð0[È|ÔK[Ø49ô;ð ;øô ô 	,Ü�L¤# c£(×+Ò+ûð	,üó ds$   Ñ&U* ÒVÒ#VÕ*VÕ5VÖVc                ó@  € \        V P                  R4      ;'       g    R4      P                  4       P                  4       p\        V P                  R4      ;'       g    R4      P                  4       P                  4       R9   pVR8H  ;'       g    VR8H  ;'       d    T# )z«Whether the terminal works in the session's host cwd: the local backend, or docker mounting it at
``/workspace``. ssh, modal and the other sandboxes resolve their own cwd.ÚTERMINAL_ENVr`   Ú&TERMINAL_DOCKER_MOUNT_CWD_TO_WORKSPACEr®   Údocker>   Ú1ÚonÚyesÚtrue)rø   r   r  r  )r]  ÚbackendÚmountss   &  r   rU  rU  í  s…   € ô �(—,‘,˜~Ó.×9Ð9°'Ó:×@Ñ@ÓB×HÑHÓJ€GÜ�—‘ÐFÓG×MÐMÈ2ÓN×TÑTÓV×\Ñ\Ó^Ðb|Ñ|€FØ�gÑ×AÐA '¨XÑ"5×"@Ð"@¸&ÐAr   c                óö  € ^ RI p^ RIHp V! V 4      R9   d   R# ^ RIHp V! \        V 4      R,          4      P                  R4      p\        \        V\        4      '       d   TM/ P                  R4      ;'       g    R4      P                  4       pVR	9  d5   VP                  P                  VP                  P                  V4      4      MRpV'       d$   VP                  P                  V4      '       d   V# R# )
zÂA NAMED profile's configured ``terminal.cwd``, which beats a client cwd the Desktop only inherited
(``cwd_explicit: false``; main's ``_completion_cwd``). Placeholders and missing dirs are unset.N)Úprofile_name_for_home)Úread_user_config_rawr&   r]  rñ   r®   >   Nr8   >   r®   Ú.rñ   r  )Úosr³   rk  rá   rl  r   r   rø   r   r   r  r‹   ÚabspathÚ
expanduserÚisdir)Úhomern  rk  rl  r]  ÚrawÚ
configureds   &      r   rN  rN  õ  s»   € ó Ý6Ù˜TÓ"Ð&7Ô7ÙÝ6Ù#¤D¨£J°Õ$>Ó?×CÑCÀJÓO€HÜ
œ: h´×5Ò5‰x¸2×BÑBÀ5ÓI×OÐOÈRÓ
P×
VÑ
VÓ
X€CØ=@ÐH`Ô=`�—‘—‘ §¡×!3Ñ!3°CÓ!8Ô9Ðfj€Jß#¨¯©¯©°j×(AÒ(Aˆ:ÐKÀtÐKr   c                ó
  € \        V P                  R4      \        4      '       dX   V R,          P                  4       P	                  4       R8X  d.   V P                  4        UUu/ uF  w  rVR8w  g   K  WbK  	  upp# V # u uppi )zc`provider: auto` is the thin client's "no pick" sentinel: the profile's route stands as configured.rÆ   r  )r   r   rø   r  r  r   )r7  r$  r%  s   &  r   rR  rR    si   € ä�&—*‘*˜ZÓ(¬#×.Ò.°6¸*Õ3E×3KÑ3KÓ3M×3SÑ3SÓ3UÐY_Ô3_Ø!'§¡¤ÔC¡™˜°1¸
±?”�’¡ÒCÐCØ€Mùó Ds   Á#A?Á3A?c                ó¶   € ^ RI HpHp V! V4      pVR8X  g-   \        V \        4      '       d   V P                  4       '       g   R# V! RV /V4      ^ ,          V8H  # )aT  Whether a provider pick resolves to the profile's own route, so its endpoint and key pins stay.

The same resolved provider under another spelling (`vllm` for `custom`, `deep-infra` for
`deepinfra`, `custom:<name>` for a named entry) is the same route. A block with an endpoint
and no provider (or `auto`) already routes to `custom` there.
)Úprofile_route_identityr  r  FrÆ   )r  rw  r  r   rø   r  )Úpickedr   rw  r  Úheld_ids   &&   r   Ú_keeps_profile_routerz  
  sO   € ÷ VÙ$ VÓ,€GØ�&Ô¤
¨6´3× 7Ò 7¸v¿|¹|¿~º~ÙÙ˜: vÐ.°Ó7¸Õ:¸gÑEÐEr   c                óü   € ^ RI HpHp V P                  R4      p\	        V\
        4      '       g   V # V! V4      pVR8X  g4   VP                  4       P                  4       V! WQ4      ;'       g    R8w  d   V # / V CRV/C# )a-  *params* with a provider pick of the held entry's bare config key spelled as its ``custom:<key>``.

A configured entry keyed like a canonical built-in (`providers: deepseek`) is shadowed by the
built-in in raw provider resolution, so the bare spelling would route, and be frozen, as a
different provider than the entry the profile runs (#140107). Only the held entry's bare key
is that entry (Desktop's guard). A keyed entry's display name is not; a keyless legacy
``custom_providers:`` entry's is (``configured_entry_key``). Other picks stay as they came.
)Úconfigured_entry_keyrw  rÆ   r  N)r  r|  rw  r   r   rø   r  r  )r7  r   r|  rw  rx  r  s   &&    r   Ú_with_entry_pickr}    sv   € ÷ \Ø�Z‰Z˜
Ó#€FÜ�fœc×"Ò"ØˆÙ% fÓ-€HØ�6Ô˜VŸ\™\›^×1Ñ1Ó3Ñ8LÈXÓ8^×8fÐ8fÐbfÔgØˆØ+ˆfÐ+�j (Ñ+Ð+r   c                ó¤  a € ^ RI Hp ^ RIHp ^ RIHp \        \        S 4      V4      o RS 9   ;'       d    \        S R,          V4      pRS 9   d<   V'       g4   TP                  R/ 4      p^ RI
Hp V F  pVP                  VR4       K  	  R Fç  p	V	S 9   g   K  S V	,          p
\        V
\        4      '       d   V
P                  4       '       g   \!        V	R	4       V	R8X  d€   V! V
4      pVP"                  R9  g[   VP$                  '       dI   VP&                  '       g7   VP(                  '       g%   VP*                  '       g   VP,                  '       d   \!        RR
4       W¡P                  R/ 4      V	&   Ké  	  \/        V 3R lR 4       R4      pV'       d   \!        VR4       RS 9   dp   ^ RIHp  \        S R,          \        4      '       d   V! S R,          4      MRpVf   \!        RRS R,          : 24       T;'       g    RVP                  R/ 4      R&   RS 9   dm   S R,          p
\        V
\6        4      '       g$   \        V
\8        \:        34      '       d   V
^ 8”  g   \!        RR4       \;        V
4      VP                  R/ 4      R&   S P=                  R4      '       dU   VP=                  R4      p\        V\>        4      '       d   \?        V4      MV'       d   R\7        V4      /M/ p/ VCRR/CVR&   RS 9   d_   S R,          p
\        V
\8        \        34      '       d   V! V
^ R7      M^ pV'       g   \!        RRV
: 24       VVP                  R/ 4      R&   RS 9   d[   \        S R,          \        4      '       d   V! S R,          4      f   \!        RRS R,          : 24       \A        VS R,          4       R# R#   \4         d    Rp ELði ; i) zOValidate the explicit model/agent launch overrides and fold them into *config*.)ÚurlsplitrÞ   )Úparse_reasoning_effortrÆ   rp   )ÚROUTE_BOUND_KEYSNrË   r:  z=must be an http(s) URL without credentials, query or fragmentc              3   ór   <"  € T F,  pVS9   g   K  \        SV,          4      \        Jg   K(  Vx € K.  	  R # 5irH   r3  )rJ   Úflagr7  s   & €r   rK   Ú*_apply_launch_overrides.<locals>.<genexpr>J  s>   øé € ð Kñ 'Z˜dà ™ô ä+/°°tµÓ+=ÄTÐ+I÷ ’Tó 'Zùs   ƒ	7‘7­
7rØ   r9  ru   )Úparse_exact_service_tierznot a known tier: Únormalr   Ú
run_budgetz$must be a positive number of secondsré   rÙ   Trà   r7   zunreadable cap: r   znot a known effort level: )rÆ   rË   >   ÚhttpÚhttps)rÎ   rÑ   rØ   Úaccept_hooksrÕ   r˜   r<  rå   )!Úurllib.parser  rá   rß   r³   r€  r}  rR  rz  r   r  r�  r    r   rø   r  rP   ÚschemeÚhostnameÚusernameÚpasswordÚqueryÚfragmentrJ  r½   r…  rV  r   ÚintÚfloatr   r   r"   )r7  r   r  rß   r€  Úpicks_profile_entryrp   r�  Ústaler4   rŒ   r  Úbad_flagr…  ÚtierrÚ   Úlimits   f&               r   rS  rS  +  sO  ø€ å%Ý4Ý7ÜÔ0°Ó8¸&ÓA€FØ$¨Ñ.×cÐcÔ3GÈÈzÕHZÐ\bÓ3cÐØ�VÔ×$7Ø×!Ñ! '¨2Ó.ˆõ 	Dã%ˆEØ�I‰I�e˜TÖ"ñ &ã'ˆØ�&Ž=Ø˜3•KˆEÜ˜e¤S×)Ò)°·±·²Ü˜Ð9Ô:Ø�jÔ Ù˜u“o�Ø—J‘JÐ&7Ô7¸s¿|¿|¸|ØŸ<Ÿ<˜<¨3¯<¯<¨<¸3¿9¿9¸9ÈÏÏÈÜ˜JÐ(gÔhØ27×Ñ˜g rÓ*¨3Ó/ñ (ô ô Kñ 'Zó KàLPóR€H÷ Ü�Ð-Ô.Ø˜Ôõ 	=ð	ÜGQÐRXÐYgÕRhÔjm×GnÒGnÑ+¨F°>Õ,BÔCÐtxˆDð Š<Ü�NÐ&8¸ÀÕ9OÑ8RÐ$SÔTØ9=×9IÐ9IÀˆ×Ñ˜' 2Ó& ~Ñ6Ø�vÔð �|Õ$ˆÜ�eœT×"Ò"¬*°U¼SÄ%¸L×*IÒ*IÐQVÐYZÔQZÜ�LÐ"HÔIÜ?DÀU»|ˆ×Ñ˜' 2Ó&Ð';Ñ<Ø‡z�z�-× Ò Ø—*‘*˜]Ó+ˆÜ#-¨g´t×#<Ò#<”$�w”-×`gÀ9ÌdÐSZËmÑB\ÐmoˆØ < 7Ð <¨I°tÑ <ˆˆ}ÑØ�fÔð �{Õ#ˆÜ8BÀ5Ì3ÔPSÈ*×8UÒ8UÑ" 5°!Õ4Ð[\ˆßÜ�KÐ#3°E±9Ð!=Ô>Ø6;ˆ×Ñ˜' 2Ó& {Ñ3Ø�fÔÜ˜& Õ-¬s×3Ò3Ñ7MÈfÐU`ÕNaÓ7bÒ7jÜ�KÐ#=¸fÀ[Õ>QÑ=TÐ!UÔVÜ˜V V¨KÕ%8Ö9ñ øô1 ô 	Ø‹Dð	ús   Æ0.N> Î>OÏOc           
     ó$  € ^ RI HpHp ^ RIHp ^ RIHp	 V P                  R4      p
RV 9   Ed   \        V
\        4      '       g#   \        RR\        V
4      P                   24       V'       d   T	MV! V4      p\        VP                  R4      \        4      '       d   VP                  R4      M/ pV'       d	   V! V4      M	\        4       pV
 F¢  p\        V\        4      '       d   V! V4      '       g   \        RRV: 24       VP!                  R4      '       d   Wì9  d
   VR	,          MTpWü9   g   Kg  Wý9  g   Ko  \        WÏ,          \        4      '       d   R
MRp\        RRV: RV 24       K¤  	  RV
9   d   VR8w  d   \        RRV 24       Y¡P#                  R/ 4      VR8X  d   RMR&   RpV
f   V'       d   ^ RIHp V! V4      pVe   \        V4      MT! YR8X  d   RMR4      pV
e€   ^ RIHp V
 UUu0 uF  pV! V4       F  pVkK  	  K  	  pppV UUu0 uF  pV! V4       F  pVkK  	  K  	  pppVV8:  g/   \        RRRP+                  \-        VV,
          4      4       24       V
fz   VR9   ds   ^ RIHp ^ RIHp \        T! VP                  R4      ;'       g    / P                  R4      4      4      pVR8X  d   \        V4      MR0pVVVR0,
          ,
          ,          pV'       d   ^ RI Hp VV! 4       ,          pV# u uppi u uppi ) zúValidate explicit toolsets and return the session's enabled toolset set. Without a pick, a
*coding_posture* session runs ``focus_toolsets`` instead of the profile default while the profile
stays on ``focus``; the gateway decides it, never the client.)Ú_get_platform_toolsÚenabled_mcp_server_names)Úsaved_toolset_resolver)Úvalidate_toolsetrr   z%must be a list of toolset names, got Úmcp_serversz!unknown or invalid toolset name: zmcp-:é   NNzis disabled in configzhas no usable config entryzMCP server Ú Ú
desktop_uir<   z4desktop_ui is only available on the Desktop, not on rs   r>   r:   N)Úfocus_toolsets)Úresolve_toolsetznot available on this surface: ú, )Úparse_config_string_list)ÚCLIENT_SURFACE_TOOLSETSr   rt   Úproject)Ú_get_plugin_toolset_keys>   r<   r;   )Úhermes_cli.tools_configrš  r›  Úhermes_cli.toolset_validationrœ  rr   r�  r   r   r‚   rP   r4  rý   r   r…   rø   Ú
startswithr   Úagent.coding_contextr¢  r£  Újoinr¢   Úagent.skill_utilsr¥  r¦  r¨  )r7  r   r”   r¤   r¥   r?  rš  r›  rœ  r�  ÚexplicitÚknownrt  Úenabled_serversr6  ÚserverÚwhyÚposturer¢  rÙ   r£  ÚtÚ	requestedrj   r¥  r¦  ÚdisabledÚsurfacer¨  s   &&&&&&                       r   r£   r£   s  s®  € ÷ VÝDÝ)Ø�z‰z˜*Ó%€HØ�VÕÜ˜(¤D×)Ò)Ü�JÐ"GÌÈXË×H_ÑH_ÐG`Ð aÔb÷ %+Ñ Ñ0FÀvÓ0NˆÜ2<¸V¿Z¹ZÈÓ=VÔX\×2]Ò2]�V—Z‘Z Ô.Ðceˆ
ß>HÑ2°6Ô:ÌcËeˆÛˆDÜ˜d¤C×(Ò(±°d·²Ü˜
Ð&GÈÁxÐ$PÔQØ!%§¡°×!8Ò!8¸TÔ=S�T˜"–XÐY]ˆFØÖ#¨Ö(Eä1;¸JÕ<NÔPT×1UÒ1UÑ-Ð[w�Ü˜
 k°&±¸1¸S¸EÐ$BÖCñ ð ˜8Ô#¨°%¬Ü�JÐ"VÐW]ÐV^Ð _Ô`ØZb×ÑÐ-¨rÓ2¸FÀe¼O±5ÐQVÑWØ€GØÒŸNÝ7Ù  Ó(ˆØ%Ò1Œc�'ŒlÑ7JÈ6ÐfkÔ\kÑSXÐqvÓ7w€GØÒÝ,Ù#+ÔK¡8˜4±_ÀTÖ5J°“QÑ5J‘Q¡8ˆ	ÑKÙ#*ÔJ¡7˜4±OÀDÖ4I¨q“QÑ4I‘Q¡7ˆ	ÑJØ˜IÔ%Ü�JÐ"AÀ$Ç)Á)ÌFÐS\Ð_hÕShÓLiÓBjÐAkÐ lÔmØÒ˜F nÔ4õ
 	?Ý4ÜÑ/°·±¸GÓ1D×1JÐ1JÈ×0OÑ0OÐPcÓ0dÓeÓfˆØ28¸E´/”#Ð-Ô.È	À{ˆØ�7˜h¨,¨Õ7Õ8Õ8ˆßåDØÑ+Ó-Õ-ˆØ€Nùó% LùÛJs   Ç7LÈLc                óŽ   € ^ RI Hp  V! \        V,          W R7      #   \         d    \        P                  RTRR7        R# i ; i)z¯Whether *cwd* selects the coding posture (``agent.coding_context: focus`` in a code workspace).
A detection failure keeps the profile default rather than refusing the session.)Úin_focus_workspace)rð   rñ   r   zCcoding posture detection failed for %s; keeping the profile defaultT©Úexc_infoF)r¬  rº  rD   Ú	ExceptionÚloggerÚdebug)r   r”   rñ   rº  s   &&& r   rT  rT  «  sE   € õ 8ðÙ!¬8°FÕ+;ÀÔTÐTøÜô Ü�‰ÐZÐ\_ÐjnˆÔoÚðús   ˆ �#AÁAc                 ó  € ^ RI Hp ^ RIHp 0 Rmp\	        V \
        4      '       d   V P                  4       M"\	        V \        4      '       d   \        V 4      MRpV F   w  rxW'3,           p	\	        V\        4      ;'       d?    VP                  4       V9   ;'       g$    VP                  4       V9   ;'       g	    V! V4      p
V
'       d)   V'       d!   VR9  d   Vf   \        R4      hW�V	&   RW&   K”  \        W�V	4       K¢  	  R# )r^   )Ú_SECRET_CONFIG_KEYS)Ú_is_secret_payload_keyNÚlaunch_credentials_unavailable>   ÚenvÚheadersÚ
docker_envÚextra_headersÚdocker_extra_argsÚterminal_docker_envÚterminal_docker_extra_argsrz   )z{}z[])rá   rÁ  Úagent.credential_persistencerÂ  r   r   r   r‚   Ú	enumeraterø   r  r   rX  )rŒ   Úprivater‹   rÁ  rÂ  Ú
containersr   r4   ÚchildÚ
child_pathÚ	sensitives   &&&        r   rX  rX  ¶  sã   € õ 6ÝCòG€Jä'¨¬t×4Ò4ˆE�K‰KŒMÌjÐY^Ô`d×NeÒNe¼)ÀEÔ:JÐkm€EÛ‰
ˆØ˜F•]ˆ
Ü˜s¤CÓ(÷ Qð Q¨c¯i©i«kÐ=PÑ.P÷ /Pð /PØ—y‘y“{ jÑ0÷/Pð /PÙ4JÈ3Ó4Oð 	çŸ 5°Ô#<ØŠÜ'Ð(HÓIÐIØ"'�JÑØˆE‹Jä# E°JÖ?ó r   c                óþ  a € S P                  R. 4      pRS 9   de   \        V\        4      '       dC   V'       d;   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \	        RR4       V'       dU   \        ;QJ d#    V 3R l\
         4       F  '       g   K   RM	  RM! V 3R l\
         4       4      '       d   \	        RR4       V Uu. uF  q"P                  4       NK  	  up# u upi )z¯The validated `-s/--skills` identifiers of a create request (empty when absent). Skills
live in the profile, which a bypass launch must never read: refused there, not dropped.Úskillsc              3   ó†   "  € T F7  p\        V\        4      '       * ;'       g    VP                  4       '       * x € K9  	  R # 5irH   )r   rø   r  )rJ   Úss   & r   rK   Ú launch_skills.<locals>.<genexpr>Ð  s0   é € Ð%^ÑW]ÐRS¬*°Q¼Ó*<Ô&<×&MÐ&MÀAÇGÁGÃIÄÔ&MÓW]ùs
   ‚ A£ATFz'must be a non-empty list of skill namesc              3   óJ   <"  € T F  pSP                  V4      R J x € K  	  R# 5i©TN)r   r5  s   & €r   rK   rÖ  Ò  s   øé € ÐI¹=°4�f—j‘j Ó&¨$Õ.»=ùs   ƒ #zFa bypass launch never reads the profile, so skills cannot be preloaded)r   r   r‚   ÚanyrP   rK  r  )r7  rÓ  rÕ  s   f  r   rP  rP  Ë  s£   ø€ ð �Z‰Z˜ "Ó%€FØ�6Ô¤:¨f´d×#;Ò#;Ç6ß"%£#Ñ%^ÑW]Ó%^§#§#¢#Ñ%^ÑW]Ó%^×"^Ò"^Ü�ÐCÔDß—#“#ÔI½=ÓI—#—#’#ÔI½=ÓI×IÒIÜ�ÐbÔcÙ%Ó&™v˜!�G‰GŽI™vÑ&Ð&ùÒ&s   ÃC:c                ó$  € \        V 4      pV'       g   R# ^ RIHpHp V! W!R7      w  rVpV'       g   \	        R4      hV'       dB   ^ RIpVP                  ! \        4      P                  RV! V4      VRP                  V4      4       T;'       g    R# )a  `-s/--skills` preload blocks for a new session, rendered ONCE at creation and frozen in its
policy (the CLI's startup preload). Blocking skill-tree reads: callers run it off the owner
loop. A typo among good names is logged and skipped, like the CLI; none resolving refuses.N)Úbuild_preloaded_skills_promptÚformat_missing_skills)Útask_idÚunknown_skillz/Skipping %s for session %s; continuing with: %sr¤  )
rP  Úagent.skill_commandsrÛ  rÜ  r   ÚloggingÚ	getLoggerrý   Úwarningr­  )	r7  Ú
session_idrÓ  rÛ  rÜ  ÚpromptÚloadedÚmissingrà  s	   &&       r   Úrender_launch_skillsrç  ×  s|   € ô ˜6Ó"€FßÙßYÙ;¸FÔWÑ€F�GßÜ Ó0Ð0ßÛØ×Òœ(Ó#×+Ñ+Ð,]Ù,AÀ'Ó,JÈJÐX\×XaÑXaÐbhÓXiô	kà�>ˆ>�TÐr   c                óÎ   € \         P                  ! V P                  4      P                  R4      '       d0   V P                  '       g   ^ RIHp ^ RIHp V! V! 4       4       R# R# R# )ar  `--accept-hooks` / `HERMES_ACCEPT_HOOKS=1` on a launch: consent to the profile's configured
shell hooks in the per-user allowlist (no prompt; kept in memory if that write fails), which
the open's ``refresh_profile_hooks`` then registers. A bypass launch has no profile hooks to
consent to, so the flag is a no-op there rather than a refusal. Allowlist I/O: off the loop.rŠ  )Úaccept_for_launchr$   N)	rW   rX   r�   r   rõ   Úagent.shell_hooksré  r'   r%   )Úpolicyré  r%   s   &  r   Úaccept_launch_hooksrì  é  sK   € ô
 ‡z‚z�&×%Ñ%Ó&×*Ñ*¨>×:Ò:À6×C\×C\ÐC\Ý7Ý4ÙÑ.Ó0Ö1ñ D]Ñ:r   c                ó²   € V e   V P                   '       d   R# ^ RIHp ^ RIHp  V! V4       R#   \
         d    \        P                  RRR7        R# i ; i)a½  Bring this owner's shell hooks in step with the profile on every local session open
(create and resume): hooks added to ``config.yaml`` or approved since the gateway started
register, removed or revoked ones stop firing, as each new CLI process did on main. Reads the
owner home's LIVE config (as session creation does), never the session's frozen copy: the
registry is shared by every session and surface of this profile. Consent comes from the
allowlist (the launching client's TTY prompt, or ``accept_launch_hooks``) or an opt-in in force
on the gateway itself; this never prompts. A bypass launch registers nothing (main's safe mode
registered none). Config read + allowlist I/O: run off the loop.N)Úsync_from_configr$   z7shell-hook re-sync failed; keeping the registered hooksTr»  )rõ   rê  rî  r'   r%   r½  r¾  râ  )rë  rî  r%   s   &  r   Úrefresh_profile_hooksrï  ô  sO   € ð ‚~˜×2×2Ð2ÙÝ2Ý0ðaÙÐ-Ö.øÜô aÜ�‰ÐPÐ[_ˆ×`ðaús   ¦0 °"AÁAc                óˆ  € V P                   '       d   R# \        P                  ! V P                  ;'       g    R4      ;'       g    / p\        P                  ! V P                  4      P                  R4      RJ ;'       g    VP                  R4      RJ p^ RIHp ^ RIHp V P                  4       pV! WRR7       V! V4       R# )a‚  Worker side of the same contract: tools run in the managed child, so its own plugin
manager needs the session's shell hooks and outbound webhooks, registered from the frozen
config with the launch's consent (a Kanban attempt always consents), as the classic one-shot
CLI registered both at startup. Bypass sessions register nothing (the safe policy also
refuses inside both registrars).NÚnullrŠ  T)Úregister_from_config)rŠ  )
rõ   rW   rX   rô   r�   r   Úagent.outbound_webhooksrò  rê  r   )rë  ÚkanbanÚacceptÚregister_outbound_webhooksrò  r   s   &     r   Úregister_worker_hooksr÷    s”   € ð × × Ð ÙÜ�ZŠZ˜×*Ñ*×4Ð4¨fÓ5×;Ð;¸€FÜ�ZŠZ˜×+Ñ+Ó,×0Ñ0°Ó@ÀDÐH×nÐnÈFÏJÉJÐWeÓLfÐjnÐLn€FÝZÝ6Ø�]‰]‹_€FÙ˜Õ5Ù˜vÖ&r   Úconfig_secretsÚ	owner_keyÚclient_requestc          	     ó"  € ^ RI Hp ^ RIp^ RIHp	Hp
 \        T;'       g    / 4      pV
! WW$P                  V	R4      4      pVf   V'       g   V! VRRR7      # \        V RR4      pVf	   / ;q°n	        V P                   RV P                   RV 2pVP                  V4      p\        V RR4      pVf	   / ;qàn        V'       dC   Ve?   Ve;   WÎ9   d5   ^ RIHp T! Wì,          VP                   T;'       g    / 4      '       d   TMTpVe'   Ve#   VP#                  WÓ4      '       g   \%        R	4      h\        V R
R4      pVf
   / ;pV n        TpV'       d   \        V RR4      e   ^ RIHp V! WW$4      pVV9   d   VV,          V8w  d   \%        R	4      hV'       d   \        V4      VV&   Ve,   Vf(   V'       d    R Uu/ uF  pV\        VV4      bK  	  upWì&   Ve   W;V&   ^ RIHp T! Y#e   V RV! V4       2MRV'       d   VR7      # RR7      # u upi )a+  CLI keys live only in this authority lifetime, never its durable receipt.

Restart deliberately revokes them. History remains readable; inference must
report launch_credentials_unavailable, never select a profile fallback key.
An ``owner_key`` (an alias's, expanded by the owner) of the same create request as the attempt
holding the slot (``same_create_retry``, its ``client_env`` in ``client_request``) takes the held
key: a ``.env`` rotation between overlapping attempts is not a changed request, and the policy
then fingerprints the key it runs with.
©ÚreplaceN)ÚPRIVATE_KEYÚbind_editor_mcp)ró   r}   Ú_local_launch_keysÚ:Ú_local_owner_key_requests)Úsame_create_retryÚadmission_conflictÚ_local_config_secretsr)   )Úconfig_reference©Úfingerprint_secret_valueÚ#)r�   rV   rc   )Údataclassesrý  ÚhmacrW  rþ  rÿ  r   r    r€   r   Úinstance_idÚepochr   r  Úhermes_state_localr  r�   Úcompare_digestr   r  r~   r  rË  r  )r-   rã  rë  rx   rø  rù  rú  rý  r  rþ  rÿ  ÚkeysÚrefÚoldÚownersr  ÚconfigsÚ
config_refr  r$  r  s   &&&&$$$              r   Úbind_launch_keyr    s   € õ $ÛßFÜ˜.×.Ð.¨BÓ/€NÙ˜Y°F×<NÑ<NÈ{Ð\`Ó<aÓb€FØ‚Ÿ~ñ �v¨dÀdÔKÐKÜ�9Ð2°DÓ9€DØ‚|Ø.0Ð0ˆÔ+Ø×"Ñ"Ð# 1 Y§_¡_Ð$5°Q°z°lÐ
C€CØ
�(‰(�3‹-€CÜ�YÐ ;¸TÓB€FØ‚~Ø79Ð9ˆÔ4ß�WÒ(¨Sª_ÀÄÝ8Ù*¨6­;¸×8KÑ8KÈ^×MaÐMaÐ_a×bÒb‘#Ðhoˆð Ò˜sš°t×7JÑ7JÈ3×7XÒ7XÜÐ 4Ó5Ð5Ü�iÐ!8¸$Ó?€GØ‚Ø46Ð6ˆ�)Ô1Ø€Jßœ' )¨T°4Ó8ÒDÝGÙ% i¸VÓTˆ
Ø�WÔ ¨Õ!4¸Ô!FÜÐ 4Ó5Ð5ßÜ" >Ó2ˆ�
ÑØÒ˜sš{¯yÙ6rÓsÑ6r°�qœ' &¨!Ó,Ò,Ñ6rÑsˆ‰ØÒØˆS‰	õ FÙ�6ÒZm¨S¨E°Ñ3KÈGÓ3TÐ2UÑ*VÐswß3A ZôMð MØGKôMð Mùò ts   Æ9Hc                ó4   € V P                  R^4      ^ ,          # )z^The in-memory slot of a durable credential ref (``<instance>:<epoch>:<sid>[#<fingerprint>]``).r	  )Úsplit)ró   s   &r   Ú	_key_slotr  R  s   € à×Ñ  QÓ'¨Õ*Ð*r   c                ó<  € ^ RI p^ RIHp ^ RIHp \        V\        4      '       d   VP                  4       '       g   \        RR4       V P                  VP                  ,          P                  pVe   VP                  VP                  8w  d   \        R4      h^ RIHp \#        V! V P$                  VP                  4      R,          4      P&                  pVf   \        R4      h\)        V R	R4      p	V	f	   / ;q�n        V	P-                  \/        V4      4      p
V
e%   VP1                  W¢4      '       g   \        R4      hR# VP3                  R
4      w   r¼V'       d(   TP1                  YÄ! V4      ;'       g    R4      '       g   \        R4      hW)\/        V4      &   R# )al  ``session.resume`` re-supplying a launch-only key after an owner restart revoked it
(call after authorizing *session*, a SessionRef).

Only a session launched with a key can take one, and only that same key (its durable
fingerprint); anything else is an override of the frozen route and is refused. Like the
original, the key lives in this authority's memory only.Nr  ©ÚPlatformrx   r:  r  )Úlocal_receiptrë  r   r	  r®   )r  rË  r  Úgateway.configr  r   rø   r  rP   Úsessionsrã  r”   rð   ÚLOCALr   r  r  Úrestore_policyr)   ró   r€   r   r   r  r  Ú	partition)r-   r   rx   r  r  r  r”   r  r  r  r�   Ú_Úfingerprints   &&&          r   Úrebind_launch_keyr%  W  sL  € ó ÝEÝ'Ü�gœs×#Ò#¨7¯=©=¯?ª?Ü�	Ð7Ô8Ø×Ñ × 2Ñ 2Õ3×:Ñ:€FØ‚~˜Ÿ™¨H¯N©NÔ:ÜÐ 4Ó5Ð5Ý0Ü
™ y§|¡|°W×5GÑ5GÓHÈÕRÓ
S×
bÑ
b€CØ
‚{ÜÐ 4Ó5Ð5Ü�9Ð2°DÓ9€DØ‚|Ø.0Ð0ˆÔ+Ø�8‰8”I˜c“NÓ#€DØÒØ×"Ñ" 4×1Ò1Ü#Ð$8Ó9Ð9ÙØŸ™ cÓ*Ñ€A€qß˜d×1Ñ1°+Ð?WÐX_Ó?`×?fÐ?fÐdf×gÒgÜÐ 4Ó5Ð5Ø"Œ�3‹Ór   c                óž  € ^ RI Hp V Uu. uF)  p\        V P                  P	                  V4      RR4      NK+  	  ppV Uu. uF1  qUf   K  VP
                  VP                  8X  g   K%  VP                  NK3  	  ppV'       g   \        4       # ^ RI	H
p \        V! V 4      P	                  VP                  4      RR4      ;'       g    / p\        4       p	\        R\        VP                  V4      4       FN  p
T	P                  R V
P                  ;'       d    \        V
P                  4      V
P                   3 4       4       KP  	  V	# u upi u upi )z`The launch-key slots and config-secret references the live LOCAL policies of *session_ids* name.r  r”   N)Úlocal_adapter_mapÚpoliciesc              3   ó:   "  € T F  pV'       g   K  Vx € K  	  R # 5irH   rz   )rJ   r  s   & r   rK   Ú_secret_refs.<locals>.<genexpr>ƒ  s!   é € ð Fñ $>˜CÜAD÷ ’Có $>ùs   ‚
‘
)r  r  r€   r  r   rð   r   Úchat_idr…   Úgateway.session_local_recoveryr'  ÚfilterÚmapÚupdateró   r  r}   )r-   Úsession_idsr  ÚsidÚsourcesr”   Úchatsr'  r(  Úrefsrë  s   &&         r   Ú_secret_refsr5  x  s  € å'ÙOZÓ[É{ÈŒw�y×)Ñ)×-Ñ-¨cÓ2°H¸dÖCÉ{€GÐ[Ù*1Ón©' Œ^ÈFÏOÉOÐ_g×_mÑ_mÑLmŒ^ˆV�^Œ^©'€EÐnßÜ‹uˆÝ@ÜÑ(¨Ó3×7Ñ7¸¿¹ÓGÈÐUYÓZ×`Ð`Ð^`€HÜ‹5€DÜ˜œs 8§<¡<°Ó7Ö8ˆØ�‰ñ F F×$9Ñ$9×$^Ð$^¼iÈ×H]ÑH]Ó>^Ø$*×$<Ñ$<ñ$>ó Fö 	Fñ 9ð €Kùò \ùÚns   ‹/EÁ E
Á
E
Á'E
c           	     ó:  € ^ RI p^ RIHp V Uu0 uF  p\        V4      kK  	  ppV'       g   R# \	        V \        V P                  4      V,
          4      pV P                   RV P                   R2p\        V RR4      ;'       g    / p\        V RR4      ;'       g    / p	V U
u. uF,  qªP                  R^4      R
,          V9   g   K"  W¦9  g   K*  V
NK.  	  up
 F  p
WŠ V	P                  V
R4       K  	  \        V RR4      ;'       g    / p\        V4       F…  p
V
P                  V4      '       d3   \        P                  ! V
\!        V4      R 4      P#                  R4      pM'V
P                  V4      '       d   V
\!        V4      R MRpWÅ9   g   K{  W¦9  g   Kƒ  Wº K‡  	  \        V RR4      ;'       g    / pV FV  pVP                  R	VP%                  V P&                   RV 2P)                  4       4      P+                  4       ,           R4       KX  	  R# u upi u up
i )a½  Drop retired sessions' launch keys, frozen config secrets and editor MCP servers.

They live only in this authority's memory for the session's lifetime; a deleted session can
never run again, so keeping them would hold its credentials until the process exits. A branch's
policy names its parent's slots, so a slot named after a retired session stays while a live
policy references it, and then until restart, which revokes every launch secret anyway. Only
slots named after *session_ids* are released, so the set never exceeds release by name: no later
sweep, and a binding not yet published always sits under its own live session's name. Call
before the retired sessions leave ``authority.sessions``.N)ÚPREFIXr  r   r  r  r   Ú_local_editor_mcpzeditor-session:ry   )Úhashlibr~   r7  rø   r5  r…   r  r  r  r€   r  r    r‚   r«  rW   rX   r  r   Úsha256Ú
profile_idÚencodeÚ	hexdigest)r-   r0  r9  r7  r1  ÚretiredÚkeptÚprefixr  r  r  r  ÚownerÚeditorss   &&            r   Úrelease_launch_secretsrC  ˆ  sÕ  € ó Ý9Ù#.Ó/¡;˜CŒs�3Žx¡;€GÐ/ßÙÜ˜	¤3 y×'9Ñ'9Ó#:¸WÕ#DÓE€DØ×%Ñ%Ð& a¨	¯©Ð'8¸Ð:€FÜ�9Ð2°DÓ9×?Ð?¸R€Dä�YÐ ;¸TÓB×HÐHÀb€FÙ#Ó\™t˜§y¡y°°aÓ'8¸Õ'<ÀÑ'G”ÈCÉO—�™tÔ\ˆØˆIØ�
‰
�3˜Öñ ]ô �iÐ!8¸$Ó?×EÐEÀ2€GÜ�GŽ}ˆØ�>‰>˜&×!Ò!Ü—J’J˜s¤3 v£; <Ð0Ó1×5Ñ5°iÓ@‰Eà),¯©¸×)?Ò)?�Cœ˜F›˜Ñ%ÀTˆEØÖ ¦Ø’ñ ô �iÐ!4°dÓ;×AÐA¸r€GÛˆØ�‰Ð%¨¯©¸)×:NÑ:NÐ9OÈqÐQTÐPUÐ7V×7]Ñ7]Ó7_Ó(`×(jÑ(jÓ(lÕlÐnrÖsó ùò) 0ùò ]s   �HÂ#HÃHÃHc                 ó¢   € VP                   f   R # \        V R/ 4      P                  \        VP                   4      4      pVf   \	        R4      hV# )Nr   rÃ  )ró   r€   r   r  r   )r-   rë  rŒ   s   && r   Ú
launch_keyrE  ¬  sL   € Ø×ÑÒ$ÙÜ�IÐ3°RÓ8×<Ñ<¼YÀv×G\ÑG\Ó=]Ó^€EØ‚}ÜÐ @ÓAÐAØ€Lr   c                óÐ   € \        \        P                  ! VP                  4      4      p\	        VP                  R4      W2P                  R4      V4      '       g   R# \        W4      # )a  The launch key a turn on *config* (the route it runs, a followed profile's included) sends.
A launch key authenticates the frozen route it was bound with: once the followed profile
supersedes that pick and moves to another endpoint, the key stays behind with its route.rp   N)r(   rW   rX   r{   r  r   rE  )r-   rë  r   r  s   &&& r   Úroute_launch_keyrG  µ  sL   € ô œTŸZšZ¨×(:Ñ(:Ó;Ó<€EÜ˜UŸY™Y wÓ/°¿
¹
À7Ó8KÈV×TÒTÙÜ�iÓ(Ð(r   c                ób  €  \        R/ V B p^ RIHp / \        CRRRRRR/CpV! V4      '       g5   VP                  V9  Eg\   VP
                  W1P                  ,          8w  Eg:   \        VP                  \        4      '       Ed   \        VP                  4      P                  4       '       Edï   \        VP                  \        4      '       EdÎ   VP                  P                  4       '       Ed­   \        VP                  \        \        34      '       Ed†   \         ;QJ d&    R VP                   4       F  '       g   K   RM	  RM! R VP                   4       4      '       Eg7   \#        VP$                  4      \&        JEg   \#        VP(                  4      \&        Jgü   \        VP*                  \        \#        R	4      34      '       dÑ   \#        VP,                  4      \&        Jg´   \/        VP0                  4      '       d™   \#        VP2                  4      \&        Jg|   \/        VP4                  \        4      '       d\   VP6                  \8        9  gG   VP6                  R
8w  d   VP                  R8w  g%   VP$                  '       d   VP(                  '       g   \;        R4      h^ RIHp VP@                  VPB                  VPD                  3 F8  p\        \F        PH                  ! V4      \J        4      '       d   K/  \;        R4      h	  \F        PH                  ! VPD                  4      p\M        V4      '       d,   VPO                  R4      VP                  8w  d   \;        R4      hV! V\        VP                  4      R7      #   \P        \R        \:        3 d   p\U        R4      ThR	p?ii ; i)zNReject incomplete private policy rather than rebuilding from current defaults.)Úis_forward_policyÚcronrô  r:   Úbot_roomc              3   óL   "  € T F  p\        V\        4      '       * x € K  	  R # 5irH   ©r   rø   )rJ   r6  s   & r   rK   Ú!restore_policy.<locals>.<genexpr>Ê  s   é € ÐM¹_°Tœ: d¬CÓ0×0Ñ0»_ùs   ‚"$TFNrT   r>   zinvalid policyrü  zinvalid policy objectr@  zterminal policy mismatch©rr   Ústorage_unavailablerz   )+rS   rH  rI  rD   r”   rð   r   rñ   rø   r   rL  rp   r  rr   r‚   r¡   rÙ  r4  r¤   r   rõ   rö   r¥   Ú_valid_client_envrV   rd   rc   r÷   ÚEDIT_APPROVAL_POLICIESrV  r
  rý  r{   r�   rò   rW   rX   r   rU  r   ÚKeyErrorÚ	TypeErrorr   )Údatarë  rI  Úsurfacesrý  rŒ   r]  r^  s   &       r   r!  r!  ¿  s„  € ð@Ü#Ñ+ dÑ+ˆÝ9ØX”hÐX ¨°¸%ÀÈZÑXˆÙ" 6×*Ò*Ø�m‰m 8Õ+¨v¯©À(Ï=É=ÕBYÕ/YÜ! &§*¡*¬c×2Ó2¼$¸v¿z¹zÓ:J×:VÑ:V×:XÓ:XÜ! &§,¡,´×4Ó4¸F¿L¹L×<NÑ<N×<PÓ<PÜ! &§/¡/´D¼%°=×AÓAß“3ÑM¸V¿_º_ÓM—3—3’3ÑM¸V¿_º_ÓM×MÓMÜ˜×(Ñ(Ó)´Ô5¼¸f×>WÑ>WÓ9XÔ`dÓ9dÜ! &×"6Ñ"6¼¼dÀ4»jÐ8I×JÒJÜ˜×-Ñ-Ó.´dÓ:Ü(¨×)?Ñ)?×@Ò@ÄDÈ×IaÑIaÓDbÔjnÓDnÜ(¨×)EÑ)EÄt×LÒLØ×.Ñ.Ô6LÔLØ×/Ñ/°5Ô8¸V¿]¹]ÈeÔ=SØ×$×$Ð$¨V×-F×-FÐ-FÜÐ-Ó.Ð.Ý'Ø×(Ñ(¨&×*=Ñ*=¸v×?SÑ?SÓTˆEÜœdŸjšj¨Ó/´×6Ô6Ü Ð!8Ó9Ð9ñ Uô —:’:˜f×2Ñ2Ó3ˆÜ! (×+Ò+°·±¸^Ó0LÐPV×PZÑPZÔ0ZÜÐ7Ó8Ð8Ù�v¬¨f¯o©oÓ(>Ô?Ð?øÜ”i¤Ð,ô @ÜÐ 5Ó6¸CÐ?ûð@úsE   ‚C/N Ã21N Ä$N Å%N Å(D#N ÊN ÊAN ÌBN ÎN.ÎN)Î)N.c                ó$   € V ^8„  d   QhR\         /# )rï   Úkind)r4  )rù   s   "r   rû   rû   à  s   € ÷ Zñ Z¤4ñ Zr   c                óH  a€ V f   R# \        V \        4      '       d   \        P                  ! V 4      MRp\        V\        4      ;'       dW    \
        ;QJ d-    V3R lVP                  4        4       F  '       d   K   R# 	  R# ! V3R lVP                  4        4       4      # )z`A stored client map (names to strings) or its rules (``kind=list``: rule names to string lists).NTc              3   ó  <"  € T Fw  w  r\        V\        4      ;'       dY    \        VS4      ;'       dE    S\        J ;'       g5    \        ;QJ d    R  V 4       F  '       d   K   RM	  RM! R  V 4       4      x € Ky  	  R# 5i)c              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5irH   rM  )rJ   Úitems   & r   rK   Ú._valid_client_env.<locals>.<genexpr>.<genexpr>æ  s   é € Ð?¹Q°Tœ: d¬C×0Ð0»Qùs   ‚FTN)r   rø   r  )rJ   r$  r%  rX  s   &  €r   rK   Ú$_valid_client_env.<locals>.<genexpr>å  ss   øé € ð )ZÙMXÁTÀQô *4°A´sÓ);÷ *Að *AÄ
È1ÈdÓ@S÷ *Að *AØ”ˆ×?Ð?—s“sÑ?¹QÓ?—s—s’sÑ?¹QÓ?Ó?ô*AÛMXùs!   ƒB¡BµBÁBÁBÁ%BF)r   rø   rW   rX   r   r  r   )rŒ   rX  rÄ  s   &f r   rQ  rQ  à  s‹   ø€ à‚}ÙÜ)¨%´×5Ò5Œ$�*Š*�UÔ
¸4€CÜ�cœ4Ó ÷ Zð Z§S£Sô )ZØMPÏYÉYÌ[ó)Z§S¤Sð Z¢Sð Z Sô )ZØMPÏYÉYÌ[ó)Zó &Zð Zr   c                óh   € ^ RI Hp V! \        VP                  V4      4      \	        V RR4      V4      # )z–A local turn's toolsets: the policy's current set, plus ``onboarding`` for an onboarding chat
(``agent.onboarding_session.onboarding_chat_toolsets``).)Úonboarding_chat_toolsetsr)   N)Úagent.onboarding_sessionr`  r‚   r¦   r€   )r-   rë  r   rã  r`  s   &&&& r   Úpolicy_turn_toolsetsrb  é  s4   € õ BÙ#¤D¨×)@Ñ)@ÀÓ)HÓ$IÌ7ÐS\Ð^bÐdhÓKiÐkuÓvÐvr   c                óÄ  € ^ RI Hp Rp\        VRR4      VP                  8X  d6   \        V P	                  V4      R/ 4      P                  VP                  4      pVex   VP                  R8w  gg   \        ;QJ d2    R VP                  VP                  3 4       F  '       g   K   RM'	  RM#! R VP                  VP                  3 4       4      '       g   V# \        V4      # )	aE  *scope* (the profile scope a turn enters), also marked as work for the local Desktop when the
turn belongs to a Desktop chat its creator's connection declared local (``stage_local_session``);
any other turn gets *scope* untouched. Read from the live policy without raising: a cold policy
is restored, or refused, by the turn.r  Nrð   r(  r<   c              3   óx   "  € T F0  p\         P                  ! V4      P                  \        4      R J x € K2  	  R# 5irØ  )rW   rX   r   ÚLOCAL_DESKTOP_CHAT)rJ   rs  s   & r   rK   Ú%local_desktop_turn.<locals>.<genexpr>ú  s.   é € ð ;rÙGpÀŒD�JŠJ�s‹O×ÑÔ 2Ó3°tÕ;ÓGpùs   ‚8:TF)r  r  r€   r   Ú_adapter_for_sourcer   r+  r”   rÙ  r{   r�   Ú_serving_local_desktop_within)r´   r”   Úscoper  rë  s   &&&  r   Úlocal_desktop_turnrj  ð  sÄ   € õ
 (Ø€FÜˆv�z 4Ó(¨H¯N©NÔ:Ü˜×3Ñ3°FÓ;¸ZÈÓL×PÑPÐQW×Q_ÑQ_Ó`ˆà‚~˜Ÿ™¨%Ô/·s³sñ ;rØHN×HZÑHZÐ\b×\oÑ\oÑGpó;r·s·s²sñ ;rØHN×HZÑHZÐ\b×\oÑ\oÑGpó;r÷ 8rò 8ràˆÜ(¨Ó/Ð/r   c           	   #   óÈ   "  € ^ RI Hp T ;_uu_ 4        V! R4      ;_uu_ 4        Rx € RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i5i)r^   )Úserving_local_desktopTN)Úhermes_cli.process_identityrl  )ri  rl  s   & r   rh  rh     s1   é € åAß	ŠÑ% d×+Õ+Û÷ ,�‰×+×+ú��ˆüs/   ‚A"“A¤;	©A±
A"»AÁAÁA	Á	A"c                 ó6  € ^ RI Hp ^ RIHp VP                  VP
                  8w  d   R# V P                  V4      p\        WB4      '       dN   VP                  V4      '       d7   VP                  P                  VP                  4      pVf   \        R4      hV# R# )r^   )ÚLocalSessionAdapterr  NrP  )Úgateway.session_localro  r  r  rð   r   rg  r   Úauthorize_sourcer(  r   r+  r   )r´   r”   ro  r  Úadapterrë  s   &&    r   Úpolicy_for_sourcers    s{   € Ý9Ý'Ø‡�˜(Ÿ.™.Ô(ÙØ×(Ñ(¨Ó0€GÜ�'×/Ò/°G×4LÑ4LÈV×4TÒ4TØ×!Ñ!×%Ñ% f§n¡nÓ5ˆØŠ>ô $Ð$9Ó:Ð:ØˆÙr   c                ó$   € V ^8„  d   QhR\         /# ©rï   Úreturn)r   )rù   s   "r   rû   rû     s   € ÷ %ñ %œtñ %r   c                óH   € \        V P                  4      P                  4       # )z{Readiness, not structure: a removed workspace keeps the chat readable and movable, but no
turn runs in a missing directory.)r   rñ   rM  )rë  s   &r   Úworkspace_readyrx    s   € ô �—
‘
Ó×"Ñ"Ó$Ð$r   c                ó$   € V ^8„  d   QhR\         /# ru  )r   )rù   s   "r   rû   rû     s   € ÷ 	9ñ 	9¬Dñ 	9r   c                ór   € ^ RI Hp ^ RIHp V! RV P                  R7      pV! RVR. R^ R. R	R
RRRV/RR4      # )zëA failed, never-run turn for a session whose frozen working directory is gone. Nothing ran
and an unchanged resend fails the same way, so the reply names the folder and the way out
instead of the generic "something went wrong" apology.)rµ  )Ústamp_failurez$gateway.errors.workspace_unavailable)r‹   Úfinal_responseÚmessagesÚ	api_callsÚtoolsÚfailedTÚ	completedFÚerrorÚworkspace_unavailable)Ú
agent.i18nrµ  Úagent.turn_failure_copyr{  rñ   )rë  rµ  r{  Útexts   &   r   Úworkspace_unavailable_resultr‡    sS   € õ Ý5ÙÐ3¸&¿*¹*ÔE€DÙÐ*¨D°*¸bÀ+ÈqÐRYÐ[]Ø" D¨+°u¸gÀtðMà0°%ó9ð 9r   r-   c             #   óò  "  € V f   R x € R # \        V 4      '       g   \        RRV P                  R7      h^ RIHp ^ RIHpHp \        P                  ! V P                  4      pV P                  e>   ^ RIHp V! W4      P                  4        F  w  rxV^ ,          e   K  W…V^,          &   K  	  \        P!                  W P#                  V4      34      p	T p
V P$                  '       d0   ^ RIHp V! W P+                  V P-                  VRR	7      4      R
7      p
T! V P                  4      pV! V4      p\.        P!                  V
4      p^ RIHp  ^ RIHp ^ RIHp Ve!   V P-                  V4      P=                  R4      MR pVe	   V! V4      M\>        P@                  ! 4       pV! V 4      ;_uu_ 4        V! W4      ;_uu_ 4        T;_uu_ 4        V PC                  4       ;_uu_ 4        R x € R R R 4       R R R 4       R R R 4       R R R 4       \.        PE                  V4       V! V4       VPF                  PE                  V4       \        PE                  V	4       R #   + '       g   i     Lw; i  + '       g   i     L‚; i  + '       g   i     L�; i  + '       g   i     L˜; i  \.        PE                  T4       T! T4       TPF                  PE                  T4       \        PE                  T	4       i ; i5i)Nrƒ  rñ   rN   )Úset_session_cwd)Úset_terminal_scopeÚreset_terminal_scope)rn   rü  Frh   rO  )Úeditor_scope)Úsession_auxiliary_scope)Úeditor_mcp_scopeÚ	auxiliary)$rx  r   rñ   rF  r‰  rG  rŠ  r‹  rW   rX   rò   r}   r~   rn   r   r�   r…   r|   rš   r
  rý  r¦   r   Ú_ACTIVE_POLICYrO  rŒ  Úagent.auxiliary_task_configr�  rW  rŽ  r   Ú
contextlibÚnullcontextr_   ÚresetÚvar)rë  r-   r‰  rŠ  r‹  r]  rn   r‹   rŒ   Úprofile_tokenÚactiverý  Ú	cwd_tokenÚterminal_tokenÚpolicy_tokenrŒ  r�  rŽ  r�  Ú	aux_scopes   &$                  r   Úpolicy_scoperœ  )  s"  é € à‚~ÛÙÜ˜6×"Ò"ÜÐ 7¸uÈVÏZÉZÔXÐXÝ1ßMÜ�zŠz˜&×.Ñ.Ó/€HØ×ÑÒ+ÝMÙ1°)ÓD×JÑJÖL‰KˆDØ�A�wŒØ$)˜˜a�Ó!ñ Mô "×%Ñ% v×/BÑ/BÀ9Ó/MÐ&NÓO€MØ€FØ××ÐÝ'Ù˜×*AÑ*AÀ&Ç-Á-ÐPYÐchÀ-ÓBiÓ*jÔkˆÙ §
¡
Ó+€IÙ'¨Ó1€NÜ!×%Ñ% fÓ-€LÝ9ð+ÝGÝ>àAJÒAV�F—M‘M )Ó,×0Ñ0°Ô=Ð\`ˆ	Ø:CÒ:OÑ+¨IÔ6ÔU_×UkÒUkÓUmˆ	Ù˜6×"Õ"Ñ$4°Y×$GÕ$GÏÊØ×%Ñ%×'Õ'Û÷ (÷ JS×$G×"ô 	×Ñ˜\Ô*Ù˜^Ô,Ø�‰×Ñ˜IÔ&Ü×Ñ˜MÖ*÷ (×'ú÷ JSÏú×$G×$Gú×"×"ûô 	×Ñ˜\Ô*Ù˜^Ô,Ø�‰×Ñ˜IÔ&Ü×Ñ˜MÕ*üsˆ   ‚BK7Â B,K7ÅA#J% Æ0JÇI?	ÇI,Ç%IÇ*I,Ç2I?	Ç:JÈJ% È
AK7ÉI)É$I,É,I<É7I?	É?JÊ
JÊJ"	ÊJ% Ê%AK4Ë4K7c                ó  € V e	   V'       g   R# \         P                  ! V P                  4      p\        VP	                  R4      ;'       g    R4      P                  4       P                  4       R8w  g   \        V4      '       g   \        V4       R# ^ RI	H
pHpHp V! V4      pVP	                  R4      V P                  8X  d   VP	                  R4      R8X  d   R# V! V/ VCRV P                  RRR	V! V P                  4      /C4       R# )
a  Make the session's frozen workspace its terminal cwd override for this turn's tools (#140665).

The client's cwd (or ``--in DIR``) is frozen into the policy at admission, but the terminal tool
mounts ``resolve_task_overrides(task_id)['cwd']`` into a per-session Docker container. Before the
one-gateway runtime each ``hermes chat`` was its own process with its own ``TERMINAL_CWD``; now the
turn runs here, so register it under the turn's own task id (inside the turn's routed scope, which
qualifies the key). Docker mounting the host cwd only: the local backend already runs in the
policy's ``TERMINAL_CWD``, and ssh and the other sandboxes keep their own cwd. Re-registered only
when the workspace changed, so an agent's ``cd`` inside the session survives later turns.
Nra  r®   rc  )Úregister_task_env_overridesÚresolve_task_overridesÚworkspace_key_forrñ   Ú
cwd_sourcer   Úworkspace_key)rW   rX   rò   rø   r   r  r  rU  Úunbind_turn_workspaceÚtools.terminal_toolrž  rŸ  r   rñ   )rë  rÝ  r]  rž  rŸ  r   Úcurrents   &&     r   Úbind_turn_workspacer¦  R  sÞ   € ð ‚~ŸWÙÜ�zŠz˜&×.Ñ.Ó/€HÜ
ˆ8�<‰<˜Ó'×-Ð-¨2Ó.×4Ñ4Ó6×<Ñ<Ó>À(ÔJÔRhÐiq×RrÒRrô 	˜gÔ&ÙßjÑjÙ$ WÓ-€GØ‡{�{�5Ó˜VŸZ™ZÔ'¨G¯K©K¸Ó,EÈÔ,RÙÙ ð *Z¨Gð *Z°U¸F¿J¹JÈÐV_Ø*9Ñ;LÈVÏZÉZÓ;Xñ*Zö [r   c                óú   € V '       g   R# ^ RI HpHpHpHp V! V 4      pVP                  V4      ;'       g    / pRV9  d   R# VP                  VR4       V! V 4      VP                  R4      8X  d   V! V 4       R# R# )zÿDrop the workspace override :func:`bind_turn_workspace` registered for *task_id*, and the cwd
record it seeded. Only its own entry (tagged ``workspace_key``): an ACP/TUI workspace or an RL
image override registered by someone else under the same id stays.N)Ú_qualify_task_keyÚ_task_env_overridesÚclear_session_cwdÚget_session_cwdr¢  rñ   )r¤  r¨  r©  rª  r«  r   r    )rÝ  r¨  r©  rª  r«  r4   r¥  s   &      r   r£  r£  m  sp   € ÷ ÙßnÓnÙ
˜GÓ
$€CØ!×%Ñ% cÓ*×0Ð0¨b€GØ˜gÔ%ÙØ×Ñ˜C Ô&Ù�wÓ 7§;¡;¨uÓ#5Ô5Ù˜'Ö"ñ 6r   c                ó”   € ^ RI Hp V! V 4      ;_uu_ 4        V F  p\        V4       K  	  RRR4       R#   + '       g   i     R# ; i)zºSession teardown: drop each session's workspace binding under its owning profile's scope (the
key the turn bound it under), so the override table does not grow with every closed session.)Úowner_scopeN)r²   r­  r£  )r-   r0  r­  r1  s   &&  r   Úrelease_session_workspacesr®  }  s3   € õ 8Ù	�Y×	Õ	ÛˆCÜ! #Ö&ñ ÷ 
 ×	×	Ò	ús	   —6¶A	c              #  óÀ   "  € \         P                  W P                  V4      34      p Rx € \         P                  V4       R#   \         P                  T4       i ; i5i)zÖHold ONE read of a following session's profile for every resolution inside, as a turn's
``policy_scope`` does, without that scope's workspace and terminal setup (a session control
reads the route, it runs nothing).N)r�   r…   r|   r”  )rë  r-   Útokens   && r   Úprofile_read_scoper±  †  sI   é € ô
 ×Ñ˜v×':Ñ':¸9Ó'EÐFÓG€Eð#Ûä×Ñ˜EÖ"øŒ×Ñ˜EÕ"üs   ‚&A©A ­AÁAÁAc                 ó*   € \         P                  4       # )z¬The frozen launch policy of the turn executing in this context, or ``None`` (standalone
serve / messaging turns). Consumers read it instead of re-deriving from live config.)r�  r   rz   r   r   Úactive_policyr³  ’  s   € ô ×ÑÓÐr   c                óh   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   ^\         9   d
   \        ;R&   # )rï   r�  r�   )Ú__conditional_annotations__r   )rù   s   "r   rû   rû      s4   € × NÑ N÷^ NÒ M”
Ñ Mñ_ O÷` LÒ KŒzÑ Kòa Or   >   rñ   rÑ   rp   r>  rÓ  r”   rx   r;  rå   rË   rÆ   rr   rà   r   r¤   r[   rE  r‡  rØ   rŠ  r<  rÎ   ru   rÕ   rõ   r˜   )rp   Ú	providersÚcustom_providersÚfallback_providersÚfallback_modelÚmodel_aliasesrs   )r   r   ru   rt   Úcoding_context)r8   rÆ   rË   Úapi_moderq   rw   Úkey_envÚapi_key_env)r¤   rõ   >   Nr®   r`   rY  rH   )rT   Úworkspace_sessionr   )FF)rz   )Wrµ  Ú__doc__r’  r   Úcontextvarsr   r
  r   Ú	functoolsr   rW   rà  Úpathlibr   Úhermes_state_runtimer   rá  rý   r¾  rI   rI  r†   r™   re  r   r   r"   r.   r5   rˆ   r#  rK  r�  r�   rD   Ú_KEEP_STORED_LABELrC   rB   rF   ÚSURFACE_GROUPSrP   rR  rS   rƒ   r  r  r„   r‡   r(   r_  rU  rN  rR  rz  r}  rS  r£   rT  rX  rP  rç  rì  rï  r÷  r  r  r%  r5  rC  rE  rG  r!  rø   rQ  rb  rj  rh  rs  rx  r‡  rœ  r¦  r£  r®  r±  r³  rû   )Úgroupr6  rµ  s   00@r   Ú<module>rÈ     sÝ  øðÞ NÝ %Ý "Ý !Ý %Û Û Û Ý å 2à	×	Ò	˜8Ó	$€áò mó n€ð(€ð "€ð
 %Ð ð
 €òeðW°Eô WòoòTð wÐ ð!€à3€Ù'Ð(>ÈÔM€Ó MÙ&Ð'<ÀdÔK€Ó Kð �5˜% ¨¨y¸%ÀÈÐPUÐW`ÐbgÐh€ñ  ¨	Ð2Ó3Ð Ù˜HÓ%Ð(:Õ:€áÒ9Ó:€ò	Bñ ,nÑ]lÔ+mô %Ñ+m %Û#�dð ’+Ù#ñ Ñ+mò %€ôJð AÐ ñ �$Ô÷UIð UIó ðUIòpAòmò
SòXò.EòðK;°Dð K;È4ð K;Ðchð K;Ø#ôK;ò\BòLòòFò,ò&E:ôP5òpô@ò*	'òò$2òaò&'ð"7MÈdð 7MÐ^cð 7MØ#'ô7Mòt+ò
#òBò !tòHò)ò@ðB +.÷ Zòwò0ð  ñó ðòõ %õ	9ð ð%+ dó %+ó ð%+òP[ò6#ò 'ð ñ#ó ð#ô ùóK!%s   ÃF9