§
    øžyjt	  ã                  ó*   — 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 hooksz·Inspect 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         úB/home/ragecks/.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'   