codex_utils_pty/lib.rs
1pub mod pipe;
2mod process;
3pub mod process_group;
4pub mod pty;
5#[cfg(test)]
6mod tests;
7#[cfg(windows)]
8mod win;
9#[cfg(windows)]
10mod windows_input;
11
12pub const DEFAULT_OUTPUT_BYTES_CAP: usize = 1024 * 1024;
13
14/// Spawn a non-interactive process using regular pipes for stdin/stdout/stderr.
15pub use pipe::spawn_process as spawn_pipe_process;
16/// Spawn a non-interactive process using regular pipes, but close stdin immediately.
17pub use pipe::spawn_process_no_stdin as spawn_pipe_process_no_stdin;
18/// Driver-backed process adapter used by integrations with their own process transport.
19pub use process::ProcessDriver;
20/// Handle for interacting with a spawned process (PTY or pipe).
21pub use process::ProcessHandle;
22/// Process signal supported by spawned-process handles.
23pub use process::ProcessSignal;
24/// Bundle of process handles plus split output and exit receivers returned by spawn helpers.
25pub use process::SpawnedProcess;
26/// Terminal size in character cells used for PTY spawn and resize operations.
27pub use process::TerminalSize;
28/// Combine stdout/stderr receivers into a single broadcast receiver.
29pub use process::combine_output_receivers;
30/// Adapt an externally-driven process into the standard spawned-process handle.
31pub use process::spawn_from_driver;
32/// Backwards-compatible alias for ProcessHandle.
33pub type ExecCommandSession = ProcessHandle;
34/// Backwards-compatible alias for SpawnedProcess.
35pub type SpawnedPty = SpawnedProcess;
36/// Report whether ConPTY is available on this platform (Windows only).
37pub use pty::conpty_supported;
38/// Spawn a process attached to a PTY for interactive use.
39pub use pty::spawn_process as spawn_pty_process;
40#[cfg(windows)]
41pub use win::JobObject;
42#[cfg(windows)]
43pub use win::PsuedoCon;
44#[cfg(windows)]
45pub use win::conpty::RawConPty;
46#[cfg(windows)]
47pub use windows_input::WindowsTtyInputNormalizer;