1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Byte transports to an agent process.
//!
//! `stdio` attaches lanes to piped stdin/stdout (NDJSON / JSON-RPC lanes and
//! plain CLI pipes). `pty` attaches the child to a raw-mode pseudo-terminal
//! slave for agents that only behave correctly on a TTY (`isatty` probes,
//! TUI-aware rendering). stderr always stays a real pipe: keeping it off the
//! terminal preserves both drain semantics and clean stdout framing.
/// RFC 4648 base64, standard alphabet — enough for basic-auth blobs and
/// WebSocket handshake keys without pulling an encoding dependency.
pub