Expand description
Terminal-domain handlers for CocoonService. Eight entry points cover
lifecycle (open/close), I/O (input/data), notifications (opened/closed/
processId), and resize.
Modulesยง
- Accept
Terminal Closed - Forward a terminal-closed notification to Sky on
sky://terminal/exit. (/closedhad no consumer.) - Accept
Terminal Opened - Forward a terminal-opened notification to Sky on
sky://terminal/create(NOT/opened-SkyBridge.ts:1736listens oncreateand destructures{ id, name, pid }; thepidis best-effort 0 here until the real one lands viaAcceptTerminalProcessId). - Accept
Terminal Process Data - Forward terminal stdout bytes to Sky on
sky://terminal/dataas lossy-decoded UTF-8. - Accept
Terminal Process Id - Forward the resolved PID for a terminal to Sky on
sky://terminal/processId. - Close
Terminal - Dispose a PTY via
TerminalProvider::DisposeTerminal. - Open
Terminal - Spawn a new PTY via
TerminalProvider::CreateTerminal. Builds the options JSONTerminalStateDTO::Createexpects (name + shellPath + shellArgs + cwd) and forwards through. - Resize
Terminal - Notify Sky/Wind of new terminal dimensions on
sky://terminal/resize. TODO(P1): also callportable_pty::MasterPty::resizeonce the master handle is stored inTerminalStateDTO(requires wrapping inArc<Mutex>). - Terminal
Input - Forward bytes received from Cocoon to the PTY master writer.