function parseScrcpyAppList(rawText) {
  if (typeof rawText !== 'string') {
    throw new TypeError('scrcpy content must be a string')
  }

  return rawText
    .split('\n')
    .filter(line => line.startsWith(' * ') || line.startsWith(' - '))
    .map((line) => {
      const isSystemApp = line.startsWith(' * ')
      // Remove prefix and trim
      const content = line.substring(3).trim()
      // Find last space to separate name and package
      const lastSpaceIndex = content.lastIndexOf(' ')

      return {
        name: content.substring(0, lastSpaceIndex).trim(),
        packageName: content.substring(lastSpaceIndex + 1).trim(),
        isSystemApp,
      }
    })
}
Parse scrcpy app list output into structured data
@param {string} rawText - Raw text output from scrcpy --list-apps command
@returns {Array<{
  name: string,
  packageName: string,
  isSystemApp: boolean
}>} Array of parsed app objects