Name each entry shape written_by_human checks, and annotate every parameter in loop_claude

This commit is contained in:
2026-10-01 23:47:03 +02:00
parent 70ad9a9caa
commit 39acf6dff0
24 changed files with 113 additions and 84 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
from loop_claude.outcome import Stop
def stop(to, but) -> Stop:
def stop(to: str, but: str) -> Stop:
return Stop(2, f"the human is needed to {to}, but {but}")
def off_terminal(to, on_terminal: bool) -> Stop | None:
def off_terminal(to: str, on_terminal: bool) -> Stop | None:
if on_terminal:
return None
return stop(to, "stdin or stdout is not a terminal; rerun loop-claude on a terminal")