+
    iHàjž  ã                  ó\   € R t ^ RIHt ^ RIHtHtHtHt ]! R04      t	R R lt
R R ltRtR	# )
u  What a finite one-shot session (``hermes chat -q`` / ``--oneshot``, ``hermes -z``) does NOT do.

A one-shot run has no later session in its HERMES_HOME to learn for: the process answers one query and
exits. The interactive self-improvement loop is pure overhead there, and a measured one â€” across 21
one-shot benchmark trajectories the agent authored 7 new skills and patched a bundled one mid-task, 37 of
~215 tool calls were ``skill_view``/``skill_manage``, and skill text was 34% of every tool-result byte fed
back into context. Three rules follow, all keyed on the same session marker the approval gate and the
delegation dispatcher already read (``HERMES_SINGLE_QUERY_SESSION``), so interactive sessions are untouched:

* ``skill_manage`` is not offered (``skills_list``/``skill_view`` stay: reading a domain skill can still win);
* the ## Skills prompt drops the "record it / patch it / offer to save" coaching and the "load process skills
  even for tasks you already know" push, keeping only "load a skill when it adds knowledge you lack";
* delegation is capped per session (``delegation.oneshot_max_children``): subagents each re-pay a cold
  system prompt and re-explore the repo, and the observed spawns were mostly "independent review of my own
  work" rather than parallel work.
)Úannotations)ÚAnyÚDictÚIterableÚListÚskill_managec               ó   € V ^8„  d   QhRR/# )é   ÚreturnÚbool© )Úformats   "Ú</home/ubuntu/.hermes/hermes-agent/agent/oneshot_footprint.pyÚ__annotate__r      s   € ÷ Pñ P ñ Pó    c                 ó
  €  ^ RI Hp  V ! 4       pVe   VP                  R8H  #   ^ RIHp \        V! RR4      ;'       g    R4      R8H  #   \         d     L3i ; i  \         d    ^ RIpTP                  P                  p LWi ; i)a‰  The finite ``-q`` marker, read through the session env so gateway-bound sessions never see it.

A gateway-owned ``chat -q`` / ``-z`` session never has that env (only the client process set it): its
one-shot fact is the frozen launch policy's ``oneshot`` source, a property of the SESSION, not of one
admission, so the cached agent's tools[] and system prompt stay byte-stable across its turns.)Úactive_policyNÚoneshot)Úget_session_envÚHERMES_SINGLE_QUERY_SESSIONÚ Ú1)Úgateway.session_policyr   ÚsourceÚImportErrorÚgateway.session_contextr   Ú	ExceptionÚosÚenvironÚgetÚstr)r   Úpolicyr   r   s       r   Úis_single_query_sessionr"      s‹   € ð.Ý8ñ “ˆØÒØ—=‘= IÑ-Ð-ð ð)Ý;ô ‰Ð<¸bÓA×GÐGÀRÓHÈCÑOÐOøô ô Ùðûô ô )ÛØŸ*™*Ÿ.™.Šð)ús"   ‚A	 ¤A Á	AÁAÁ%BÂBc               ó    € V ^8„  d   QhRRRR/# )r	   ÚtoolszIterable[dict[str, Any]]r
   zlist[dict[str, Any]]r   )r   s   "r   r   r   .   s    € ÷ cñ cÐ7ð cÐ<Pñ cr   c                óÒ   € \        V 4      p \        4       '       g   V # V  Uu. uF9  qP                  R4      ;'       g    / P                  R4      \        9  g   K7  VNK;  	  up# u upi )zR*tools* minus ``ONESHOT_HIDDEN_TOOLS``; identity when the session is not one-shot.ÚfunctionÚname)Úlistr"   r   ÚONESHOT_HIDDEN_TOOLS)r$   Úts   & r   Úprune_oneshot_toolsr+   .   sU   € ä�‹K€EÜ"×$Ò$ØˆÙÓb‘u�!§¡ zÓ!2×!8Ð!8°b× =Ñ =¸fÓ EÔMaÑ a�AˆA‘uÑbÐbùÒbs   ¢A$¾A$ÁA$a…  ## Skills
Scan the skills below and load one with skill_view(name) only when it carries domain knowledge you lack for THIS task (an API, a tool's commands, a project's conventions). Do not load general process skills (testing, debugging, review methodology) for work you already know how to do, and do not create or edit skills: this is a one-shot run with no later session to reuse them.
N)Ú__doc__Ú
__future__r   Útypingr   r   r   r   Ú	frozensetr)   r"   r+   ÚONESHOT_SKILLS_LOAD_GUIDANCEr   r   r   Ú<module>r1      s:   ðñõ  #ç ,Ó ,á  .Ð!1Ó2Ð õPõ,cðLò r   