stim 1.35.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/README.md +3 -1
  2. package/dist/{acquire-artifact-0E_iw7Rf.mjs → acquire-artifact-zBUbPuDP.mjs} +20 -4
  3. package/dist/{act-CyxFP8Vj.mjs → act-BGAFjY8f.mjs} +21 -21
  4. package/dist/{activity-BQpJpAjA.mjs → activity-CdpXXSq2.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-BoOC3ZF9.mjs → agent-device-usage-output-D0582GHy.mjs} +5 -5
  6. package/dist/{android-YRb1UzSy.mjs → android-BBwLpxRh.mjs} +51 -40
  7. package/dist/{android-B2DSKg-A.mjs → android-BPBARZMR.mjs} +2 -2
  8. package/dist/{android-Iq0M2t2d.mjs → android-CGctfYpv.mjs} +7 -7
  9. package/dist/{android-CjcJE7uA.mjs → android-CaSsewbu.mjs} +5 -5
  10. package/dist/android-cas-compiler.mjs +1 -1
  11. package/dist/{android-cas-Dhcjkys1.mjs → android-cas-p8gna03x.mjs} +4 -4
  12. package/dist/{android-image-DFk26aY6.mjs → android-image-DY8KxK2m.mjs} +3 -3
  13. package/dist/{android-project-DhO6el8N.d.mts → android-project-v_1nej_x.d.mts} +3 -1
  14. package/dist/api.d.mts +30 -9
  15. package/dist/api.mjs +36 -28
  16. package/dist/{apk-signed-tail-CPpA-3vu.mjs → apk-signed-tail-BMv-KLcB.mjs} +2 -2
  17. package/dist/{artifact-2NIRz6SC.mjs → artifact-BrNZTZtA.mjs} +44 -15
  18. package/dist/{artifact-BG4h_WTC.mjs → artifact-BsimBWxG.mjs} +37 -15
  19. package/dist/{artifact-platform-DqCWUieN.mjs → artifact-platform-BaGL1i1X.mjs} +1 -1
  20. package/dist/{auto-placement-CBdWa87P.mjs → auto-placement-CFKNrWLU.mjs} +7 -7
  21. package/dist/{browser-web-CNlRugJv.mjs → browser-web-YFsgCP_a.mjs} +15 -15
  22. package/dist/{build-CNE3Wo5-.mjs → build-DIhuoozz.mjs} +77 -28
  23. package/dist/{build-cache-_fkewiwH.mjs → build-cache-Dt-dhCJF.mjs} +6 -6
  24. package/dist/{build-plan-BSgR9yKo.mjs → build-plan-CgnLDof9.mjs} +7 -7
  25. package/dist/{cache-manifest-8JX9S1QJ.mjs → cache-manifest-BO0TIcPV.mjs} +1 -1
  26. package/dist/cache-manifest.mjs +1 -1
  27. package/dist/{cdp-C216kOAn.mjs → cdp-CgT47_9A.mjs} +1 -1
  28. package/dist/{chrome-C8sC5tdl.mjs → chrome-DL5znvmo.mjs} +1 -1
  29. package/dist/{cli-DK24VzHi.mjs → cli-BGUrlSH3.mjs} +21 -20
  30. package/dist/cli.mjs +1 -1
  31. package/dist/{client-Dy0eJJtz.mjs → client-DU6dnGX1.mjs} +7 -7
  32. package/dist/collector-run.mjs +7 -7
  33. package/dist/{command-output-CGxrQ3Bd.mjs → command-output-ByEmIwur.mjs} +1 -1
  34. package/dist/{config-BW0fAtoK.mjs → config-CNmN-ndb.mjs} +61 -12
  35. package/dist/{dependencies-IVl2Ga2D.mjs → dependencies-BozoTBqa.mjs} +102 -64
  36. package/dist/{dependency-state-mL5g4H6K.mjs → dependency-state-BQeC4FVn.mjs} +2 -2
  37. package/dist/{detached-entry-tfrgGVWb.mjs → detached-entry-VqFeEE9W.mjs} +1 -1
  38. package/dist/{dev-client-DDApoVvd.mjs → dev-client-3SQzMRXZ.mjs} +2 -2
  39. package/dist/{device-p_cp8IzW.mjs → device-BIg1iExg.mjs} +11 -11
  40. package/dist/{device-mOFYiHiw.mjs → device-DGMvzoZZ.mjs} +13 -13
  41. package/dist/{device-android-C-biM49_.mjs → device-android-CBat355q.mjs} +9 -9
  42. package/dist/{device-capacity-C0PiTyRb.mjs → device-capacity-DWUOvY13.mjs} +19 -19
  43. package/dist/device-host-worker.mjs +16 -16
  44. package/dist/{device-pool-nsMvt2X2.mjs → device-pool-B8IqZKqm.mjs} +3 -3
  45. package/dist/{device-provision-BYYJuRKZ.mjs → device-provision-DWAoSKEw.mjs} +10 -10
  46. package/dist/{doctor-RosbBfTV.mjs → doctor-Bknt0121.mjs} +24 -24
  47. package/dist/{doctor-BptE4PaK.mjs → doctor-CPzwqcXY.mjs} +15 -15
  48. package/dist/{doctor-BBAb8NLe.mjs → doctor-CxgR5vPi.mjs} +1 -1
  49. package/dist/{doctor-fingerprint-DqWvIhMb.mjs → doctor-fingerprint-Bo4z8YNP.mjs} +1 -1
  50. package/dist/doctor-fingerprint.mjs +1 -1
  51. package/dist/{doctor-watchman-CKOnCINh.mjs → doctor-watchman-CPE4C8KV.mjs} +5 -5
  52. package/dist/{eas-build-BxJdzQnF.mjs → eas-build-CwOXKJwa.mjs} +4 -4
  53. package/dist/{eas-fallback-DU2WDF8r.mjs → eas-fallback-Cnb12a50.mjs} +6 -6
  54. package/dist/{eas-session-ledger-DCUfh6m7.mjs → eas-session-ledger-TE1miVz5.mjs} +6 -6
  55. package/dist/{error-diagnostics-D6wlK-yX.mjs → error-diagnostics-CXTT3bYC.mjs} +10 -10
  56. package/dist/{exec-CGuDzt40.mjs → exec-L37dbiIb.mjs} +7 -1
  57. package/dist/{gc-BUkonUfz.mjs → gc-0jdcnDHs.mjs} +19 -19
  58. package/dist/{gc-CvMEytXz.mjs → gc-1ZLq1djg.mjs} +2 -2
  59. package/dist/{guide-BWozWG7D.mjs → guide-COxIANZu.mjs} +179 -86
  60. package/dist/{hosted-android-y6K3DKQT.mjs → hosted-android-D8JbIzgC.mjs} +4 -4
  61. package/dist/{hosted-client-Bb89P6an.mjs → hosted-client-BLwuXEZS.mjs} +7 -7
  62. package/dist/{hosted-logs-DYPsnWMF.mjs → hosted-logs-BWEQNJx_.mjs} +7 -7
  63. package/dist/{hosted-logs-sync-DfUJ2GpF.mjs → hosted-logs-sync-uWSrH2mf.mjs} +5 -5
  64. package/dist/{hosted-macos-DsEzYVY_.mjs → hosted-macos-BnCYAv1y.mjs} +6 -6
  65. package/dist/{hosted-native-C9xQYYFb.mjs → hosted-native-OBT2sJxn.mjs} +8 -8
  66. package/dist/{ios-Qam0bT9n.mjs → ios-2Qr4_Zu2.mjs} +1 -1
  67. package/dist/{ios-BCKxjpRp.mjs → ios-Bjz7aPLy.mjs} +8 -8
  68. package/dist/{ios-BdZdNsAj.mjs → ios-BveW7qK1.mjs} +16 -6
  69. package/dist/{ios-FhMkDfNC.mjs → ios-CGyx4PA7.mjs} +44 -34
  70. package/dist/{ios-device-DMOnaH5n.mjs → ios-device-ByrDWSpC.mjs} +3 -3
  71. package/dist/{ios-device-DLdEDWJj.mjs → ios-device-ygijU78G.mjs} +1 -1
  72. package/dist/{ios-project-PXBDoaii.mjs → ios-project-XHg87vyQ.mjs} +7 -7
  73. package/dist/{ios-signing-CCFNjjWU.mjs → ios-signing-CRYQ1W42.mjs} +3 -3
  74. package/dist/{ios-state-CWsBysyN.mjs → ios-state-enWc5P6U.mjs} +1 -1
  75. package/dist/{js-swap-07ikLRJJ.mjs → js-swap-C6vl3vEd.mjs} +60 -13
  76. package/dist/{launch-CTq5gBim.mjs → launch-f3RnbFW5.mjs} +48 -28
  77. package/dist/{lightened-DikgC3-S.mjs → lightened-Cdfmo8MO.mjs} +5 -5
  78. package/dist/{logs-YDMfEohb.mjs → logs-DAjxBF3c.mjs} +6 -6
  79. package/dist/{logs-DwI3Rkpf.mjs → logs-x3em2-oI.mjs} +7 -7
  80. package/dist/{macos-BoNM-l6f.mjs → macos-D_LAseN9.mjs} +22 -22
  81. package/dist/{macos-C_e9f5-5.mjs → macos-ZfpWlzBO.mjs} +1 -1
  82. package/dist/macos-run.mjs +1 -1
  83. package/dist/maintenance-run.mjs +6 -6
  84. package/dist/{metro-B5PVz0Wv.mjs → metro-TIQ1Wft-.mjs} +4 -4
  85. package/dist/{metro-request-2LmFpC1z.mjs → metro-request-DcUxyaq8.mjs} +2 -2
  86. package/dist/{named-ports-CA0nB9Yw.mjs → named-ports-BfEMi9bK.mjs} +3 -3
  87. package/dist/{native-android-Mv4YTrVN.mjs → native-android-COOrNDk2.mjs} +18 -18
  88. package/dist/{native-gradle-artifact-inputs-C_TU6wPq.mjs → native-gradle-artifact-inputs-B4Mwydmf.mjs} +5 -5
  89. package/dist/{native-runtime-oDqT4UES.mjs → native-runtime-UxUBU8up.mjs} +6 -6
  90. package/dist/{native-source-ChAGj7R1.mjs → native-source-D2ZfiQ6U.mjs} +1 -1
  91. package/dist/{native-xcode-inputs-DsozghTX.mjs → native-xcode-inputs-DUv7Q3ok.mjs} +3 -3
  92. package/dist/{native-xcode-ios-UXnH9NRY.mjs → native-xcode-ios-DXcteLVi.mjs} +18 -19
  93. package/dist/offload-worker.d.mts +1 -1
  94. package/dist/offload-worker.mjs +22 -22
  95. package/dist/{operation-exec-DKlBcKAL.mjs → operation-exec-DNynwpqO.mjs} +1 -1
  96. package/dist/{ownership-hC7xvvxF.mjs → ownership-CQTg6v1d.mjs} +3 -3
  97. package/dist/{page-Dj8IqvGM.mjs → page-CoN9al_x.mjs} +2 -2
  98. package/dist/{phone-reverses-B9WyCBKQ.mjs → phone-reverses-CHtco460.mjs} +4 -4
  99. package/dist/{placement-log-D0DZLcJk.mjs → placement-log-oQnELAvQ.mjs} +1 -1
  100. package/dist/{plan-placement-DqmLrWoX.mjs → plan-placement-45EOlIG1.mjs} +6 -6
  101. package/dist/{ports-C1_1Qgdy.mjs → ports-DKO7EUNt.mjs} +3 -3
  102. package/dist/{prebuild-BptrXmh_.mjs → prebuild-BKkj3OyL.mjs} +12 -12
  103. package/dist/{project-Dqqj3IkW.mjs → project-BCtQz48d.mjs} +16 -16
  104. package/dist/{pull-request-BpMTNkMB.mjs → pull-request-m8cMZ3aE.mjs} +2 -2
  105. package/dist/pull-requests.mjs +1 -1
  106. package/dist/{react-native-android-Bsm_o4A8.mjs → react-native-android-MI4ktuhL.mjs} +27 -31
  107. package/dist/{react-native-build-BTUcE926.mjs → react-native-build-dixAL2G8.mjs} +9 -9
  108. package/dist/{react-native-doctor-CfsCTKZt.mjs → react-native-doctor-CvkWincj.mjs} +6 -6
  109. package/dist/{react-native-ios-_cK2pjZn.mjs → react-native-ios-DF5otoBR.mjs} +17 -18
  110. package/dist/recorded-build-CGHGCO8m.mjs +76 -0
  111. package/dist/{recordings-AKZfsW2W.mjs → recordings-BcOzqFD1.mjs} +1 -1
  112. package/dist/{registration-DKjJGQ6p.mjs → registration-C-3PDR3X.mjs} +1 -1
  113. package/dist/{reload-DsTMtMDU.mjs → reload-DGWfNFwQ.mjs} +16 -16
  114. package/dist/{reload-CXgce4Yo.mjs → reload-DWxmO9dY.mjs} +1 -1
  115. package/dist/{remote-BsmYHUxH.mjs → remote-CV2jBcLv.mjs} +9 -9
  116. package/dist/remote-DWYGW2f5.mjs +158 -0
  117. package/dist/{result-DK6nTO-M.mjs → result-CWyxwPvZ.mjs} +23 -17
  118. package/dist/{run-N-BbRxnC.mjs → run-FZtMQgrx.mjs} +2 -2
  119. package/dist/{server-bare-BTlICuaX.mjs → server-bare-Ksh1NKeI.mjs} +2 -2
  120. package/dist/{server-command-Cu2w-UjB.mjs → server-command-BO2DIsJV.mjs} +5 -5
  121. package/dist/server-expo-9hQwyLze.mjs +2 -0
  122. package/dist/{server-expo-CjQwxvIi.mjs → server-expo-ZS9_WaNG.mjs} +3 -3
  123. package/dist/{settings-B5IBDfTx.mjs → settings-Ag4pbs0z.mjs} +5 -4
  124. package/dist/{settings-DcmVICCn.mjs → settings-TYrzDh8T.mjs} +2 -2
  125. package/dist/{settings-payload-BoiFMiFq.mjs → settings-payload-CUM0DYwz.mjs} +5 -5
  126. package/dist/{settings-write-B3LzEVwf.mjs → settings-write-D_9_IEx7.mjs} +6 -6
  127. package/dist/settings.schema.json +1 -1
  128. package/dist/{simslim-DKdJx0LL.mjs → simslim-BMgpTRWe.mjs} +2 -2
  129. package/dist/{slot-launch-DsQmPdlg.mjs → slot-launch-DW_29Bmu.mjs} +6 -6
  130. package/dist/{stage-Dqk0qvaI.mjs → stage-_8k8p7uq.mjs} +2 -2
  131. package/dist/{start-GkRBR1e3.mjs → start-CdgtOksb.mjs} +1 -1
  132. package/dist/{start-DIFiT2P5.mjs → start-CzBB5R7N.mjs} +12 -12
  133. package/dist/{state-CtmYTRWm.mjs → state-CfP-ccP8.mjs} +4 -4
  134. package/dist/{state-DSOUqO-o.mjs → state-DsrFh3yv.mjs} +2 -2
  135. package/dist/{stats-Dz08IopP.mjs → stats-BgTyuzib.mjs} +5 -5
  136. package/dist/{stats-report-BVRCqwWA.mjs → stats-report-Ci6TAfFm.mjs} +1 -1
  137. package/dist/{status-DhKv_e8a.mjs → status-Bcdy5eHt.mjs} +24 -24
  138. package/dist/{status-DTFhDnd1.mjs → status-C2PdxK6q.mjs} +1 -1
  139. package/dist/{status-Dost__Vn.mjs → status-C7Zzb-Eh.mjs} +1 -1
  140. package/dist/{status-watch-UecLnPQD.mjs → status-watch-DY0EZcmg.mjs} +5 -5
  141. package/dist/status-worker.mjs +1 -1
  142. package/dist/{stim-desktop-_WTria-r.mjs → stim-desktop-DWGAfaud.mjs} +2 -2
  143. package/dist/{stop-CcZISot5.mjs → stop-CbxsTKyZ.mjs} +5 -5
  144. package/dist/{stop-vRe6TQk5.mjs → stop-CkmBkNyg.mjs} +16 -16
  145. package/dist/{stop-QFOqgICJ.mjs → stop-iGkvEvDn.mjs} +2 -2
  146. package/dist/supervisor-run.mjs +15 -15
  147. package/dist/{support-DW575Dnx.mjs → support-CfYmOdQs.mjs} +76 -38
  148. package/dist/{support-CNqJDBrH.mjs → support-JZ4KRW0C.mjs} +7 -7
  149. package/dist/{swiftpm-artifact-inputs-DQTJTczX.mjs → swiftpm-artifact-inputs-C1rZDRDs.mjs} +4 -4
  150. package/dist/{swiftpm-macos-BKczZ0k9.mjs → swiftpm-macos-DRTjC7Ff.mjs} +11 -11
  151. package/dist/{toolchain-DRQyCvlp.mjs → toolchain-BeD7tbBW.mjs} +73 -9
  152. package/dist/{toolchain-BDlugtoh.mjs → toolchain-CNlKc9pH.mjs} +1 -1
  153. package/dist/trigger-Bp3lruF2.mjs +2 -0
  154. package/dist/{trigger-BtB4kbe0.mjs → trigger-G_gbfIVB.mjs} +2 -2
  155. package/dist/{warm-progress-q11Vdvhh.mjs → warm-progress-CJQ8tk5O.mjs} +6 -6
  156. package/dist/{web-TDWjHUT3.mjs → web-BXbmysa1.mjs} +9 -9
  157. package/dist/web-BcaySU05.mjs +2 -0
  158. package/dist/web-run.mjs +8 -8
  159. package/dist/windows-report.mjs +1 -1
  160. package/dist/{workspace-state-BdZ-QgmB.mjs → workspace-state-DOPXG2Gp.mjs} +3 -3
  161. package/dist/{workspaces-CY3KSdC0.mjs → workspaces-DCzDzydB.mjs} +15 -14
  162. package/dist/{worktree-D6myrQ2H.mjs → worktree-6ngObKkw.mjs} +1 -1
  163. package/dist/{worktree-fKKe8j5M.mjs → worktree-BAC43Kio.mjs} +27 -27
  164. package/package.json +7 -7
  165. package/dist/server-expo-DbSypdNl.mjs +0 -2
  166. package/dist/trigger-D8B7QR0q.mjs +0 -2
  167. package/dist/web-D1m1LKEz.mjs +0 -2
