+
    iHàjç  ã                  ó  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	H
t
 ]P                  ! ]4      t]! RRR7      tR]R&   ]P                   R	 4       t ! R
 R]4      tR R lt]! 4       3R R lltR R lt]! 0 Rm4      tR R ltR# )a$  Read-time resolution of an ``auxiliary.<task>`` config block.

Built-in slot defaults come from ``DEFAULT_CONFIG``; plugin-registered tasks
(``PluginContext.register_auxiliary_task``) layer their declared ``defaults``
under the user's block and may inherit another slot via ``inherit_from``.
)ÚannotationsN)Ú
ContextVar)ÚAnyÚDictÚsession_auxiliary)Údefaultr   Ú_SESSION_AUXILIARYc              #  óÐ   "  € \         P                  \        V \        4      '       d   T M/ 4      p R x € \         P	                  V4       R #   \         P	                  T4       i ; i5i)N)r   ÚsetÚ
isinstanceÚdictÚreset)Ú	auxiliaryÚtokens   & Ú@/home/ubuntu/.hermes/hermes-agent/agent/auxiliary_task_config.pyÚsession_auxiliary_scoper      sI   é € ä×"Ñ"´
¸9Äd×0KÒ0K¡9ÐQSÓT€Eð(Ûä× Ñ  Ö'øÔ× Ñ  Õ'üs   ‚.A&±A µA&ÁA#Á#A&c                  ó"   € ] tR t^tRtRtRtRtR# )ÚAuthoritativeAuxiliaryTaska  A task name that keeps the task's non-route policy (timeout, concurrency, extra_body, fallback
chain) but strips its route fields, so a one-shot fallback naming a complete route never inherits
an unset endpoint/key/wire mode from the route that just failed (#113322, #130895).T© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__Úroute_authoritativeÚ__static_attributes__r   ó    r   r   r      s   † ñ[ð €IØÔr   r   c               ó    € V ^8„  d   QhRRRR/# )é   Útaskz
str | NoneÚreturnÚstrr   )Úformats   "r   Ú__annotate__r$   (   s   € ÷ qñ q zð q°cñ qr   c                ón   € \        V \        4      '       d   V # \        \        T ;'       g    R 4      4      # )Ú )r   r   r"   )r    s   &r   Úauthoritative_auxiliary_taskr'   (   s0   € Ü˜dÔ$>×?Ò?ˆ4ÐpÔE_Ô`cÐdh×dnÐdnÐlnÓ`oÓEpÐpr   c               ó$   € V ^8„  d   QhRRRRRR/# ©r   r    r"   Ú_seenÚ	frozensetr!   údict[str, Any]r   )r#   s   "r   r$   r$   ,   s!   € ÷ ñ  Sð °ð È^ñ r   c                óØ   € V '       g   / # \        \        V 4      V4      p\        V RR4      '       d2   VP                  4        UUu/ uF  w  r4V\        9  g   K  W4bK  	  upp# V# u uppi )aÒ  Config dict for auxiliary.<task>, or {} when unavailable. Plugin-registered tasks get their
declared defaults layered under user config (user wins); built-in defaults live in DEFAULT_CONFIG.
A task registered with ``inherit_from`` is resolved here, at read time, over the base task's
effective config, so it follows the base's current settings (and the active profile's config)
until the user pins a route on the task itself. ``_seen`` guards re-registration cycles.r   F)Ú_task_configr"   ÚgetattrÚitemsÚ_AUX_ROUTE_KEYS)r    r*   ÚconfigÚkeyÚvalues   &&   r   Ú_get_auxiliary_task_configr5   ,   s_   € ÷ Øˆ	Üœ#˜d›) UÓ+€FÜˆtÐ*¨E×2Ò2Ø-3¯\©\¬^ÔZ©^™z˜s¸sÌ/Ñ?Y”
�’
©^ÒZÐZØ€Mùó [s   ÁA&ÁA&c               ó$   € V ^8„  d   QhRRRRRR/# r)   r   )r#   s   "r   r$   r$   :   s!   € ÷ ñ �sð  9ð °ñ r   c                óD  € \         P                  4       pVf9    ^ RIHp V! 4       p\        T\        4      '       d   TP                  R/ 4      M/ p\        V\        4      '       d   VP                  V / 4      M/ p\        V\        4      '       g   / p ^ RIHp V! 4        F½  pVP                  R4      V 8X  g   K  VP                  R4      ;'       g    / p\        V\        4      '       dq   VP                  R4      p	V	'       d   W9   d   \        P                  RV 4       V	'       d   W9   d	   / VCVCu # \        W‘V 0,          4      p
\        / V
CVCV4      u #  V# 	   V#   \         d    / u # i ; i  \         d    \        P                  RT R	R
7        T# i ; i)N)Úload_config_readonlyr   )Úget_plugin_auxiliary_tasksr3   ÚdefaultsÚinherit_fromuL   Auxiliary task %r has a circular inherit_from chain â€” ignoring inheritancez*plugin auxiliary task lookup failed for %rT)Úexc_info)r   ÚgetÚhermes_cli.configr8   ÚImportErrorr   r   Úhermes_cli.pluginsr9   ÚloggerÚwarningr5   Ú_layer_over_inheritedÚ	ExceptionÚdebug)r    r*   Úauxr8   r2   Útask_configr9   Ú_entryÚ	_defaultsÚ_inheritÚbases   &&         r   r.   r.   :   s}  € Ü
×
 Ñ
 Ó
"€CØ
‚{ð	Ý>Ù)Ó+ˆFô .8¸Ä×-EÒ-Eˆf�j‰j˜ bÔ)È2ˆÜ'1°#´t×'<Ò'<�#—'‘'˜$ Ô#À"€KÜ�k¤4×(Ò(ØˆðXÝAÙ0Ö2ˆFØ�z‰z˜%Ó  DÖ(Ø"ŸJ™J zÓ2×8Ð8°b�	Ü˜i¬×.Ò.Ø%Ÿz™z¨.Ó9�Hß D¤MÜŸ™ð (>Ø?CôEç# t¤}Ø; )Ð;¨{Ð;Ò;Ü5°hÈÈÅÓO�DÜ0Ð1F°DÐ1F¸IÐ1FÈÓTÒTØð Ðò 3ð Ðøô/ ô 	ØŠIð	ûô* ô XÜ�‰ÐAÀ4ÐRVˆÕWØÐðXúsM   šE% Â#E8 Â<E8 Ã1E8 Ä#E8 Ä*E8 Ä8$E8 ÅE8 Å E8 Å%E5Å4E5Å8#FÆFc               ó$   € V ^8„  d   QhRRRRRR/# )r   Ú	inheritedr,   Úuserr!   r   )r#   s   "r   r$   r$   a   s!   € ÷ ñ  ^ð ¸>ð Ènñ r   c                ó¬  € \        VP                  R4      ;'       g    R4      P                  4       P                  4       pVR9  ;'       g    \	        \        VP                  R4      ;'       g    R4      P                  4       4      ;'       g<    \	        \        VP                  R4      ;'       g    R4      P                  4       4      pV P                  4        UUu/ uF  w  rEV'       d   V\        9   d   K  WEbK  	  pppVP                  4        F6  w  rxVR8X  d   V'       d   V\        9   g   K!  VR8X  d   V'       g   K2  W†V&   K8  	  V# u uppi )a`  Merge a task's own ``auxiliary.<task>`` block over its inherited base.

