Name the driver of a cycle in the text its worker, judge and human read
This commit is contained in:
@@ -4,7 +4,7 @@ import typing
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Stop:
|
||||
"""loop-claude exits with code, printing reason."""
|
||||
"""The entry point exits with code, printing reason."""
|
||||
code: typing.Literal[0, 1, 2, 130]
|
||||
reason: str
|
||||
|
||||
@@ -13,7 +13,8 @@ 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:
|
||||
def needs_terminal(need: str, on_terminal: bool, driver: str) -> Stop | None:
|
||||
"""driver is the entry point the human reruns, such as `do-epic`."""
|
||||
if on_terminal:
|
||||
return None
|
||||
return needs_human(need, "stdin or stdout is not a terminal; rerun loop-claude on a terminal")
|
||||
return needs_human(need, f"stdin or stdout is not a terminal; rerun {driver} on a terminal")
|
||||
|
||||
Reference in New Issue
Block a user