@@ -1,8 +1,8 @@
1
- import { D as ownership_claim_exports, T as process_identity_exports, a as trackReportResource, f as WorkspaceProcessCleanupError, r as reportSignal, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
1
+ import { D as ownership_claim_exports, T as process_identity_exports, a as trackReportResource, f as WorkspaceProcessCleanupError, r as reportSignal, t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { t as runOperationFile } from "./operation-exec-DNynwpqO.mjs";
3
3
  import { join } from "node:path";
4
4
  import { ambientEnv, configDir, ensurePrivateDir } from "@stim-cli/core";
5
- import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getPlatformDeviceLimits, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
5
+ import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getPlatformDeviceLimits, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1, wrongTailnet } from "@stim-cli/core/state";
6
6
  import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse, sep as sep$1 } from "path";
7
7
  import { existsSync, lstatSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
8
8
  import { InvalidArgumentError } from "commander";
@@ -353,7 +353,20 @@ function tailscaleDiagnosis(code) {
353
353
  };
354
354
  }
355
355
  }
356
- function notOnTailnetDiagnosis(entry, ambiguous) {
356
+ const tailnetLabel = (tailnet) => tailnet.suffix ? `${tailnet.name} (${tailnet.suffix})` : tailnet.name;
357
+ /** A machine that is not on the tailnet this Mac is signed in to now, but was on the one it was signed in to at approval. */
358
+ function wrongTailnetDiagnosis(entry, wrong) {
359
+ const owner = wrong.owner ? `, or to ${wrong.owner}, the tailnet that owns ${entry}` : "";
360
+ return {
361
+ layer: "peer",
362
+ code: "peer-wrong-tailnet",
363
+ title: "Other Tailscale account",
364
+ message: `This Mac asked ${entry} for access while it was signed in to the Tailscale tailnet ${tailnetLabel(wrong.recorded)}. This Mac is signed in to ${tailnetLabel(wrong.current)} now, and no peer there is named ${entry}.`,
365
+ remedy: `Switch Tailscale on this Mac to ${tailnetLabel(wrong.recorded)}${owner}, then run \`stim doctor\` again.`
366
+ };
367
+ }
368
+ function notOnTailnetDiagnosis(entry, ambiguous, wrong) {
369
+ if (wrong && !ambiguous) return wrongTailnetDiagnosis(entry, wrong);
357
370
  return {
358
371
  layer: "peer",
359
372
  code: ambiguous ? "peer-ambiguous" : "peer-not-found",
@@ -498,7 +511,7 @@ function unconfirmedKeyFinding(code, entry, fingerprint) {
498
511
  level: "note",
499
512
  title: `Remote machine ${entry} needs its server key confirmed`,
500
513
  detail: `${entry} approved this machine and answered with the stim-server key fingerprint ${fingerprint}. On the local network nothing vouches for that key, so Stim pins it only after a person checks it against the fingerprint \`stim-server setup\` printed there. Until then this machine does not use ${entry}.`,
501
- fix: `Run \`stim doctor --fix\` in a terminal here and answer y only if the fingerprint matches. If it does not, another machine answered at that address: do not confirm, and check the address in remote.machines.`
514
+ fix: `Run \`stim remote list\` in a terminal here and answer y only if the fingerprint matches. If it does not, another machine answered at that address: do not confirm, and check the address in remote.machines.`
502
515
  };
503
516
  }
504
517
  function diagnosisFinding(code, entry, diagnosis) {
@@ -637,7 +650,7 @@ function outdatedServer(entry, version, command) {
637
650
  return {
638
651
  title: `Remote machine ${entry} runs an older stim-server`,
639
652
  detail: `The stim-server on ${entry} speaks an older protocol than this Stim, so it cannot authenticate this machine.`,
640
- fix: command ? `${update}, then run this there to approve this machine: ${command}\nAfter approving, run \`stim doctor\` on this machine to reconnect.` : `${update}, then run \`stim doctor --fix\` here.`
653
+ fix: command ? `${update}, then run this there to approve this machine: ${command}\nAfter approving, run \`stim remote list\` on this machine to reconnect.` : `${update}, then run \`stim remote add ${entry}\` here.`
641
654
  };
642
655
  }
643
656
  /**
@@ -883,9 +896,19 @@ async function diagnoseTailscale(io) {
883
896
  const reading = readTailscale(io.rawStatus ? await io.rawStatus() : null);
884
897
  return tailscaleDiagnosis(reading.running ? "tailscale-unavailable" : reading.code);
885
898
  }
886
- /** Where to reach a paired machine now, or why Stim cannot; the handshake then checks its pinned key. */
899
+ /**
900
+ * Where to reach a paired machine now, or why Stim cannot; the handshake then checks its pinned key. A machine
901
+ * missing from the tailnet this Mac is signed in to says so when the credential recorded another tailnet.
902
+ */
887
903
  async function resolveEndpoint(credential, status = () => tailscaleStatusAsync(signal), signal) {
888
- return machineEndpoint(credential.machine, parseMachine(credential.machine)?.transport === "tailscale" ? await status() : null);
904
+ const parsed = parseMachine(credential.machine);
905
+ const current = parsed?.transport === "tailscale" ? await status() : null;
906
+ const found = machineEndpoint(credential.machine, current);
907
+ if (typeof found !== "string" || parsed?.transport !== "tailscale" || findPeer(current, parsed.name) !== "missing") return found;
908
+ const wrong = wrongTailnet(credential, current);
909
+ if (!wrong) return found;
910
+ const { message, remedy } = wrongTailnetDiagnosis(credential.machine, wrong);
911
+ return `${message} ${remedy}`.replace(/\.$/, "");
889
912
  }
890
913
  /**
891
914
  * Shows a local network machine's server key fingerprint and asks a person whether it matches the one
@@ -910,7 +933,7 @@ function keyConfirmer(ask) {
910
933
  }
911
934
  /** The remedy for a pending request: the printed setup command, or where the person finds it. */
912
935
  function setupRemedy(entry, command) {
913
- return command ? `A person on ${entry} runs this there to approve this machine: ${command}\nAfter approving, run \`stim doctor\` on this machine to reconnect.` : `A person on ${entry} runs the \`stim-server setup\` command Stim Desktop showed for this machine.`;
936
+ return command ? `A person on ${entry} runs this there to approve this machine: ${command}\nAfter approving, run \`stim remote list\` on this machine to reconnect.` : `A person on ${entry} runs the \`stim-server setup\` command Stim Desktop showed for this machine.`;
914
937
  }
915
938
  function setupCommand(machine, ticket, expiresAt, flags, version) {
916
939
  const parsed = parseMachine(machine);
@@ -928,10 +951,12 @@ function newPending(input, ticket, expiresAt, now) {
928
951
  state: "pending",
929
952
  requestedAt: new Date(now).toISOString(),
930
953
  ticket,
931
- ...expiresAt ? { expiresAt } : {}
954
+ ...expiresAt ? { expiresAt } : {},
955
+ ...input.tailnet ? { tailnet: input.tailnet } : {}
932
956
  };
933
957
  }
934
958
  function approved(input, reply, requestedAt) {
959
+ const tailnet = input.credential?.tailnet ?? input.tailnet;
935
960
  return {
936
961
  state: "approved",
937
962
  credential: {
@@ -941,7 +966,8 @@ function approved(input, reply, requestedAt) {
941
966
  state: "approved",
942
967
  requestedAt,
943
968
  serverKey: reply.serverKey,
944
- deviceId: reply.result.device.id
969
+ deviceId: reply.result.device.id,
970
+ ...tailnet ? { tailnet } : {}
945
971
  },
946
972
  result: reply.result
947
973
  };
@@ -1318,6 +1344,29 @@ async function writeConfigSettingAsync(target, dottedKey, value, signal) {
1318
1344
  const status = target.scope === "machine" && (dottedKey === "remote.machines" || localDevicePoolOff(dottedKey, value)) ? await tailscaleStatusAsync(signal) : null;
1319
1345
  return withConfigLockAsync(() => applyConfigSetting(target, dottedKey, value, status), signal);
1320
1346
  }
1347
+ /**
1348
+ * Replaces machine-scope `remote.machines` with `change` applied to the list read under the config lock, so a
1349
+ * concurrent writer's entries are kept. `status` is the `tailscale status` the automatic device pool check reads.
1350
+ * Returns the list before and after; null before when the setting is not a list of strings, in which case nothing is
1351
+ * written.
1352
+ */
1353
+ async function updateRemoteMachinesAsync(change, status, signal) {
1354
+ signal?.throwIfAborted();
1355
+ return withConfigLockAsync(() => {
1356
+ const remote = loadConfig()?.remote;
1357
+ const current = remote === void 0 ? [] : isJsonObject(remote) ? remote.machines === void 0 ? [] : remote.machines : null;
1358
+ if (!Array.isArray(current) || !current.every((each) => typeof each === "string")) return {
1359
+ before: null,
1360
+ after: []
1361
+ };
1362
+ const after = change(current);
1363
+ if (after.length !== current.length || after.some((each, at) => each !== current[at])) applyConfigSetting({ scope: "machine" }, "remote.machines", after, status);
1364
+ return {
1365
+ before: current,
1366
+ after
1367
+ };
1368
+ }, signal);
1369
+ }
1321
1370
  function applyConfigSetting(target, dottedKey, value, status) {
1322
1371
  const cfg = value === void 0 ? loadConfig() : ensureConfig();
1323
1372
  const settings = cfg ? targetSettings(cfg, target, value !== void 0) : null;
@@ -1389,4 +1438,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
1389
1438
  return result;
1390
1439
  }
1391
1440
  //#endregion
1392
- export { unconfirmedKeyFinding as $, writeConfigSetting as A, keyConfirmer as B, removeProject as C, upsertProject as D, setSupervisor as E, diagnoseOutcome as F, realIo as G, outdatedServer as H, diagnoseTailscale as I, setupRemedy as J, resolveEndpoint as K, doctorIo as L, acquireAvdClaim as M, SERVER_OUTDATED as N, withConfigLock$1 as O, diagnoseConnectFailure as P, notOnTailnetDiagnosis as Q, endpoint$1 as R, releaseMetroPort as S, setDevice as T, parseMachine$1 as U, openAuthenticated as V, reachMachine as W, diagnoseLocalUnreachable as X, tailscaleStatusAsync as Y, diagnosisFinding as Z, isPathPrefix$1 as _, validateDeviceSlot as _t, clearDevice as a, isOnMountedVolume as at, refuseRelativeStimPaths as b, ensureConfig as c, volumeRootFor as ct, getConfigDir as d, deviceSlotKey as dt, readHostPermissions as et, getConfigPath$1 as f, deviceSlotPlatforms as ft, getRepoSettings as g, removeSlotDevice as gt, getProjectSettings as h, projectDeviceSlots as ht, clearAndroidBootPending as i, isAbsentPath as it, writeConfigSettingAsync as j, withConfigLockAsync$1 as k, findEnclosingWorktreeRoot as l, assignSlotDevice as lt, getProject as m, parseDeviceSlotOption as mt, allMetroPorts as n, directorySizeAsync as nt, clearSupervisor as o, listMountedVolumes as ot, getPlatformDeviceLimits as p, parseDeviceSlotKey as pt, sayHello as q, claimMetroPort as r, formatBytes as rt, configCorruptRepair as s, measuredDirectorySizeAsync as st, allConsolePortsAndSerials as t, directorySize as tt, getConcurrencyLimits as u, deviceSlotFileKey as ut, loadConfig$1 as v, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, findPeer$1 as z };
1441
+ export { notOnTailnetDiagnosis as $, withConfigLockAsync$1 as A, findPeer$1 as B, removeProject as C, updateRemoteMachinesAsync as D, setSupervisor as E, diagnoseConnectFailure as F, reachMachine as G, openAuthenticated as H, diagnoseOutcome as I, sayHello as J, realIo as K, diagnoseTailscale as L, writeConfigSettingAsync as M, acquireAvdClaim as N, upsertProject as O, SERVER_OUTDATED as P, diagnosisFinding as Q, doctorIo as R, releaseMetroPort as S, setDevice as T, outdatedServer as U, keyConfirmer as V, parseMachine$1 as W, tailscaleStatusAsync as X, setupRemedy as Y, diagnoseLocalUnreachable as Z, isPathPrefix$1 as _, removeSlotDevice as _t, clearDevice as a, isAbsentPath as at, refuseRelativeStimPaths as b, ensureConfig as c, measuredDirectorySizeAsync as ct, getConfigDir as d, deviceSlotFileKey as dt, unconfirmedKeyFinding as et, getConfigPath$1 as f, deviceSlotKey as ft, getRepoSettings as g, projectDeviceSlots as gt, getProjectSettings as h, parseDeviceSlotOption as ht, clearAndroidBootPending as i, formatBytes as it, writeConfigSetting as j, withConfigLock$1 as k, findEnclosingWorktreeRoot as l, volumeRootFor as lt, getProject as m, parseDeviceSlotKey as mt, allMetroPorts as n, directorySize as nt, clearSupervisor as o, isOnMountedVolume as ot, getPlatformDeviceLimits as p, deviceSlotPlatforms as pt, resolveEndpoint as q, claimMetroPort as r, directorySizeAsync as rt, configCorruptRepair as s, listMountedVolumes as st, allConsolePortsAndSerials as t, readHostPermissions as tt, getConcurrencyLimits as u, assignSlotDevice as ut, loadConfig$1 as v, validateDeviceSlot as vt, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, endpoint$1 as z };
@@ -1,41 +1,41 @@
1
- import { l as cancellableSleep, t as getExecutor, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
- import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-CGxrQ3Bd.mjs";
4
- import { D as upsertProject, dt as deviceSlotKey, k as withConfigLockAsync, m as getProject, u as getConcurrencyLimits, ut as deviceSlotFileKey, y as recordIosSchemeApprovals } from "./config-BW0fAtoK.mjs";
5
- import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-B5IBDfTx.mjs";
6
- import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-Dqqj3IkW.mjs";
7
- import { o as workspaceLinks } from "./stim-desktop-_WTria-r.mjs";
8
- import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-B5PVz0Wv.mjs";
1
+ import { l as cancellableSleep, t as getExecutor, w as withDrainingCancellation } from "./exec-L37dbiIb.mjs";
2
+ import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-DOPXG2Gp.mjs";
3
+ import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-ByEmIwur.mjs";
4
+ import { A as withConfigLockAsync, O as upsertProject, dt as deviceSlotFileKey, ft as deviceSlotKey, m as getProject, u as getConcurrencyLimits, y as recordIosSchemeApprovals } from "./config-CNmN-ndb.mjs";
5
+ import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-Ag4pbs0z.mjs";
6
+ import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-BCtQz48d.mjs";
7
+ import { o as workspaceLinks } from "./stim-desktop-DWGAfaud.mjs";
8
+ import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-TIQ1Wft-.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { Bn as readRemoteSimulatorArch, En as devClientUrl, In as launchIosApp, Jn as checkEasAuth, Jt as bundleEntryPoint, Ln as restartedAppNote, Mn as installIosApp, Nn as iosAppProcess, Tn as clearOtherUserApps, Vn as gateMetroOrigin, Xt as ensureMetroReachable, Zn as loadProjectProvider, Zt as ensureRemoteBootOwned, an as LAUNCH_UNVERIFIED, dn as readMetroRecords, en as remoteIosDeps, fn as unattributedLaunchLines, gn as verifyReleaseLaunch, hn as verifyLaunch, in as LAUNCH_FATAL, k as budgetGate, ln as isBundleProof, nr as resolveRemote, pn as unverifiedLaunchLines, r as checkDeviceCapacity, rn as LAUNCH_BUNDLING, rr as uploadRemote, sn as RELEASE_VERIFY_WAIT_MS, tn as resolveRemoteContext, tr as resolveEasCliBin, un as readCollectorRecords, xn as IOS_DEV_MENU_OFF_DEFAULTS_PLIST } from "./device-capacity-C0PiTyRb.mjs";
11
- import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-CY3KSdC0.mjs";
12
- import { E as readPodState, H as readBundleId, T as podsAreStale, U as resolveScheme, V as readBundleExecutable, c as iosToolchainAsync, k as runPodInstall } from "./toolchain-DRQyCvlp.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BQpJpAjA.mjs";
14
- import { E as storeBuild, M as untrackedNativeFiles, T as resolveBuild, g as fingerprintProject, l as evictBuild } from "./build-cache-_fkewiwH.mjs";
15
- import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-BdZdNsAj.mjs";
16
- import { C as clearIosAdoptionPending, G as lostLine, J as releaseLeaseOnAbort, K as lostRefusal, U as acquireRunLease, Y as runLease, i as deviceLabel, o as deviceShortName, t as appNameFromPath, z as DEBUG_VERIFY_STEP_MS } from "./support-DW575Dnx.mjs";
17
- import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-CWsBysyN.mjs";
18
- import { n as hostedMetroPortProbe } from "./hosted-native-C9xQYYFb.mjs";
19
- import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-B9WyCBKQ.mjs";
20
- import { n as verifyCollectorOwnership } from "./ownership-hC7xvvxF.mjs";
21
- import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-DsQmPdlg.mjs";
22
- import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-BTUcE926.mjs";
23
- import { c as startDevServer, g as detectBundleId } from "./start-DIFiT2P5.mjs";
10
+ import { Bn as readRemoteSimulatorArch, En as devClientUrl, In as launchIosApp, Jn as checkEasAuth, Jt as bundleEntryPoint, Ln as restartedAppNote, Mn as installIosApp, Nn as iosAppProcess, Tn as clearOtherUserApps, Vn as gateMetroOrigin, Xt as ensureMetroReachable, Zn as loadProjectProvider, Zt as ensureRemoteBootOwned, an as LAUNCH_UNVERIFIED, dn as readMetroRecords, en as remoteIosDeps, fn as unattributedLaunchLines, gn as verifyReleaseLaunch, hn as verifyLaunch, in as LAUNCH_FATAL, k as budgetGate, ln as isBundleProof, nr as resolveRemote, pn as unverifiedLaunchLines, r as checkDeviceCapacity, rn as LAUNCH_BUNDLING, rr as uploadRemote, sn as RELEASE_VERIFY_WAIT_MS, tn as resolveRemoteContext, tr as resolveEasCliBin, un as readCollectorRecords, xn as IOS_DEV_MENU_OFF_DEFAULTS_PLIST } from "./device-capacity-DWUOvY13.mjs";
11
+ import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-DCzDzydB.mjs";
12
+ import { E as readPodState, H as readBundleId, T as podsAreStale, U as resolveScheme, V as readBundleExecutable, c as iosToolchainAsync, k as runPodInstall } from "./toolchain-BeD7tbBW.mjs";
13
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-CdpXXSq2.mjs";
14
+ import { E as storeBuild, M as untrackedNativeFiles, T as resolveBuild, g as fingerprintProject, l as evictBuild } from "./build-cache-Dt-dhCJF.mjs";
15
+ import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData, w as resetIosKeychain } from "./ios-BveW7qK1.mjs";
16
+ import { C as clearIosAdoptionPending, G as lostLine, J as releaseLeaseOnAbort, K as lostRefusal, U as acquireRunLease, Y as runLease, i as deviceLabel, o as deviceShortName, t as appNameFromPath, z as DEBUG_VERIFY_STEP_MS } from "./support-CfYmOdQs.mjs";
17
+ import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-enWc5P6U.mjs";
18
+ import { n as hostedMetroPortProbe } from "./hosted-native-OBT2sJxn.mjs";
19
+ import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-CHtco460.mjs";
20
+ import { n as verifyCollectorOwnership } from "./ownership-CQTg6v1d.mjs";
21
+ import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-DW_29Bmu.mjs";
22
+ import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-dixAL2G8.mjs";
23
+ import { c as startDevServer, g as detectBundleId } from "./start-CzBB5R7N.mjs";
24
24
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
25
- import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-CCFNjjWU.mjs";
26
- import { a as resolveEasDevelopmentBuild } from "./eas-build-BxJdzQnF.mjs";
27
- import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-DMOnaH5n.mjs";
28
- import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-D6wlK-yX.mjs";
29
- import { t as followHostedLaunchLogs } from "./hosted-logs-sync-DfUJ2GpF.mjs";
30
- import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-BptrXmh_.mjs";
31
- import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-oDqT4UES.mjs";
32
- import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-DDApoVvd.mjs";
33
- import { t as automaticDevicePlacement } from "./auto-placement-CBdWa87P.mjs";
34
- import { t as checkEasFallback } from "./eas-fallback-DU2WDF8r.mjs";
35
- import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-p_cp8IzW.mjs";
36
- import { t as selectFromPool } from "./device-pool-nsMvt2X2.mjs";
37
- import { s as reportIosResult } from "./ios-project-PXBDoaii.mjs";
38
- import { i as swapJsBundle } from "./js-swap-07ikLRJJ.mjs";
25
+ import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-CRYQ1W42.mjs";
26
+ import { a as resolveEasDevelopmentBuild } from "./eas-build-CwOXKJwa.mjs";
27
+ import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-ByrDWSpC.mjs";
28
+ import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-CXTT3bYC.mjs";
29
+ import { t as followHostedLaunchLogs } from "./hosted-logs-sync-uWSrH2mf.mjs";
30
+ import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-BKkj3OyL.mjs";
31
+ import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-UxUBU8up.mjs";
32
+ import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-3SQzMRXZ.mjs";
33
+ import { t as automaticDevicePlacement } from "./auto-placement-CFKNrWLU.mjs";
34
+ import { t as checkEasFallback } from "./eas-fallback-Cnb12a50.mjs";
35
+ import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-BIg1iExg.mjs";
36
+ import { t as selectFromPool } from "./device-pool-B8IqZKqm.mjs";
37
+ import { s as reportIosResult } from "./ios-project-XHg87vyQ.mjs";
38
+ import { a as swapJsBundle } from "./js-swap-C6vl3vEd.mjs";
39
39
  import { mkdirSync, openSync, writeFileSync } from "node:fs";
40
40
  import { networkInterfaces } from "node:os";
41
41
  import { basename, join } from "node:path";
@@ -177,6 +177,10 @@ function missingCrashReportHint({ physical, remote, crashed }) {
177
177
  return crashed && !physical && !remote ? `No attributable native crash report captured yet. ${IOS_CRASH_REPORT_RETRY}` : "No attributable native crash report captured. Read `stim logs --source device` for available output.";
178
178
  }
179
179
  async function verifyIosProcessRun({ operation, root, slot, appPath, d, launched, configuration, phase, note, logsDir, launchedAt, bundleId, udid, physical, appName, remoteDevice, embeddedJavaScript }) {
180
+ if (remoteDevice) {
181
+ phase("verify", chalk.yellow("UNVERIFIED: remote adapter launch accepted; process verification is unavailable"));
182
+ return { state: LAUNCH_UNVERIFIED };
183
+ }
180
184
  const readNativeCrashes = () => remoteDevice ? [] : captureNativeCrashes({
181
185
  root,
182
186
  slot,
@@ -373,26 +377,58 @@ async function installsOverWifi(d, udid, selectedWireless, note) {
373
377
  if (wireless) note(phaseLine("device", `${current?.name ?? udid} is paired over Wi-Fi, so the install and launch go over the network and take longer than over a cable`));
374
378
  return wireless;
375
379
  }
376
- async function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }) {
380
+ async function cleanIosAppState({ d, device, udid, bundleId, devClient, adopting, cleanAppState, remote, runCommand, phase, note }) {
381
+ if (!adopting && (!cleanAppState || remote)) return null;
382
+ if (!adopting && !device.owned) return {
383
+ code: "STIM_BAD_ARG",
384
+ message: `cleanAppState clears only a simulator Stim owns, and ${deviceLabel(device, udid)} is not one.`,
385
+ remedy: "Run `stim gc --delete` to clear the assignment so Stim creates an owned simulator."
386
+ };
387
+ const failure = await sweepIosAppState({
388
+ d,
389
+ udid,
390
+ bundleId,
391
+ devClient,
392
+ resetKeychain: !adopting,
393
+ previous: adopting ? "the previous workspace" : "an earlier run",
394
+ phase,
395
+ note
396
+ });
397
+ if (!failure) return null;
398
+ return {
399
+ code: "STIM_INSTALL_FAILED",
400
+ message: adopting ? `${failure} Stim kept the adoption cleanup pending and did not install or launch the app.` : `${failure} Stim did not install or launch the app.`,
401
+ remedy: `Run \`${runCommand}\` again after simulator tooling is responsive.`
402
+ };
403
+ }
404
+ async function sweepIosAppState({ d, udid, bundleId, devClient, resetKeychain, previous, phase, note }) {
377
405
  const swept = await d.clearOtherUserApps({
378
406
  udid,
379
407
  keep: bundleId
380
408
  });
381
- if (swept.removed.length) phase("install", `removed ${swept.removed.join(", ")}, left by the previous workspace`);
409
+ if (swept.removed.length) phase("install", `removed ${swept.removed.join(", ")}, left by ${previous}`);
382
410
  if (swept.listed && swept.failed.length === 0) {
383
411
  if (swept.kept && bundleId) {
384
412
  try {
385
413
  await d.clearIosAppData(udid, bundleId, { defaultsPlist: devClient ? IOS_DEV_MENU_OFF_DEFAULTS_PLIST : null });
386
414
  } catch (error) {
387
- return `Could not clear the data ${bundleId} kept from the previous workspace: ${String(error?.message || error)}`;
415
+ return `Could not clear the data ${bundleId} kept from ${previous}: ${String(error?.message || error)}`;
416
+ }
417
+ phase("install", `cleared ${bundleId} data left by ${previous}`);
418
+ }
419
+ if (resetKeychain) {
420
+ try {
421
+ await d.resetIosKeychain(udid);
422
+ } catch (error) {
423
+ return `Could not reset the keychain on ${udid}: ${error instanceof Error ? error.message : String(error)}`;
388
424
  }
389
- phase("install", `cleared ${bundleId} data left by the previous workspace`);
425
+ phase("install", `reset the keychain on ${udid}`);
390
426
  }
391
427
  return null;
392
428
  }
393
- if (!swept.listed) return "Could not list apps left by the previous workspace.";
394
- for (const failure of swept.failed) note(chalk.yellow(phaseLine("install", `could not remove ${failure}, left by the previous workspace`)));
395
- return `Could not remove ${swept.failed.join(", ")}, left by the previous workspace.`;
429
+ if (!swept.listed) return `Could not list apps left by ${previous}.`;
430
+ for (const failure of swept.failed) note(chalk.yellow(phaseLine("install", `could not remove ${failure}, left by ${previous}`)));
431
+ return `Could not remove ${swept.failed.join(", ")}, left by ${previous}.`;
396
432
  }
397
433
  async function evictUnbindableCacheHit({ d, root, slot, udid, bundleId, appPath, launchedAt, logsDir, cacheHit, providerName, storeKey, runCommand, local, logFields, operation }) {
398
434
  if (!cacheHit || !storeKey || !bundleId || !local) return null;
@@ -450,7 +486,7 @@ function launchFailureRemedy(remoteDevice, udid, bundleId, logFile, reason) {
450
486
  if (reason && /system shell .*probably crashed/.test(reason)) return `SpringBoard, the simulator's system shell, is not running, and only a reboot brings it back. Run \`stim stop\`, then \`stim ios\` again. Repeated crashes leave SpringBoard reports in ~/Library/Logs/DiagnosticReports.`;
451
487
  return `If the simulator timed out, run \`stim doctor --platform ios\` and resolve any reported host memory pressure before retrying. Otherwise run \`xcrun simctl launch --terminate-running-process --console ${udid} ${bundleId}\` to see what the app reports, and check ${logFile}.`;
452
488
  }
453
- async function finishIosRun({ operation, output, projectBundleId, runtime, runtimePreparation, devicePlacement, artifact, d, root, slot, json, release, configuration, buildScheme, isExpo, metroCheck, metroPort, logsDir, logFile, device, udid, physical, wireless, lanAddress, lanOriginUrl, remoteDevice, bootPromise, bootDuration, bootPending, fail, phase, note, logWriter, elapsed, startedAt, closeWriter, lease, releaseLease, recordRun, reclaimed, devServer, enterPhase, enterActivity }) {
489
+ async function finishIosRun({ operation, output, projectBundleId, runtime, runtimePreparation, devicePlacement, artifact, d, root, slot, json, release, configuration, buildScheme, isExpo, metroCheck, metroPort, logsDir, logFile, device, udid, physical, wireless, lanAddress, lanOriginUrl, remoteDevice, cleanAppState, bootPromise, bootDuration, bootPending, fail, phase, note, logWriter, elapsed, startedAt, closeWriter, lease, releaseLease, recordRun, reclaimed, devServer, enterPhase, enterActivity }) {
454
490
  const { path: appPath, bundleId: initialBundleId, failureFields: buildFailure, cache } = artifact;
455
491
  const { hit: cacheHit, providerName, buildMachine, builtOn, offloadedTo, offloadFallback, readEnabled: useBuildCache, missReason, waitedForBuild, compilation: compilationCache } = cache;
456
492
  const storeHash = cache.identity?.fingerprint ?? null;
@@ -657,26 +693,27 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
657
693
  phase("launch", `${bundleId} pid ${launched.pid} ${launchTimer()}`);
658
694
  } else {
659
695
  const adopting = Boolean(device?.adoptionPending);
660
- if (adopting) {
661
- const cleanupFailure = await cleanAdoptedIosApps({
662
- d,
663
- udid,
664
- bundleId,
665
- devClient: Boolean(scheme),
666
- phase,
667
- note
668
- });
669
- if (cleanupFailure) return fail({
670
- code: "STIM_INSTALL_FAILED",
671
- message: `${cleanupFailure} Stim kept the adoption cleanup pending and did not install or launch the app.`,
672
- remedy: `Run \`${runCommand}\` again after simulator tooling is responsive.`,
673
- build: {
674
- ...buildFailure,
675
- appPath,
676
- bundleId
677
- }
678
- });
679
- }
696
+ const cleanupFailure = await cleanIosAppState({
697
+ d,
698
+ device,
699
+ udid,
700
+ bundleId,
701
+ devClient: Boolean(scheme),
702
+ adopting,
703
+ cleanAppState,
704
+ remote: Boolean(remoteDevice),
705
+ runCommand,
706
+ phase,
707
+ note
708
+ });
709
+ if (cleanupFailure) return fail({
710
+ ...cleanupFailure,
711
+ build: {
712
+ ...buildFailure,
713
+ appPath,
714
+ bundleId
715
+ }
716
+ });
680
717
  enterPhase("install");
681
718
  const installTimer = stepTimer(d.now);
682
719
  const installed = await d.installIosApp({
@@ -1104,6 +1141,7 @@ const DEFAULT_DEPS = {
1104
1141
  installIosApp,
1105
1142
  clearOtherUserApps,
1106
1143
  clearIosAppData,
1144
+ resetIosKeychain,
1107
1145
  clearIosAdoptionPending,
1108
1146
  launchIosApp,
1109
1147
  verifyLaunch,
@@ -1,5 +1,5 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { Bt as repoRoot } from "./settings-B5IBDfTx.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { Bt as repoRoot } from "./settings-Ag4pbs0z.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { existsSync } from "node:fs";
5
5
  import { dirname, join, relative } from "node:path";
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
2
  import { openSync } from "node:fs";
3
3
  //#region src/detached-entry.ts
4
4
  const LOG_FILE_FLAG = "--log-file";
@@ -1,5 +1,5 @@
1
- import { C as resolvePackageJson, b as isPackageResolvable } from "./project-Dqqj3IkW.mjs";
2
- import { $ as readBundleSchemes, Q as pickDevClientScheme } from "./toolchain-DRQyCvlp.mjs";
1
+ import { C as resolvePackageJson, b as isPackageResolvable } from "./project-BCtQz48d.mjs";
2
+ import { $ as readBundleSchemes, Q as pickDevClientScheme } from "./toolchain-BeD7tbBW.mjs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { isJsonObject, readJsonObject } from "@stim-cli/core/state";
5
5
  //#region src/commands/dev-client.ts
@@ -1,14 +1,14 @@
1
- import { ft as deviceSlotPlatforms } from "./config-BW0fAtoK.mjs";
2
- import { s as ownedDeviceLabel } from "./project-Dqqj3IkW.mjs";
3
- import { x as configureNewOwnedAvd } from "./android-Iq0M2t2d.mjs";
4
- import { c as pidExists } from "./metro-B5PVz0Wv.mjs";
5
- import { v as clearDeviceIdleShutdown } from "./device-capacity-C0PiTyRb.mjs";
6
- import { pt as teardownOwnedAvd } from "./workspaces-CY3KSdC0.mjs";
7
- import { h as tailLines } from "./activity-BQpJpAjA.mjs";
8
- import "./ios-BdZdNsAj.mjs";
9
- import { T as ensureOwnedIosDevice, w as ensureIosBooted } from "./support-DW575Dnx.mjs";
10
- import { t as reconcileSimSlim } from "./simslim-DKdJx0LL.mjs";
11
- import { n as ensureAndroidBooted, r as ensureOwnedAndroidDevice, t as ANDROID_BOOT_TIMEOUT_MS } from "./device-android-C-biM49_.mjs";
1
+ import { pt as deviceSlotPlatforms } from "./config-CNmN-ndb.mjs";
2
+ import { s as ownedDeviceLabel } from "./project-BCtQz48d.mjs";
3
+ import { x as configureNewOwnedAvd } from "./android-CGctfYpv.mjs";
4
+ import { c as pidExists } from "./metro-TIQ1Wft-.mjs";
5
+ import { v as clearDeviceIdleShutdown } from "./device-capacity-DWUOvY13.mjs";
6
+ import { pt as teardownOwnedAvd } from "./workspaces-DCzDzydB.mjs";
7
+ import { h as tailLines } from "./activity-CdpXXSq2.mjs";
8
+ import "./ios-BveW7qK1.mjs";
9
+ import { T as ensureOwnedIosDevice, w as ensureIosBooted } from "./support-CfYmOdQs.mjs";
10
+ import { t as reconcileSimSlim } from "./simslim-BMgpTRWe.mjs";
11
+ import { n as ensureAndroidBooted, r as ensureOwnedAndroidDevice, t as ANDROID_BOOT_TIMEOUT_MS } from "./device-android-CBat355q.mjs";
12
12
  import { existsSync } from "node:fs";
13
13
  import { dirname, join, resolve, sep } from "node:path";
14
14
  import { rotatedLogPath } from "@stim-cli/core";
@@ -1,16 +1,16 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { r as readWorkspaceState$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { r as clockTime } from "./command-output-CGxrQ3Bd.mjs";
4
- import { dt as deviceSlotKey, ft as deviceSlotPlatforms, ht as projectDeviceSlots, m as getProject, mt as parseDeviceSlotOption } from "./config-BW0fAtoK.mjs";
5
- import { I as readWorkspaceLaunches, P as readRemoteSession, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-Dqqj3IkW.mjs";
6
- import { $ as probeEmulatorSerial, A as getAvdNameForSerialAsync, E as emulatorProbeSession, P as listAdbDevicesAsync, Z as physicalDeviceModel, at as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, d as androidToolPath, it as resolveOwnedAvdSerialAsync, s as androidPoolCandidates, u as androidToolCwd } from "./android-Iq0M2t2d.mjs";
7
- import { Wn as runProcessOperation } from "./device-capacity-C0PiTyRb.mjs";
8
- import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-BQpJpAjA.mjs";
9
- import { D as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-BdZdNsAj.mjs";
10
- import { Z as waitForDevice, q as parseDeviceWait } from "./support-DW575Dnx.mjs";
11
- import { n as runProvision } from "./device-provision-BYYJuRKZ.mjs";
12
- import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-DMOnaH5n.mjs";
13
- import { t as selectFromPool } from "./device-pool-nsMvt2X2.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { r as readWorkspaceState$1 } from "./workspace-state-DOPXG2Gp.mjs";
3
+ import { r as clockTime } from "./command-output-ByEmIwur.mjs";
4
+ import { ft as deviceSlotKey, gt as projectDeviceSlots, ht as parseDeviceSlotOption, m as getProject, pt as deviceSlotPlatforms } from "./config-CNmN-ndb.mjs";
5
+ import { I as readWorkspaceLaunches, P as readRemoteSession, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-BCtQz48d.mjs";
6
+ import { $ as probeEmulatorSerial, A as getAvdNameForSerialAsync, E as emulatorProbeSession, P as listAdbDevicesAsync, Z as physicalDeviceModel, at as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, d as androidToolPath, it as resolveOwnedAvdSerialAsync, s as androidPoolCandidates, u as androidToolCwd } from "./android-CGctfYpv.mjs";
7
+ import { Wn as runProcessOperation } from "./device-capacity-DWUOvY13.mjs";
8
+ import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-CdpXXSq2.mjs";
9
+ import { D as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-BveW7qK1.mjs";
10
+ import { Z as waitForDevice, q as parseDeviceWait } from "./support-CfYmOdQs.mjs";
11
+ import { n as runProvision } from "./device-provision-DWAoSKEw.mjs";
12
+ import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-ByrDWSpC.mjs";
13
+ import { t as selectFromPool } from "./device-pool-B8IqZKqm.mjs";
14
14
  import { hostedNativeRecords } from "@stim-cli/core/state";
15
15
  import chalk from "chalk";
16
16
  //#region src/commands/device-tools.ts
@@ -1,12 +1,12 @@
1
- import { D as ownership_claim_exports, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { l as phaseLine } from "./command-output-CGxrQ3Bd.mjs";
3
- import { M as acquireAvdClaim, O as withConfigLock, T as setDevice, a as clearDevice, ft as deviceSlotPlatforms, ht as projectDeviceSlots, i as clearAndroidBootPending, k as withConfigLockAsync, t as allConsolePortsAndSerials, v as loadConfig, x as releaseAndroidConsolePort } from "./config-BW0fAtoK.mjs";
4
- import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-B5IBDfTx.mjs";
5
- import { A as getAvdNameForSerialAsync, G as ownedAvdName, H as ownedAvdDeviceProfile, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, V as nextConsolePort, W as ownedAvdMatchesConfiguration, _ as avdPoolConfiguration, b as bootAndroidEmulator, bt as parkedMaxSetting, ht as adoptParked, it as resolveOwnedAvdSerialAsync, n as OWNED_AVD_CONFIG_DEFAULTS, p as assertOwnedAvdStoppedAsync, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, vt as isLegacyDeletionClaim, xt as readParked, z as listInstalledSystemImages } from "./android-Iq0M2t2d.mjs";
6
- import { c as pidExists } from "./metro-B5PVz0Wv.mjs";
7
- import { _ as withDeviceBootAdmission, n as DeviceAdmissionRefusal, s as countLiveOwnedDevicesFrom } from "./device-capacity-C0PiTyRb.mjs";
8
- import { gt as teardownParkedAvd, pt as teardownOwnedAvd } from "./workspaces-CY3KSdC0.mjs";
9
- import { B as reportMemoryCulprits, L as memoryCulpritsUnderAsync, R as readHostMemoryPressure, V as memoryCulpritAdvice, f as listAllIosSimsAsync } from "./ios-BdZdNsAj.mjs";
1
+ import { D as ownership_claim_exports, t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { l as phaseLine } from "./command-output-ByEmIwur.mjs";
3
+ import { A as withConfigLockAsync, N as acquireAvdClaim, T as setDevice, a as clearDevice, gt as projectDeviceSlots, i as clearAndroidBootPending, k as withConfigLock, pt as deviceSlotPlatforms, t as allConsolePortsAndSerials, v as loadConfig, x as releaseAndroidConsolePort } from "./config-CNmN-ndb.mjs";
4
+ import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-Ag4pbs0z.mjs";
5
+ import { A as getAvdNameForSerialAsync, G as ownedAvdName, H as ownedAvdDeviceProfile, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, V as nextConsolePort, W as ownedAvdMatchesConfiguration, _ as avdPoolConfiguration, b as bootAndroidEmulator, bt as parkedMaxSetting, ht as adoptParked, it as resolveOwnedAvdSerialAsync, n as OWNED_AVD_CONFIG_DEFAULTS, p as assertOwnedAvdStoppedAsync, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, vt as isLegacyDeletionClaim, xt as readParked, z as listInstalledSystemImages } from "./android-CGctfYpv.mjs";
6
+ import { c as pidExists } from "./metro-TIQ1Wft-.mjs";
7
+ import { _ as withDeviceBootAdmission, n as DeviceAdmissionRefusal, s as countLiveOwnedDevicesFrom } from "./device-capacity-DWUOvY13.mjs";
8
+ import { gt as teardownParkedAvd, pt as teardownOwnedAvd } from "./workspaces-DCzDzydB.mjs";
9
+ import { B as reportMemoryCulprits, L as memoryCulpritsUnderAsync, R as readHostMemoryPressure, V as memoryCulpritAdvice, f as listAllIosSimsAsync } from "./ios-BveW7qK1.mjs";
10
10
  import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import { existsSync } from "node:fs";
@@ -1,25 +1,25 @@
1
- import { C as operationState, D as ownership_claim_exports, E as debugLog, S as isTermination, T as process_identity_exports, d as throwIfCancelled, f as WorkspaceProcessCleanupError, l as cancellableSleep, m as workspaceProcessLockError, n as isTimeoutError, p as withWorkspaceProcessLock, t as getExecutor, u as cancelledError } from "./exec-CGuDzt40.mjs";
2
- import { D as workspaceId$1, E as workspaceDir, M as withDirLock$1, b as sharedCcache$1, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, s as updateWorkspaceStateAsync, t as clearWorkspaceStateKey, y as sharedBuildCache } from "./workspace-state-BdZ-QgmB.mjs";
1
+ import { C as operationState, D as ownership_claim_exports, E as debugLog, S as isTermination, T as process_identity_exports, d as throwIfCancelled, f as WorkspaceProcessCleanupError, l as cancellableSleep, m as workspaceProcessLockError, n as isTimeoutError, p as withWorkspaceProcessLock, t as getExecutor, u as cancelledError } from "./exec-L37dbiIb.mjs";
2
+ import { D as workspaceId$1, E as workspaceDir, M as withDirLock$1, b as sharedCcache$1, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, s as updateWorkspaceStateAsync, t as clearWorkspaceStateKey, y as sharedBuildCache } from "./workspace-state-DOPXG2Gp.mjs";
3
3
  import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
4
- import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-CGxrQ3Bd.mjs";
5
- import { a as clearDevice, at as isOnMountedVolume, ct as volumeRootFor, d as getConfigDir, dt as deviceSlotKey, ft as deviceSlotPlatforms, ht as projectDeviceSlots, k as withConfigLockAsync$1, m as getProject, nt as directorySizeAsync, o as clearSupervisor, p as getPlatformDeviceLimits, rt as formatBytes, st as measuredDirectorySizeAsync, tt as directorySize, u as getConcurrencyLimits, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
6
- import { a as killOnAbort, n as runOperationFileQuiet, r as childEnvironment, t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
7
- import { Z as resolveProjectSettingsAsync, d as androidLayoutSetting, ft as planMetroReach, g as deviceReclaimIdleMinutesSetting, m as defaultAndroidLayout } from "./settings-B5IBDfTx.mjs";
8
- import { C as resolvePackageJson, M as readMetroTunnel, N as readPidFile, P as readRemoteSession, i as findProjectRoot$1, j as clearWorkspaceSupervisor, k as clearRemoteSession, s as ownedDeviceLabel, v as detectIsExpo } from "./project-Dqqj3IkW.mjs";
9
- import { N as listAdbDevices, P as listAdbDevicesAsync, R as listAvdsAsync, U as ownedAvdDirectory, X as parseAvdSystemImage, Y as parseAvdDeviceProfile, d as androidToolPath, ft as isStimOwnedAvd, gt as dropParked, m as avdIniPaths, o as androidHome, pt as isStimOwnedSim, q as ownedAvdSerialResolverAsync, xt as readParked, y as avdStorageRoots, z as listInstalledSystemImages } from "./android-Iq0M2t2d.mjs";
10
- import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-B5PVz0Wv.mjs";
4
+ import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-ByEmIwur.mjs";
5
+ import { A as withConfigLockAsync$1, a as clearDevice, ct as measuredDirectorySizeAsync, d as getConfigDir, ft as deviceSlotKey, gt as projectDeviceSlots, it as formatBytes, lt as volumeRootFor, m as getProject, nt as directorySize, o as clearSupervisor, ot as isOnMountedVolume, p as getPlatformDeviceLimits, pt as deviceSlotPlatforms, rt as directorySizeAsync, u as getConcurrencyLimits, v as loadConfig$1 } from "./config-CNmN-ndb.mjs";
6
+ import { a as killOnAbort, n as runOperationFileQuiet, r as childEnvironment, t as runOperationFile } from "./operation-exec-DNynwpqO.mjs";
7
+ import { Z as resolveProjectSettingsAsync, d as androidLayoutSetting, ft as planMetroReach, g as deviceReclaimIdleMinutesSetting, m as defaultAndroidLayout } from "./settings-Ag4pbs0z.mjs";
8
+ import { C as resolvePackageJson, M as readMetroTunnel, N as readPidFile, P as readRemoteSession, i as findProjectRoot$1, j as clearWorkspaceSupervisor, k as clearRemoteSession, s as ownedDeviceLabel, v as detectIsExpo } from "./project-BCtQz48d.mjs";
9
+ import { N as listAdbDevices, P as listAdbDevicesAsync, R as listAvdsAsync, U as ownedAvdDirectory, X as parseAvdSystemImage, Y as parseAvdDeviceProfile, d as androidToolPath, ft as isStimOwnedAvd, gt as dropParked, m as avdIniPaths, o as androidHome, pt as isStimOwnedSim, q as ownedAvdSerialResolverAsync, xt as readParked, y as avdStorageRoots, z as listInstalledSystemImages } from "./android-CGctfYpv.mjs";
10
+ import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-TIQ1Wft-.mjs";
11
11
  import { c as readNdjsonGenerations$1, i as createNdjsonWriter, r as createNdjsonTail } from "./ndjson-CrjIsGzw.mjs";
12
- import { T as formatSpace, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as environmentState, y as capacity } from "./eas-session-ledger-DCUfh6m7.mjs";
13
- import { i as registeredCaches, r as register } from "./cache-manifest-8JX9S1QJ.mjs";
14
- import { At as mapLimited, B as workspaceBuildInProgress, Dt as createGcResults, Et as GC_OUTPUT, F as collectOwnedDeviceActivityAsync, L as idleShutdownCandidates, Mt as sizeConcurrency, N as collectIdleDevicesAsync, P as collectOwnedDeviceActivity, _t as teardownParkedIosSim, bt as measureDu, dt as eraseParkedIosSim, gt as teardownParkedAvd, ht as teardownOwnedIosSim, i as clearWorkspaceOutputs, l as keptByLock, o as collectWorkspaceOutputs, ot as recordCapacityRefusal, pt as teardownOwnedAvd, st as recordCapacityWait, ut as eraseParkedAvd, v as withIdleWorkspace, vt as probePublicHttp, wt as listBuildSlots, x as resolveSupervisorTarget, xt as writeUsageCache, yt as canonical$1, z as shutDownIdleDevices$1 } from "./workspaces-CY3KSdC0.mjs";
12
+ import { T as formatSpace, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as environmentState, y as capacity } from "./eas-session-ledger-TE1miVz5.mjs";
13
+ import { i as registeredCaches, r as register } from "./cache-manifest-BO0TIcPV.mjs";
14
+ import { At as mapLimited, B as workspaceBuildInProgress, Dt as createGcResults, Et as GC_OUTPUT, F as collectOwnedDeviceActivityAsync, L as idleShutdownCandidates, Mt as sizeConcurrency, N as collectIdleDevicesAsync, P as collectOwnedDeviceActivity, _t as teardownParkedIosSim, bt as measureDu, dt as eraseParkedIosSim, gt as teardownParkedAvd, ht as teardownOwnedIosSim, i as clearWorkspaceOutputs, l as keptByLock, o as collectWorkspaceOutputs, ot as recordCapacityRefusal, pt as teardownOwnedAvd, st as recordCapacityWait, ut as eraseParkedAvd, v as withIdleWorkspace, vt as probePublicHttp, wt as listBuildSlots, x as resolveSupervisorTarget, xt as writeUsageCache, yt as canonical$1, z as shutDownIdleDevices$1 } from "./workspaces-DCzDzydB.mjs";
15
15
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
16
- import { $ as readBundleSchemes, Z as approvableSchemes, _t as runCancellationSignal, bt as claimForEmptying, mt as nativeRunWaitNotice } from "./toolchain-DRQyCvlp.mjs";
17
- import { N as listBuildLocks, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, g as workspaceActivity, o as envDir, p as readHostProcessTableAsync, x as listLeaseFiles } from "./activity-BQpJpAjA.mjs";
18
- import { u as expoConfigContents } from "./build-cache-_fkewiwH.mjs";
19
- import { G as deviceHoldsBundle, O as sanitizeDeviceLabel, W as deviceHoldsApk, b as parseSimctlList, d as listAllIosSims, f as listAllIosSimsAsync, g as listUserApps, j as uninstallIosApp, l as iosRuntimeMatches, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, y as parseRuntimeVersion } from "./ios-BdZdNsAj.mjs";
16
+ import { $ as readBundleSchemes, Z as approvableSchemes, _t as runCancellationSignal, bt as claimForEmptying, mt as nativeRunWaitNotice } from "./toolchain-BeD7tbBW.mjs";
17
+ import { N as listBuildLocks, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, g as workspaceActivity, o as envDir, p as readHostProcessTableAsync, x as listLeaseFiles } from "./activity-CdpXXSq2.mjs";
18
+ import { u as expoConfigContents } from "./build-cache-Dt-dhCJF.mjs";
19
+ import { G as deviceHoldsBundle, O as sanitizeDeviceLabel, W as deviceHoldsApk, b as parseSimctlList, d as listAllIosSims, f as listAllIosSimsAsync, g as listUserApps, j as uninstallIosApp, l as iosRuntimeMatches, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, y as parseRuntimeVersion } from "./ios-BveW7qK1.mjs";
20
20
  import { n as supervisorError } from "./errors-DHm_U5gv.mjs";
21
- import { c as findBinUpward, n as expoBinFromPackage, r as expoBinPath, s as expoTelemetryEnv } from "./server-expo-CjQwxvIi.mjs";
22
- import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-DLdEDWJj.mjs";
21
+ import { c as findBinUpward, n as expoBinFromPackage, r as expoBinPath, s as expoTelemetryEnv } from "./server-expo-ZS9_WaNG.mjs";
22
+ import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-ygijU78G.mjs";
23
23
  import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
24
24
  import { createRequire } from "node:module";
25
25
  import { createHash, randomUUID } from "node:crypto";
@@ -2884,7 +2884,7 @@ async function clearOtherUserApps({ udid, keep }, { list = listUserApps, uninsta
2884
2884
  };
2885
2885
  }
2886
2886
  for (const bundleId of installed) {
2887
- if (bundleId === keep) continue;
2887
+ if (bundleId === keep || bundleId.endsWith(".xctrunner")) continue;
2888
2888
  try {
2889
2889
  await uninstall(udid, bundleId);
2890
2890
  removed.push(bundleId);
@@ -1,21 +1,21 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { _ as ensureWorkspaceStorage, d as writeWorkspaceState } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { c as ensureConfig, k as withConfigLockAsync$1, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
4
- import { i as macosProcess, o as requiredMacosRecord } from "./state-DSOUqO-o.mjs";
5
- import { A as getAvdNameForSerialAsync, F as listAvdDeviceProfiles, G as ownedAvdName, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, Tt as forgetCreatedDeviceAsync, a as androidDeviceAbi, b as bootAndroidEmulator, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, it as resolveOwnedAvdSerialAsync, j as hostSystemImageArch, rt as resetAdoptedAvd, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, y as avdStorageRoots, z as listInstalledSystemImages } from "./android-Iq0M2t2d.mjs";
6
- import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-B2DSKg-A.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { _ as ensureWorkspaceStorage, d as writeWorkspaceState } from "./workspace-state-DOPXG2Gp.mjs";
3
+ import { A as withConfigLockAsync$1, c as ensureConfig, v as loadConfig$1 } from "./config-CNmN-ndb.mjs";
4
+ import { i as macosProcess, o as requiredMacosRecord } from "./state-DsrFh3yv.mjs";
5
+ import { A as getAvdNameForSerialAsync, F as listAvdDeviceProfiles, G as ownedAvdName, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, Tt as forgetCreatedDeviceAsync, a as androidDeviceAbi, b as bootAndroidEmulator, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, it as resolveOwnedAvdSerialAsync, j as hostSystemImageArch, rt as resetAdoptedAvd, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, y as avdStorageRoots, z as listInstalledSystemImages } from "./android-CGctfYpv.mjs";
6
+ import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-BPBARZMR.mjs";
7
7
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
8
- import { An as installAndroidApp, Fn as launchAndroidReleaseApp, In as launchIosApp, Mn as installIosApp, Nn as iosAppProcess, Pn as launchAndroidApp, Rn as reverseMetroPorts, Sn as androidAppProcess, o as countLiveOwnedDevicesByPlatform, zn as writeDebugHttpHost } from "./device-capacity-C0PiTyRb.mjs";
9
- import { ht as teardownOwnedIosSim, pt as teardownOwnedAvd } from "./workspaces-CY3KSdC0.mjs";
10
- import { E as resolveIosCreation, R as readHostMemoryPressure, T as resetIosPrivacy, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, j as uninstallIosApp, n as bootIosSim, w as resetIosKeychain } from "./ios-BdZdNsAj.mjs";
11
- import { E as muteBootedSimulator } from "./support-DW575Dnx.mjs";
12
- import { i as stopMacosAppHeld, n as stopHostedBundleInstances } from "./stop-CcZISot5.mjs";
8
+ import { An as installAndroidApp, Fn as launchAndroidReleaseApp, In as launchIosApp, Mn as installIosApp, Nn as iosAppProcess, Pn as launchAndroidApp, Rn as reverseMetroPorts, Sn as androidAppProcess, o as countLiveOwnedDevicesByPlatform, zn as writeDebugHttpHost } from "./device-capacity-DWUOvY13.mjs";
9
+ import { ht as teardownOwnedIosSim, pt as teardownOwnedAvd } from "./workspaces-DCzDzydB.mjs";
10
+ import { E as resolveIosCreation, R as readHostMemoryPressure, T as resetIosPrivacy, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, j as uninstallIosApp, n as bootIosSim, w as resetIosKeychain } from "./ios-BveW7qK1.mjs";
11
+ import { E as muteBootedSimulator } from "./support-CfYmOdQs.mjs";
12
+ import { i as stopMacosAppHeld, n as stopHostedBundleInstances } from "./stop-CbxsTKyZ.mjs";
13
13
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
14
- import { a as systemImageInstallProblem, n as decideSystemImage, r as ensureSystemImage, t as androidImageInstallPolicy } from "./android-image-DFk26aY6.mjs";
15
- import { _ as findAapt } from "./support-CNqJDBrH.mjs";
16
- import { i as muteBootedEmulator } from "./device-android-C-biM49_.mjs";
17
- import { t as waitForMacosRegistration } from "./registration-DKjJGQ6p.mjs";
18
- import { n as parseLogStreamLine } from "./ios-Qam0bT9n.mjs";
14
+ import { a as systemImageInstallProblem, n as decideSystemImage, r as ensureSystemImage, t as androidImageInstallPolicy } from "./android-image-DY8KxK2m.mjs";
15
+ import { _ as findAapt } from "./support-JZ4KRW0C.mjs";
16
+ import { i as muteBootedEmulator } from "./device-android-CBat355q.mjs";
17
+ import { t as waitForMacosRegistration } from "./registration-C-3PDR3X.mjs";
18
+ import { n as parseLogStreamLine } from "./ios-2Qr4_Zu2.mjs";
19
19
  import { createHash, randomUUID } from "node:crypto";
20
20
  import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
21
21
  import { availableParallelism, freemem, homedir, loadavg } from "node:os";