
    oq'jt	                    *    d Z ddlmZ ddlmZ d
dZd	S )z``hermes hooks`` subcommand parser.

Extracted verbatim from ``hermes_cli/main.py:main()`` (god-file Phase 2).
Handler injected to avoid importing ``main``.
    )annotations)Callable	cmd_hooksr   returnNonec                  |                      ddd          }|                    d          }|                     ddgd	
           |                     dd          }|                    dd           |                    dddd           |                    dddd           |                     dddgd
          }|                    dd           |                     dd           |                    |            dS )!z2Attach the ``hooks`` subcommand to ``subparsers``.hooksz%Inspect and manage shell-script hookszInspect shell-script hooks declared in ~/.hermes/config.yaml, test them against synthetic payloads, and manage the first-use consent allowlist at ~/.hermes/shell-hooks-allowlist.json.)helpdescriptionhooks_action)destlistlsz?List configured hooks with matcher, timeout, and consent status)aliasesr
   testz<Fire every hook matching <event> against a synthetic payload)r
   eventzAHook event name (e.g. pre_tool_call, pre_llm_call, subagent_stop)z
--for-toolfor_toolNz^Only fire hooks whose matcher matches this tool name (used for pre_tool_call / post_tool_call))r   defaultr
   z--payload-filepayload_filezYPath to a JSON file whose contents are merged into the synthetic payload before executionrevokeremovermzCRemove a command's allowlist entries (takes effect on next restart)commandz?The exact command string to revoke (as declared in config.yaml)doctorzeCheck each configured hook: exec bit, allowlist, mtime drift, JSON validity, and synthetic run timing)func)
add_parseradd_subparsersadd_argumentset_defaults)
subparsersr   hooks_parserhooks_subparsers_hk_test
_hk_revokes         A/home/ubuntu/.hermes/hermes-agent/hermes_cli/subcommands/hooks.pybuild_hooks_parserr&      s    ((4I	 )  L $222GGN       **K +  H P     8     1     ",,4 R -  J
 N    
 6      9-----    N)r   r   r   r   )__doc__
__future__r   typingr   r&    r'   r%   <module>r,      sY     # " " " " "      A. A. A. A. A. A.r'   