Problem
TerminalSession (model layer) holds a direct reference to LocalProcessTerminalView (AppKit/SwiftTerm view):
var terminalView: LocalProcessTerminalView?
This couples the model to the view layer, preventing isolated testing and future renderer swaps.
Proposed Solution
Introduce a TerminalProcess protocol that abstracts startProcess, send, shellPid. TerminalSession references the protocol, not the concrete type.
Impact
- Enables unit testing of session logic without SwiftTerm
- Clean separation of concerns
- Foundation for potential alternative renderers