#!/usr/bin/env bash # Fake claude TUI used by claude_pipe's deterministic e2e checks. # # It does NOT talk to any model. It ignores stdin (the prompt claude_pipe types) # and prints a minimal screen that mimics the markers parse_claude_tui_go_tui # looks for: a "❯ " user line and a "● " assistant line. After printing it idles # briefly so the capture's idle-cutoff fires and the process exits cleanly. # # stty -echo is essential: claude_pipe types the prompt into the PTY, and a TTY # echoes input by default. The real claude TUI captures keystrokes into its own # widget instead of echoing them; this fake has no such widget, so without # disabling echo the typed prompt would leak onto the screen and pollute the # parsed answer. The real claude binary is unaffected by this. # # This lets us validate the full capture -> render -> parse pipeline without # spending a real claude call or depending on network/model output. stty -echo 2>/dev/null || true printf '\xe2\x9d\xaf test prompt\n\n' # "❯ test prompt" printf '\xe2\x97\x8f RESPUESTA_FAKE_OK\n\n' # "● RESPUESTA_FAKE_OK" sleep 2