Move loop-claude's cycle, judge, interrupt, tmux and routing into agent_cycle
CI / tests (pull_request) Failing after 3m50s

This commit is contained in:
2026-11-18 16:21:35 +01:00
parent 2c5406ab38
commit 54fc339fb0
45 changed files with 348 additions and 237 deletions
+19
View File
@@ -0,0 +1,19 @@
import dataclasses
import typing
@dataclasses.dataclass(frozen=True)
class Stop:
"""loop-claude exits with code, printing reason."""
code: typing.Literal[0, 1, 2, 130]
reason: str
def needs_human(need: str, blocker: str) -> Stop:
return Stop(2, f"the human is needed to {need}, but {blocker}")
def needs_terminal(need: str, on_terminal: bool) -> Stop | None:
if on_terminal:
return None
return needs_human(need, "stdin or stdout is not a terminal; rerun loop-claude on a terminal")