ShellResult
data class ShellResult(val exitCode: Int, val stdoutBytes: ByteArray, val stderr: String, val outputTruncated: Boolean = false)
Result of a shell invocation. exitCode == 0 is the success convention; tools test it explicitly because some commands return non-zero on success (e.g. pm grant for an unknown permission).
stdoutBytes is the raw byte stream — needed for binary commands like screencap -p which emit PNG bytes. stdout is the UTF-8 decode of those bytes for text use. stderr is always text.
outputTruncated is true when the backend stopped collecting output because stdout or stderr exceeded its per-stream capture cap (the process is killed at that point, so exitCode is then -1 and the captured output is a prefix). Backends that don't cap leave it false.