+
    iHàj‡  ã                  ól   € R t ^ RIHt ^ RIt^ RIHt ^ RIHt ]P                  ! ]	4      t
R.tR R ltR# )uÄ  Fold an agent-as-provider's own activity back into Hermes' turn state.

Agent providers (ACP CLI shims, the codex app-server) run their own tools, so that
work must never come back as pending ``tool_calls`` (Hermes would re-run it) â€” but
the self-improvement loop (replays ``messages``) and the skill-review nudge
(``_iters_since_skill`` counter) go blind if it is merely summarised into
``reasoning``. The client hands back ``hermes_projected_messages`` (completed
assistant/tool rows) and ``hermes_provider_tool_iterations`` on the completion
object; this helper applies them append-only via ``append_message`` (timestamped,
persisted). Ordinary OpenAI-compatible clients set neither and are unaffected.
)ÚannotationsN)ÚAny)Úappend_messageÚsplice_provider_projectionc               ó(   € V ^8„  d   QhRRRRRRRR/# )é   Úagentr   ÚresponseÚmessageszlist[dict[str, Any]]ÚreturnÚint© )Úformats   "Ú>/home/ubuntu/.hermes/hermes-agent/agent/provider_projection.pyÚ__annotate__r      s*   € ÷ ñ  cð °Sð ÐDXð Ð]`ñ ó    c           	     ó  € \        VRR4      p\        V\        4      '       d+   V Uu. uF  p\        V\        4      '       g   K  VNK  	  upM. pV F  p\	        W&4       K  	  V'       d,   \
        P                  R\        V4      \        V RR4      4        \        \        VR^ 4      ;'       g    ^ 4      pV^ 8”  d   \        V R^ 4      V,           V n        \        V4      # u upi   \        \        3 d    ^ p LEi ; i)zÒAppend the provider's projected history rows and tick the nudge counter.

Returns the number of rows spliced. Tolerates absent/garbage attributes so a
third-party OpenAI-compatible client can't break the turn.
Úhermes_projected_messagesNz7spliced %d provider-projected transcript row(s) from %sÚproviderÚ?Úhermes_provider_tool_iterationsÚ_iters_since_skill)ÚgetattrÚ
isinstanceÚlistÚdictr   ÚloggerÚdebugÚlenr   Ú	TypeErrorÚ
ValueErrorr   )r   r	   r
   Ú	projectedÚmÚrowsÚrowÚ
iterationss   &&&     r   r   r      sç   € ô ˜Ð"=¸tÓD€IÜ<FÀyÔRV×<WÒ<W‘yÓ8‘y�!¤J¨q´$×$7�AˆA‘yÒ8Ð]_€DÛˆÜ�xÖ%ñ çÜ�‰ØEÄsÈ4ÃyÔRYÐZ_ÐakÐmpÓRqô	
ðÜœ Ð+LÈaÓP×UÐUÐTUÓVˆ
ð �A„~Ü#*¨5Ð2FÈÓ#JÈZÕ#WˆÔ äˆt‹9Ðùò 9øô ”zÐ"ô ØŠ
ðús#   ¨C#ÁC#ÂC( Â1C( Ã(C>Ã=C>)Ú__doc__Ú
__future__r   ÚloggingÚtypingr   Úagent.message_metadatar   Ú	getLoggerÚ__name__r   Ú__all__r   r   r   r   Ú<module>r.      s5   ðñ
õ #ã Ý å 1à	×	Ò	˜8Ó	$€à'Ð
(€÷r   