Expand description
Session manager — owns and manages active shell sessions.
SessionManager is the core lifecycle engine for interactive PTY sessions.
It provides thread-safe creation, I/O, and cleanup of ShellSessions, each
backed by a PtyHandle and a ReadinessDetector.
Design invariants:
- The
Mutexis held only for HashMap insert/remove — never during I/O. - Sessions are removed from the map before I/O and reinserted after, so the lock is never contended by blocking reads/writes.
- ANSI escape sequences are stripped from all output before returning.
Structs§
- Send
Result - Result of sending input to a session.
- Session
Manager - Thread-safe manager for all active shell sessions.
- Session
Opts - Options for creating a new session.
- Shell
Session Info - Snapshot of session metadata (no mutable borrows needed).
Enums§
- Session
Status - Lifecycle status of a session.
Functions§
- start_
reaper - Spawn a background task that periodically reaps idle sessions.