feat(apps): add standalone uninstall command

Merged
MI
5h ago
+623-25

Summary

Adds uninstall <app>, so a test can start with the app removed, for example before installing a fresh build or the store version.

agent-device uninstall com.example.app --platform android
await client.apps.uninstall({ app: 'com.example.app' });

Android uses the existing uninstallAndroidPackage. iOS simulators and CoreDevice devices use uninstallAppleApp, the helper reinstall already calls (simctl uninstall and devicectl device uninstall app). Other platforms report the operation as unavailable. reinstall doesn't change.

The app name resolves against installed apps. A package name or bundle id that isn't installed returns wasInstalled: false. Any other name that matches nothing fails with APP_NOT_INSTALLED.

48 files, about 590 lines. Roughly 120 are behavior. The rest is the registry declarations a new command needs, coverage pins and tests.

Known gaps I left alone:

  • On iOS, a dotted target that matches nothing reports "not installed", even a mistyped dotted display name.
  • A bundle id in a different case, or an empty Android or CoreDevice app list, also reports "not installed".
  • If a CoreDevice disconnects mid-uninstall, the command can report success.

Validation

Gates ran on 36c92021f with pnpm gate <id>. dd532cb3f adds the Android readiness fix and its regression test, and lint, typecheck, platform and daemon tests pass on it.

  • Pass: format, lint, typecheck, layering, fallow, build, macos-coverage, command-docs, docs-links, docs-prose, provider-integration (198/198).
  • unit has 5 failures and integration-node has 2 smoke-daemon-clean failures. All of them fail on base too, in a root-user container.
  • No live device run yet.