fix(limrun): list only the connection's instance in devices
Summary
On a Limrun connection, devices listed this host's simulators, emulators and USB devices instead of the Limrun instance. The daemon's devices query dropped the request's leaseProvider and leaseId, so the Limrun inventory declined and the provider-first gateway fell back to local inventory. A Limrun lease with no live session also declined, which had the same effect.
devicespasses the request's lease scope to the inventory when the provider needs a runtime (leaseProviderRequiringRuntime). Proxy and cloud connections keep listing the host behind them.- The Limrun inventory answers an empty list for its own lease when no session is live, instead of declining.
website/docs/docs/limrun.mdsays whatdeviceslists.
6 files. Fixes #4304.
Validation
Head a195bc490b: pnpm check:affected --run --head a195bc490b passed, exactCommit=true. The new daemon tests fail on base (Limrun) and on the previous head (proxy).
Live run on Limrun iOS with the source CLI: connect limrun --platform ios, devices --json, open com.apple.Preferences, devices --json, then cleanup.
| Connection | base (inventory code as on main) | head (3ec88a7e42; re-run at a195bc490b for API key) |
|---|---|---|
| API key | 25 entries: host iOS simulators and a USB iPhone, no Limrun device (before and after open; run on 83945b7a9f) | 1 entry: limrun:ios:<lease> "Limrun ios ios_euna" (before and after open) |
Existing instance (LIM_IOS_INSTANCE_*) | 25 host entries, before and after open | 1 entry: limrun:ios:<lease> "Limrun ios attached" |
Unchanged: on a fresh API-key connection, devices still allocates the instance, like any first device command. Every instance was released.
š¤ Generated with Claude Code