claude-dev-env 8.19.0 → 8.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from step_notes_constants.config import constants
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_flag_path_matches_the_step_notes_location() -> None:
|
|
5
|
+
assert constants.STEP_NOTES_ON_FLAG_PATH.parts[-2:] == (".claude", ".step-notes-on")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_actions_match_the_toggle_command() -> None:
|
|
9
|
+
assert (
|
|
10
|
+
constants.ON_ACTION,
|
|
11
|
+
constants.OFF_ACTION,
|
|
12
|
+
constants.STATUS_ACTION,
|
|
13
|
+
constants.FLIP_ACTION,
|
|
14
|
+
) == ("on", "off", "status", "flip")
|
|
15
|
+
assert constants.ALL_ACTIONS == ("on", "off", "status", "flip")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_reports_describe_the_flag_state() -> None:
|
|
19
|
+
assert constants.ON_REPORT == (
|
|
20
|
+
"Step notes are on. Each tool call needs a short status line before it."
|
|
21
|
+
)
|
|
22
|
+
assert constants.OFF_REPORT == "Step notes are off. Tool calls run without a status line."
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hooks_constants import step_note_gate_constants as constants
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_gate_uses_the_step_notes_flag_location() -> None:
|
|
5
|
+
assert constants.STEP_NOTES_ON_FLAG_PATH.parts[-2:] == (".claude", ".step-notes-on")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_gate_uses_transcript_roles_and_block_types() -> None:
|
|
9
|
+
assert (constants.USER_ROLE, constants.ASSISTANT_ROLE) == ("user", "assistant")
|
|
10
|
+
assert (constants.TEXT_BLOCK_TYPE, constants.TOOL_USE_BLOCK_TYPE) == (
|
|
11
|
+
"text",
|
|
12
|
+
"tool_use",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_gate_exit_codes_and_message_match_the_hook_contract() -> None:
|
|
17
|
+
assert (constants.ALLOW_EXIT_CODE, constants.BLOCK_EXIT_CODE) == (0, 2)
|
|
18
|
+
assert "Status line missing." in constants.BLOCK_MESSAGE
|
|
19
|
+
assert "/step-notes" in constants.BLOCK_MESSAGE
|