Address remaining coderabbitai findings on PR #369:
- check_package_installed() did __import__(package_name) directly, but
python-dateutil and websocket-client import as dateutil/websocket. Both
always failed the "already installed" check and were reinstalled on
every run. Add an IMPORT_NAME_MAP for the mismatched names.
- _run() still read the entire temp file into memory before slicing the
tail. Stream it line-by-line into a deque(maxlen=ERROR_TAIL_LINES)
instead so memory use stays bounded for very chatty commands.