The picker, "reset to auto" and the dashboard persist ``provider: auto`` plus ``""`` for
model/base_url/api_key/reasoning_effort when the operator expresses no preference, so those
placeholders mean "follow the base", not "override it with nothing". Once the operator pins a
route (a non-auto provider, a model or a base_url) the whole route comes from the task's own
block. Non-route keys (timeout, extra_body, ...) override per key; only ``""`` is dropped,
never other falsy values (``reasoning_effort: false`` is an explicit choice).Úproviderr&   ÚmodelÚbase_url)r&   Úauto)r"   r=   ÚstripÚlowerÚboolr0   r1   )	rM   rN   rP   ÚpinnedÚkÚvÚmergedr3   r4   s	   &&       r   rC   rC   a   s  € ô �4—8‘8˜JÓ'×-Ð-¨2Ó.×4Ñ4Ó6×<Ñ<Ó>€HØ˜lÑ*÷ ?ð ?¬d´3°t·x±xÀÓ7H×7NÐ7NÈBÓ3O×3UÑ3UÓ3WÓ.X÷ ?ð ?Ü”c˜$Ÿ(™( :Ó.×4Ð4°"Ó5×;Ñ;Ó=Ó>ð à(Ÿ™Ô0ÔZÑ0‘t�q¿ÀAÌÑDXŒdˆaŠdÑ0€FÑZØ—j‘j–l‰
ˆØ�BŒ;§¨3´/Ô+AÙØ�*Ô§VÙØˆs‹ñ #ð €Mùó [s   ÃEÃ;E>   rQ   Úapi_keyÚkey_envÚapi_moderR   rP   Úapi_key_envÚreasoning_effort)Ú__conditional_annotations__r   Ú
__future__r   Ú
contextlibÚloggingÚcontextvarsr   Útypingr   r   Ú	getLoggerr   rA   r   Ú__annotations__Úcontextmanagerr   r"   r   r'   r+   r5   r.   r1   rC   )r`   s   @r   Ú<module>ri      s˜   øðôõ #ã Û Ý "ß à	×	Ò	˜8Ó	$€ñ ",Ð,?ÈÔ!NÐ �JÓ Nð ×Ññ(ó ð(ô ô õqñ >G»[÷ õñF ò @ó A€÷r   