fix(python): mirror official Claude hooks

This commit is contained in:
ZacharyZhang-NY committed 2026-07-20 07:01:01 -04:00
1 parent baaa71e32f
commit c0534bf1de
13 files changed
+2161 -198

No files matched your search

@@ -4,7 +4,6 @@ from collections.abc import Callable
import pytest
from elydora.plugins.claudecode import _is_elydora_hook as is_claude_hook
from elydora.plugins.gemini import _is_elydora_hook as is_gemini_hook
from elydora.plugins.letta import _is_elydora_hook as is_letta_hook
@@ -12,7 +11,7 @@ from elydora.plugins.letta import _is_elydora_hook as is_letta_hook
HookDetector = Callable[[dict, str], bool]
@pytest.mark.parametrize("detector", [is_claude_hook, is_gemini_hook, is_letta_hook])
@pytest.mark.parametrize("detector", [is_gemini_hook, is_letta_hook])
def test_hook_detection_handles_only_string_commands(detector: HookDetector) -> None:
assert detector({"command": 42}, "") is False
assert detector({"hooks": [{"command": None}]}, "") is False