ctx-tui 2.0.4

Manage repo-scoped work contexts: fresh checkouts wrapped in terminal multiplexer sessions
Documentation
�

"�j���h�SrSSKrSSKJr \"SS15rS\\\4S\S-4Sjr	S	\S
\SS4Sjr
g)z�Claude Code hook adapter: maps hook events onto the agent-status file.

The `agent` status builtin reads a state word from `.git/agent-status`;
this module is the Claude Code side of that contract. Other agent systems
can feed the same file directly.
�N)�Path�Monitor�ScheduleWakeup�payload�returnc��URS5=S:Xa g=S:Xa  URS5nU[;aS$S$=S:Xa gS	:Xag
g)N�hook_event_name�UserPromptSubmit�working�
PreToolUse�	tool_name�
monitoring�Notification�blocked�Stop�idle)�get�_MONITORING_TOOLS)r�tools  �I/Users/michael/dev/contexts/ctx/rewrite-it-in-rust/src/ctx/claude_hook.py�_statersK��
�+�+�'�
(�
��
��;�;�{�+�D�#'�+<�#<�<�K�)�K�
��
��
���raw�cwdc���US-nUR5(dg[R"U5n[	U[
5(dgUS-nUR
S5S:XaURSS9 g[U5nUcgUR5R5nXe:waURUS35 gg![Ra gf=f![a SnNCf=f)	u�Apply one hook event (the JSON Claude Code pipes to hooks) in `cwd`.

Anything unusable — no `.git` directory, malformed JSON, an unknown
event — is ignored: a status hook must never break the agent driving it.
z.gitNzagent-statusr	�
SessionEndT)�
missing_ok�
)
�is_dir�json�loads�JSONDecodeError�
isinstance�dictr�unlinkr�	read_text�strip�OSError�
write_text)rr�git_dirr�path�state�currents       r�handler.s����F�l�G��>�>������*�*�S�/���g�t�$�$���^�#�D��{�{�$�%��5����t��$���7�O�E��}����.�.�"�(�(�*�������5�'���%���!������������s#�B<�C�<C�C�C%�$C%)�__doc__r �pathlibr�	frozensetrr$�str�objectrr.�rr�<module>r5s_������y�*:�;�<���D��f��%��#��*��&��&�$�&�4�&r