
    (GjU
                    ^    d Z ddlmZ ddlmZmZ ddlmZ dZdZ	dddZ
dddZddZg dZdS )u  Verification-loop helpers for the ``pre_verify`` round-end gate.

When the agent has edited code and is about to verify/finish, the loop fires the
``pre_verify`` hook (user directives resolved by
:func:`hermes_cli.plugins.get_pre_verify_continue_message`). A directive keeps
the agent going one more turn — run a check, defer it, tidy the diff — instead of
stopping immediately.

The shipped coding guidance lives on the evidence-based verification-stop nudge
(``agent/verification_stop.py``), not as a second default stop gate. That keeps
the default token cost tied to the existing "missing verification evidence"
decision while preserving ``pre_verify`` for user/plugin policy.
    )annotations)AnyOptional)is_truthy_value   a`  [Coding] Before you run tests/linters or call this done: if this is creative UI/visual work, hold off on tests and linters until the user says they like the result or you're about to commit. And before every commit, clean your work: keep it KISS/DRY, match the surrounding code style, and be elitist, shorthand, clever, concise, efficient, and elegant.NconfigOptional[dict[str, Any]]returnintc                    t          |           }|                    d          }	 t          dt          |                    S # t          t
          f$ r
 t          cY S w xY w)zHBound on consecutive ``pre_verify`` continue directives per turn (>= 0).max_verify_nudgesr   )
_agent_cfggetmaxr   	TypeError
ValueErrorDEFAULT_MAX_VERIFY_NUDGES)r   	agent_cfgraws      8/home/rurouni/.hermes/hermes-agent/agent/verify_hooks.pyr   r   #   sh    6""I
--+
,
,C)1c#hhz" ) ) )(((()s   A AAOptional[str]c                x    t          t          |                               dd          d          sdS t          S )zBReturn the optional guidance appended to verification-stop nudges.verify_guidanceT)defaultN)r   r   r   CODING_VERIFY_GUIDANCE)r   s    r   coding_verify_guidancer   -   s<    :f--112CTJJTXYYY t!!    dict[str, Any]c                    | $	 ddl m}  |            } n# t          $ r i } Y nw xY wt          | t                    r| pi                     d          nd }t          |t                    r|ni S )Nr   )load_configagent)hermes_cli.configr    	Exception
isinstancedictr   )r   r    r   s      r   r   r   4   s    ~	555555 []]FF 	 	 	FFF	/9&$/G/GQ2""7+++TI"9d33;99;s    $$)r   r   r   r   )N)r   r	   r
   r   )r   r	   r
   r   )r   r	   r
   r   )__doc__
__future__r   typingr   r   utilsr   r   r   r   r   r   __all__ r   r   <module>r,      s     # " " " " "                 ! ! ! ! ! ! C ) ) ) ) )" " " " "	< 	< 	< 	<  r   