pub async fn run_shell<I, O>(
input: I,
output: O,
endpoint: &str,
shell_jwe: &str,
resize: Receiver<(u16, u16)>,
) -> Result<ShellOutcome, Error>Expand description
Opens the shell and relays raw terminal bytes until one side ends the session.
input/output are any async byte streams, so the CLI drives this with the process’s
raw-mode stdin/stdout and a test drives it with pipes. resize is a watch channel of
(cols, rows): the value at entry is sent immediately — the guest reports 0 0 until
something does — and every change afterwards becomes one validated control frame.
Output is flushed per frame, because the reader on the other side of output is a
human watching a prompt: a byte held in a buffer is a keystroke that appears to have
been eaten.