/// Minimal test helper for `src/hooks/external.rs` unit tests.
///
/// Usage:
/// hook_echo '<json>' — print json to stdout, exit 0
/// hook_echo '<json>' <code> — print json to stdout, exit <code>
/// hook_echo --exit <code> — exit with <code> (no output)
///
/// Compiles to `target/debug/hook_echo` (or release). Unit tests locate it
/// at runtime via the CARGO_MANIFEST_DIR compile-time env var.