// Test stand-in for `socialweb-guest-agent relay ` (fake-bin/ssh and the loopback test run it): // stdin/stdout <-> the socket, raw bytes; exits when the socket closes. import { connect } from "node:net"; const socket = connect(process.argv[2]); process.stdin.pipe(socket); socket.pipe(process.stdout); socket.on("close", () => process.stdin.destroy()); socket.on("error", (error) => (console.error(`relay: ${error.message}`), (process.exitCode = 1)));