clew-hook — main (clew_hook.py)

Overview · 23 steps, 1 lane

  1. step 1 · Unassigned
  2. steps 2–3 · Unassigned
  3. step 19 · Unassigned
  4. steps 7–8 · Unassigned
  5. step 19 · Unassigned
  6. step 10 · Unassigned
  7. steps 11–12 · Unassigned
  8. step 19 · Unassigned
  9. steps 14–15 · Unassigned
  10. steps 16–17 · Unassigned
  11. step 18 · Unassigned
  12. step 19 · Unassigned
  13. steps 20–22 · Unassigned
  14. step 23 · Unassigned
command-line usercommand-line usercommand-line usercommand-line userUnassignedUnassignedUnassignedUnassignedtry (line 1016)trymain1–23. main → _drain_stdin1_drain_stdin +22 more
All 23 steps
#callercalleewhat it doesframescall site
1main_drain_stdinDrain stdin fully while keeping only the first _MAX_EVENT bytes.try (line 1016)clew_hook.py:1016
2main_clearClear a tally, so pressure can fall as well as rise.if (line 1028)clew_hook.py:1028
3_clear_marker_pathThe once-per-session marker path for this hook invocation.try (line 777)clew_hook.py:777
4main_quietOn a call that says nothing else, say the comment count if it changed.if (line 1028)clew_hook.py:1029
5_quiet_comment_noteThe comment note when the waiting count changed since it was last said, else None.try (line 958)clew_hook.py:958
6_quiet_emitWrite a reply, flushing inside the guard; on failure point stdout at the null device.try (line 958), if (line 960)clew_hook.py:960
7main_outside_repoWhether the inspected path is PROVABLY outside the repository.—clew_hook.py:1042
8_outside_repo_input_valueThe raw inspected-path value for one modality, before any sanitising.try (line 670)clew_hook.py:670
9main_quietOn a call that says nothing else, say the comment count if it changed.if (line 1043)clew_hook.py:1043
10main_event_commandThe raw command a Bash event carries, without trusting anything else in it.—clew_hook.py:1044
11main_is_inspectionWhether a shell command inspected a file at all — the question _bash_target does not ask.—clew_hook.py:1044
12_is_inspection_segment_verbThe command word a shell segment runs, with env assignments skipped and the path stripped.—clew_hook.py:471
13main_quietOn a call that says nothing else, say the comment count if it changed.if (line 1049)clew_hook.py:1049
14main_recordRecord one event of a kind for this session.—clew_hook.py:1051
15_record_marker_pathThe once-per-session marker path for this hook invocation.try (line 750)clew_hook.py:750
16main_tallyCount of recorded events of one kind for this session.—clew_hook.py:1052
17_tally_marker_pathThe once-per-session marker path for this hook invocation.try (line 733)clew_hook.py:733
18main_is_dueWhether this search should carry a note, given the session's pressure.—clew_hook.py:1053
19main_quietOn a call that says nothing else, say the comment count if it changed.if (line 1056)clew_hook.py:1056
20main_target_nameThe basename the agent just looked at, from the event, or None.try (line 1059)clew_hook.py:1059
21_target_name_input_valueThe raw inspected-path value for one modality, before any sanitising.—clew_hook.py:605
22_target_name_safe_tokenThe basename of a path, reduced to the safe alphabet, or None if anything is off.—clew_hook.py:605
23main_payload_forThe complete reply for this pressure, tier chosen by count.try (line 1059)clew_hook.py:1060

Functions

18 functions

This diagram as Mermaid · PlantUML · Graphviz DOT

Quick views

18 functions, each with its quick view