Expand description
Shell process execution: PTY management and process lifecycle. Port of Go’s pkg/shellexec/shellexec.go + conninterface.go.
Uses a trait-based abstraction (ConnInterface) so that:
- Real PTY implementations can use
portable-ptyor platform APIs - Tests can use mock implementations
- SSH/WSL connections implement the same interface
Structs§
- Command
Opts - Options for shell command execution.
Port of Go’s
shellexec.CommandOptsType. - Mock
Conn - Mock ConnInterface for testing without a real PTY.
- Shell
Proc - A running shell process wrapping a ConnInterface.
Port of Go’s
shellexec.ShellProc.
Constants§
- BLOCK_
FILE_ CACHE - BLOCK_
FILE_ ENV - BLOCK_
FILE_ TERM - Block file name constants (match Go’s base.BlockFile_*).
- CONN_
TYPE_ LOCAL - Connection type constants (match Go’s conncontroller types).
- CONN_
TYPE_ SSH - CONN_
TYPE_ WSL - DEFAULT_
HTML_ MAX_ FILE_ SIZE - Default max file size for HTML content (256KB).
- DEFAULT_
TERM_ COLS - Default terminal columns (matches Go’s shellutil.DefaultTermCols).
- DEFAULT_
TERM_ MAX_ FILE_ SIZE - Default max file size for terminal circular buffer (256KB).
- DEFAULT_
TERM_ ROWS - Default terminal rows (matches Go’s shellutil.DefaultTermRows).
- MAX_
INIT_ SCRIPT_ SIZE - Max init script size (50KB).
Traits§
- Conn
Interface - Abstraction over a PTY-connected process.
Port of Go’s
shellexec.ConnInterfacewhich embedspty.Pty.
Functions§
- build_
wave_ env - Build standard AGENTMUX_* environment variables.
- default_
term_ size - Get the default TermSize.
- detect_
shell_ type - Determine the shell type from a shell path. Returns one of: “bash”, “zsh”, “fish”, “pwsh”, “unknown”.