backend/api/
├── terminal.py # Router only
├── terminal_models.py # Pydantic models (done ✅)
├── terminal_pty.py # PTY process management
├── terminal_sessions.py # Session lifecycle
├── terminal_commands.py # Command execution
└── terminal_websocket.py # WebSocket handlers
Parent Issue
Part of #185 (Split oversized Python files)
Current State
backend/api/terminal.py: 2054 lines, 23 functionsterminal_models.py(137 lines) ✅Tasks
terminal_pty.pyterminal_sessions.pyterminal_commands.pyterminal_websocket.pyterminal.pyAcceptance Criteria
File Structure After Split