Files
claude-config/bin/loop_claude/human.py
T

14 lines
273 B
Python

import sys
from loop_claude.outcome import Stop
def needed(to, but):
return Stop(2, f"the human is needed to {to}, but {but}")
def off_terminal(to):
if sys.stdin.isatty() and sys.stdout.isatty():
return None
return needed(to, "stdin or stdout is not a terminal")