stim 1.32.0 → 1.33.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 (169) hide show
  1. package/dist/{acquire-artifact-CI9fIokp.mjs → acquire-artifact-DTh_LxrE.mjs} +2 -2
  2. package/dist/{act-BfChMxcU.mjs → act-Cur4YKtK.mjs} +22 -22
  3. package/dist/{activity-yjH7Q3zn.mjs → activity-C8kBq9w0.mjs} +6 -6
  4. package/dist/{agent-device-usage-output-DO412bsG.mjs → agent-device-usage-output-BTRaK_up.mjs} +5 -5
  5. package/dist/{android-BeeC15Ve.mjs → android-B2DSKg-A.mjs} +2 -2
  6. package/dist/{android-BNm5A40S.mjs → android-BL-QqHjc.mjs} +87 -53
  7. package/dist/{android-D56S_GX3.mjs → android-D5mCdVl2.mjs} +5 -5
  8. package/dist/{android-DsEj2CCs.mjs → android-Iq0M2t2d.mjs} +27 -15
  9. package/dist/{android-cas-CbumHXIq.mjs → android-cas-Dhcjkys1.mjs} +4 -4
  10. package/dist/android-cas-compiler.mjs +1 -1
  11. package/dist/android-image-DFk26aY6.mjs +254 -0
  12. package/dist/{android-project-CCEQyYJK.d.mts → android-project-BDlPnfmL.d.mts} +1 -1
  13. package/dist/api.d.mts +2 -1
  14. package/dist/api.mjs +28 -28
  15. package/dist/{apk-signed-tail-B9Usseps.mjs → apk-signed-tail-CPpA-3vu.mjs} +2 -2
  16. package/dist/{artifact-C8Nvp07y.mjs → artifact-BMjubIP2.mjs} +13 -13
  17. package/dist/{artifact-k1x9Jrn0.mjs → artifact-BufzdGbT.mjs} +34 -21
  18. package/dist/{artifact-platform-BO2Uvk_A.mjs → artifact-platform-DqCWUieN.mjs} +1 -1
  19. package/dist/{auto-placement--nfdQ9rp.mjs → auto-placement-D7P98glJ.mjs} +11 -9
  20. package/dist/{browser-web-6RDAeH0z.mjs → browser-web-C74et-Nv.mjs} +15 -15
  21. package/dist/{build-VXX_dtl5.mjs → build-DFBGWOTc.mjs} +23 -23
  22. package/dist/{build-cache-BsKim4V7.mjs → build-cache-Cqj4FGnX.mjs} +20 -8
  23. package/dist/{build-plan-BK34X2iY.mjs → build-plan-T3Hi24ax.mjs} +7 -7
  24. package/dist/{cache-manifest-CfiEny4T.mjs → cache-manifest-8JX9S1QJ.mjs} +1 -1
  25. package/dist/cache-manifest.mjs +1 -1
  26. package/dist/{ccache-BrwGIxmV.mjs → ccache-BXtzEL6M.mjs} +34 -24
  27. package/dist/{cdp-C3svvXiE.mjs → cdp-C216kOAn.mjs} +1 -1
  28. package/dist/{chrome-DyDWurWG.mjs → chrome-C8sC5tdl.mjs} +1 -1
  29. package/dist/{cli-Jc7obreB.mjs → cli-B2YSjc9s.mjs} +20 -20
  30. package/dist/cli.mjs +1 -1
  31. package/dist/{client-lDmA-5jx.mjs → client-0_Mnfz0a.mjs} +29 -9
  32. package/dist/collector-run.mjs +7 -7
  33. package/dist/{command-output-CfPW1bKP.mjs → command-output-DWI9tGPU.mjs} +1 -1
  34. package/dist/{config-D5qNWJEP.mjs → config-BW0fAtoK.mjs} +256 -246
  35. package/dist/{dependencies-DkZ8681S.mjs → dependencies-CgvBZbXD.mjs} +39 -39
  36. package/dist/{dependency-state-DZVln1P9.mjs → dependency-state-mL5g4H6K.mjs} +2 -2
  37. package/dist/{detached-entry-BPlSaCwC.mjs → detached-entry-tfrgGVWb.mjs} +1 -1
  38. package/dist/{dev-client-eDZy6RoX.mjs → dev-client-ChsHwgrn.mjs} +2 -2
  39. package/dist/{device-CeIikWac.mjs → device-B0htCt2u.mjs} +13 -13
  40. package/dist/{device-CTozKhU0.mjs → device-DOehZpyx.mjs} +11 -11
  41. package/dist/{device-android-zgD9We85.mjs → device-android-B8TQP5AX.mjs} +10 -10
  42. package/dist/{device-capacity-Bki6B-7h.mjs → device-capacity-BAkETfIl.mjs} +9 -9
  43. package/dist/device-host-worker.mjs +58 -17
  44. package/dist/{device-ios-TE5ejeXx.mjs → device-ios-DFaYFdar.mjs} +9 -9
  45. package/dist/{device-lease-run-DeNGjJZM.mjs → device-lease-run-DpiCnRbZ.mjs} +5 -5
  46. package/dist/{device-pool-mjyUYaau.mjs → device-pool-DP4sCeCC.mjs} +3 -3
  47. package/dist/{device-provision-j_B7G0e6.mjs → device-provision-CnNOIxCF.mjs} +10 -10
  48. package/dist/{doctor-sSLtn-j1.mjs → doctor-9GrW5YSP.mjs} +30 -17
  49. package/dist/{doctor-CNZuvTSe.mjs → doctor-C6Xn96RS.mjs} +1 -1
  50. package/dist/{doctor-fingerprint-o7ZI9YLn.mjs → doctor-fingerprint-DqWvIhMb.mjs} +1 -1
  51. package/dist/doctor-fingerprint.mjs +1 -1
  52. package/dist/{doctor-BlrcoQ7B.mjs → doctor-nRLBoajo.mjs} +54 -25
  53. package/dist/{doctor-watchman-CCuboyj1.mjs → doctor-watchman-CDhpC3Oh.mjs} +5 -5
  54. package/dist/{eas-build-CaG-Sfs9.mjs → eas-build-CpJ4h9tG.mjs} +4 -4
  55. package/dist/{eas-fallback-BpX1lpco.mjs → eas-fallback-B3z5nL1g.mjs} +6 -6
  56. package/dist/{eas-session-ledger-B-nTfdfk.mjs → eas-session-ledger-Bspy-VJQ.mjs} +6 -6
  57. package/dist/{error-diagnostics-q56Im4D8.mjs → error-diagnostics-DoLGklYX.mjs} +10 -10
  58. package/dist/{exec-aULwtNly.mjs → exec-CGuDzt40.mjs} +103 -103
  59. package/dist/{gc-By2Kc-Ek.mjs → gc-BWoOp9q7.mjs} +2 -2
  60. package/dist/{gc-Dv6nb9nf.mjs → gc-DolXpMSB.mjs} +25 -54
  61. package/dist/{guide-CwpsGWTJ.mjs → guide-CmZB0GtP.mjs} +139 -44
  62. package/dist/{hosted-android-c5nPJA6S.mjs → hosted-android-ByG-ICuh.mjs} +4 -4
  63. package/dist/{hosted-client-Hs-fD4L3.mjs → hosted-client-D19Lv0tg.mjs} +6 -5
  64. package/dist/{hosted-logs-BteXG8rm.mjs → hosted-logs-D7anR6Dk.mjs} +7 -7
  65. package/dist/{hosted-logs-sync-B8bjLEMs.mjs → hosted-logs-sync-D182b1eJ.mjs} +5 -5
  66. package/dist/{hosted-macos-B4byscei.mjs → hosted-macos-D0DDQxvl.mjs} +6 -6
  67. package/dist/{hosted-native-Bh9IJ_t5.mjs → hosted-native-BzXIy97W.mjs} +14 -10
  68. package/dist/{idle-shutdown-BaeCo4ps.mjs → idle-shutdown-6i8CHoNq.mjs} +6 -6
  69. package/dist/{ios-D1XKSITX.mjs → ios-AdhPKXO3.mjs} +8 -8
  70. package/dist/{ios-CdAV4-1E.mjs → ios-BdZdNsAj.mjs} +6 -6
  71. package/dist/{ios-CsRVik64.mjs → ios-Qam0bT9n.mjs} +1 -1
  72. package/dist/{ios-D3oK9-O4.mjs → ios-dbXzjTxx.mjs} +28 -28
  73. package/dist/{ios-device-CiBA-er9.mjs → ios-device-DLdEDWJj.mjs} +1 -1
  74. package/dist/{ios-device-D7Gi3e1I.mjs → ios-device-DXbHZfFe.mjs} +3 -3
  75. package/dist/{ios-project-DDQlX_jX.mjs → ios-project-BzfLigfh.mjs} +7 -7
  76. package/dist/{ios-signing-BJzvDPfU.mjs → ios-signing-D-tSX1iF.mjs} +2 -2
  77. package/dist/{ios-state-BEIJRJ7P.mjs → ios-state-CWsBysyN.mjs} +1 -1
  78. package/dist/{js-swap-C8N5DXHl.mjs → js-swap-EDVOJmqx.mjs} +6 -6
  79. package/dist/{launch-DxpvL6il.mjs → launch-CKHpthsw.mjs} +20 -20
  80. package/dist/{lightened-Df6II_XI.mjs → lightened-Cv4ToJRX.mjs} +5 -5
  81. package/dist/{logs-zv3ge7c6.mjs → logs-DCQ3_tGS.mjs} +6 -6
  82. package/dist/{logs-CuWJWF88.mjs → logs-IagR9dWI.mjs} +7 -7
  83. package/dist/{macos-C6U-4Iip.mjs → macos-Ch7vuM-G.mjs} +22 -22
  84. package/dist/{macos-CbRZheLw.mjs → macos-pc0aVVbN.mjs} +1 -1
  85. package/dist/macos-run.mjs +1 -1
  86. package/dist/maintenance-run.mjs +6 -6
  87. package/dist/{metro-mKHEMO-a.mjs → metro-B5PVz0Wv.mjs} +4 -4
  88. package/dist/{metro-request-DODHNXCN.mjs → metro-request-2LmFpC1z.mjs} +2 -2
  89. package/dist/{named-ports-B0hCk2v-.mjs → named-ports-CA0nB9Yw.mjs} +3 -3
  90. package/dist/{native-android-9dVFqvTT.mjs → native-android-B3CEDq4R.mjs} +29 -19
  91. package/dist/{native-gradle-artifact-inputs-BlY97pt8.mjs → native-gradle-artifact-inputs-BLnO2hHR.mjs} +5 -5
  92. package/dist/{native-runtime-DQfxW5Au.mjs → native-runtime-e1OU8gEN.mjs} +6 -6
  93. package/dist/{native-source-D1AzWiuP.mjs → native-source-ChAGj7R1.mjs} +1 -1
  94. package/dist/{native-xcode-inputs-tDuUvSU8.mjs → native-xcode-inputs-DL3ETb8s.mjs} +3 -3
  95. package/dist/{native-xcode-ios-CG-PD-7g.mjs → native-xcode-ios-D4e8k2Jy.mjs} +17 -17
  96. package/dist/offload-worker.d.mts +3 -1
  97. package/dist/offload-worker.mjs +37 -23
  98. package/dist/{operation-exec-Dp4FuIGR.mjs → operation-exec-DKlBcKAL.mjs} +1 -1
  99. package/dist/{ownership-CCfiBfOP.mjs → ownership-hC7xvvxF.mjs} +3 -3
  100. package/dist/{page-CQJlcj3x.mjs → page-Dj8IqvGM.mjs} +2 -2
  101. package/dist/{phone-reverses-CnNwdz9A.mjs → phone-reverses-rvyxW1Fl.mjs} +4 -4
  102. package/dist/{placement-log-CRL0IY-k.mjs → placement-log-nnGnu8mo.mjs} +1 -1
  103. package/dist/{plan-placement-2imvnlWP.mjs → plan-placement-D3JD-T-K.mjs} +6 -6
  104. package/dist/{ports-CKktj5lV.mjs → ports-CZJJfJ8Q.mjs} +3 -3
  105. package/dist/{prebuild-CyNrUWgV.mjs → prebuild-Bhs7TTcz.mjs} +12 -12
  106. package/dist/{project-Crtcbfl0.mjs → project-DWEXiBA9.mjs} +16 -16
  107. package/dist/{pull-request-BzLmzAIQ.mjs → pull-request-BpMTNkMB.mjs} +2 -2
  108. package/dist/pull-requests.mjs +1 -1
  109. package/dist/{react-native-android-Cabe2YER.mjs → react-native-android-C6Y270GS.mjs} +37 -33
  110. package/dist/{react-native-build-DhWBUV_H.mjs → react-native-build-DaPfzf_e.mjs} +10 -10
  111. package/dist/{react-native-doctor-D-twmBon.mjs → react-native-doctor-DGMPxkPS.mjs} +6 -6
  112. package/dist/{react-native-ios-u_ley41B.mjs → react-native-ios-dX48_92n.mjs} +21 -17
  113. package/dist/{recordings-BWnIlhZH.mjs → recordings-AKZfsW2W.mjs} +1 -1
  114. package/dist/{registration-BwCe64PH.mjs → registration-DKjJGQ6p.mjs} +1 -1
  115. package/dist/{reload-f9hvEHE9.mjs → reload-BGwblBJ9.mjs} +1 -1
  116. package/dist/{reload-D2TpUlns.mjs → reload-DsOByDfy.mjs} +17 -17
  117. package/dist/{remote-BsBAjlD2.mjs → remote-D0uJZ76R.mjs} +9 -9
  118. package/dist/{result-EOsWV6sp.mjs → result-DuimMZKJ.mjs} +24 -20
  119. package/dist/{run-2CHAJ9Oj.mjs → run-N-BbRxnC.mjs} +2 -2
  120. package/dist/{selection-C4ZQz_ER.mjs → selection-xS50Mt0V.mjs} +5 -4
  121. package/dist/{server-bare-CFyVFZXJ.mjs → server-bare-BTlICuaX.mjs} +2 -2
  122. package/dist/{server-command-BMyKtnjH.mjs → server-command-BC0EgMfY.mjs} +5 -5
  123. package/dist/{server-expo-BLxcN2x2.mjs → server-expo-15RjL0ir.mjs} +3 -3
  124. package/dist/server-expo-gYIypb0-.mjs +2 -0
  125. package/dist/{settings-C6UTYW2K.mjs → settings-B5IBDfTx.mjs} +4 -4
  126. package/dist/{settings-jeS0WmUF.mjs → settings-CuP55ieT.mjs} +2 -2
  127. package/dist/{settings-payload-CrX933Xi.mjs → settings-payload-BIGGQ3or.mjs} +5 -5
  128. package/dist/{settings-write-DMcT23Kl.mjs → settings-write-D85j8mej.mjs} +6 -6
  129. package/dist/settings.schema.json +38 -0
  130. package/dist/{simslim-93xmPh-d.mjs → simslim-DKdJx0LL.mjs} +2 -2
  131. package/dist/{slot-launch-CSpQcFZw.mjs → slot-launch-D4oREwhx.mjs} +6 -6
  132. package/dist/{stage-Cf9uSM1a.mjs → stage-DKC6tDXu.mjs} +2 -2
  133. package/dist/{start-CLN_r9EG.mjs → start-BsEV4S-s.mjs} +12 -12
  134. package/dist/{start-CquYgzVf.mjs → start-DfPSLc__.mjs} +1 -1
  135. package/dist/{state-CM_HvvkS.mjs → state-CtmYTRWm.mjs} +4 -4
  136. package/dist/{state-CiflgxTP.mjs → state-DSOUqO-o.mjs} +2 -2
  137. package/dist/{stats-BVEZuSlg.mjs → stats-ByEUblPr.mjs} +5 -5
  138. package/dist/{stats-report-B86Cv7Uc.mjs → stats-report-BVRCqwWA.mjs} +1 -1
  139. package/dist/{status-D0ruTmPl.mjs → status-C6hLlDqW.mjs} +37 -28
  140. package/dist/{status-GQ-JqvRi.mjs → status-DTFhDnd1.mjs} +1 -1
  141. package/dist/{status-Bhdy07v0.mjs → status-FP1MH9qn.mjs} +1 -1
  142. package/dist/{status-watch-DSu_hhg6.mjs → status-watch-D8s823CZ.mjs} +5 -5
  143. package/dist/status-worker.mjs +1 -1
  144. package/dist/{stim-desktop-1XxET4S8.mjs → stim-desktop-_WTria-r.mjs} +2 -2
  145. package/dist/{stop-RZqER_Ww.mjs → stop-5LKfVv-0.mjs} +2 -2
  146. package/dist/{stop-W4DK8qZq.mjs → stop-BVI2-L7s.mjs} +16 -16
  147. package/dist/{stop-B616ZyTv.mjs → stop-CpTy6bod.mjs} +5 -5
  148. package/dist/supervisor-run.mjs +16 -16
  149. package/dist/{support-S_5nkkzs.mjs → support-CqyWfZZI.mjs} +18 -8
  150. package/dist/{support-NxnD8QXd.mjs → support-D8OH0z98.mjs} +9 -9
  151. package/dist/{swiftpm-artifact-inputs-yp8D5LE4.mjs → swiftpm-artifact-inputs-uq5oV7xR.mjs} +4 -4
  152. package/dist/{swiftpm-macos-Gtq9bNQb.mjs → swiftpm-macos-BuhqYB3n.mjs} +11 -11
  153. package/dist/{toolchain-B2bN8jEo.mjs → toolchain-D_jotUG7.mjs} +1 -1
  154. package/dist/{toolchain-Bnm8vUCV.mjs → toolchain-s5ZmG42Z.mjs} +25 -14
  155. package/dist/{trigger-CfnOfpDd.mjs → trigger-BtB4kbe0.mjs} +2 -2
  156. package/dist/trigger-D8B7QR0q.mjs +2 -0
  157. package/dist/{warm-progress-_aTMvkIH.mjs → warm-progress-q11Vdvhh.mjs} +6 -6
  158. package/dist/{web-BdWG8b5_.mjs → web-DwYCTFdh.mjs} +9 -9
  159. package/dist/web-cCfM8kwV.mjs +2 -0
  160. package/dist/web-run.mjs +8 -8
  161. package/dist/windows-report.mjs +1 -1
  162. package/dist/{workspace-state-3bF4TB8P.mjs → workspace-state-BdZ-QgmB.mjs} +3 -3
  163. package/dist/{workspaces-C59v9bpD.mjs → workspaces-B3ahAHZc.mjs} +14 -14
  164. package/dist/{worktree-CinoSsGy.mjs → worktree-BhsML6GV.mjs} +77 -31
  165. package/dist/{worktree-K9F50fD_.mjs → worktree-CrjsPIs2.mjs} +1 -1
  166. package/package.json +7 -7
  167. package/dist/server-expo-DwR3eD-a.mjs +0 -2
  168. package/dist/trigger-DBZ-GBrl.mjs +0 -2
  169. package/dist/web-DwuluWJt.mjs +0 -2
@@ -1,8 +1,8 @@
1
- import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-C6UTYW2K.mjs";
2
- import { i as findProjectRoot$1 } from "./project-Crtcbfl0.mjs";
3
- import { h as RECENT_LAUNCH_MS } from "./eas-session-ledger-B-nTfdfk.mjs";
4
- import { o as guideStatus, t as WATCHMAN_NESTED_WORKTREES } from "./doctor-watchman-CCuboyj1.mjs";
5
- import "./status-watch-DSu_hhg6.mjs";
1
+ import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-B5IBDfTx.mjs";
2
+ import { i as findProjectRoot$1 } from "./project-DWEXiBA9.mjs";
3
+ import { h as RECENT_LAUNCH_MS } from "./eas-session-ledger-Bspy-VJQ.mjs";
4
+ import { o as guideStatus, t as WATCHMAN_NESTED_WORKTREES } from "./doctor-watchman-CDhpC3Oh.mjs";
5
+ import "./status-watch-D8s823CZ.mjs";
6
6
  import { SETTINGS, SETTINGS_SCHEMA_URL, TUTORIAL_VERSION } from "@stim-cli/core/state";
7
7
  import chalk from "chalk";
8
8
  //#region src/guide/agent.ts
@@ -220,6 +220,9 @@ RULES DURING THE LOOP
220
220
  survive the run. Trust the exact device, app, Metro, and launch facts in the
221
221
  final summary. Use the full reported device ID. Never assume a simulator
222
222
  named booted belongs to this workspace.
223
+ - With no matching Android system image, android downloads one (about 2 GB)
224
+ with sdkmanager unless android.installImages is never. It never accepts SDK
225
+ licenses: give the user the refusal's \`sdkmanager --licenses\` command.
223
226
  - After each ios or android run, give the user one compact result: exact device,
224
227
  app id, launch state, cache result, total duration, and whether stim logs
225
228
  --errors passed. Include a remedy only when action remains. Do not repeat the
@@ -1593,9 +1596,11 @@ RULES
1593
1596
  it; command is the \`xcrun simctl runtime delete\`
1594
1597
  line for a deletable runtime, else null. Stim never
1595
1598
  runs it
1596
- systemImages { package, directory, avdCount, command } installed
1597
- Android system images; avdCount is the AVDs whose
1598
- image.sysdir.1 names it; command is the
1599
+ systemImages { package, directory, avdCount, stimInstalled,
1600
+ command } installed Android system images; avdCount
1601
+ is the AVDs whose image.sysdir.1 names it;
1602
+ stimInstalled is true when this Stim home installed it
1603
+ (android.installImages); command is the
1599
1604
  \`sdkmanager --uninstall\` line. Stim never runs it
1600
1605
  notices why a listing is missing or partial, such as simctl
1601
1606
  timing out or an AVD or system image folder Stim
@@ -1922,6 +1927,12 @@ RULES
1922
1927
  device screens for replay, from recording.enabled
1923
1928
  hidden true when workspace.hidden is set; absent otherwise. The next
1924
1929
  command that uses the workspace clears it.
1930
+ pathMissing true when the workspace folder no longer exists on a mounted
1931
+ volume, such as after git worktree remove or rm -rf; absent
1932
+ otherwise, and for a folder on a volume that is not mounted.
1933
+ phase is then never warming or ready. status only reports it:
1934
+ the entry stays registered until stim gc --delete or
1935
+ stim worktree remove <path> removes it.
1925
1936
 
1926
1937
  Each environment also carries stage, where the workspace is as Stim
1927
1938
  Desktop and the phone app show it: { kind, since, platform, closedApps }.
@@ -3876,7 +3887,9 @@ Branch on the code, never on the message.`,
3876
3887
  tailscale ping. Check stim-server and Tailscale there,
3877
3888
  then run stim doctor. Correct --device-type / --runtime for iOS or
3878
3889
  --system-image / --device-profile for Android when the offer names
3879
- an unavailable choice. A session that exists stays recorded even if delivery
3890
+ an unavailable choice. A host that would install a missing Android image
3891
+ but cannot (android.installImages never there, unaccepted licenses, no
3892
+ cmdline-tools, low disk) declines with the command to run on that host. A session that exists stays recorded even if delivery
3880
3893
  fails: retry stim ios|android --remote <machine>, or run stim stop to reconcile it.
3881
3894
  An Expo dev client whose running or pinned Metro port is in use on the host
3882
3895
  refuses before the build: run stim stop, then stim ios --remote <machine>
@@ -4632,6 +4645,12 @@ so a Debug run on one is wired to a LAN origin instead of localhost.`,
4632
4645
  Mode off, over a cable or over Wi-Fi alike. Hardware is never created or
4633
4646
  booted, so there is nothing to retry into existence: fix the cable, the
4634
4647
  trust prompt, or Developer Mode.
4648
+ On Android it also means no system image matched and Stim could not install
4649
+ one: android.installImages is never, the SDK has no cmdline-tools/latest,
4650
+ the SDK licenses are not accepted (Stim never accepts them; run the
4651
+ \`sdkmanager --licenses\` line the remedy prints), the SDK volume has under
4652
+ 8 GB free, or sdkmanager failed. The remedy names the exact sdkmanager
4653
+ command. Nothing was downloaded or created.
4635
4654
  Otherwise the owned simulator/emulator could not be created or could not
4636
4655
  reach a booted state. \`stim doctor\` checks the toolchain; \`stim status\` says what
4637
4656
  Stim thinks it owns. Re-running the command creates a fresh owned device
@@ -5677,14 +5696,37 @@ not on any remote" (worktree remove)
5677
5696
  const HOSTED_RECORDING = (noun) => `\
5678
5697
  agent-device record start [path] --remote-config <file> records the ${noun};
5679
5698
  record stop downloads the video to path, or ./recording-<time>.mp4, on this
5680
- machine. The host writes it only under the session's private agent-device state
5681
- and deletes the files after the download, on stim stop or session teardown and
5699
+ machine. The host writes it only in a private directory for the session in its
5700
+ temporary directory and deletes the files after the download, on stim stop or session teardown and
5682
5701
  when its daemon restarts. One recording runs per session; a second start, a host output
5683
5702
  path, record inside batch and a record stop from another agent-device session
5684
5703
  are refused. The host stops a recording after 10 minutes; a record stop within
5685
5704
  the next 15 minutes downloads it. A finished recording over 512 MiB is deleted
5686
5705
  instead. A host whose Stim predates hosted recording refuses
5687
5706
  record as a command outside its allowed list.`;
5707
+ const HOSTED_COMMANDS = (noun) => `\
5708
+ Allowed commands: devices, open, close, snapshot, diff, wait, find, get, is,
5709
+ click, fill, press, type, focus, scroll, screenshot, longpress, swipe, gesture,
5710
+ back, home, orientation, fold, appstate, alert, batch, record start and stop,
5711
+ action-button, app-switcher, hardware-button, keyboard, apps, capabilities,
5712
+ events, network, react-native, telephony and trigger-app-event. Guarded: push
5713
+ takes <app id> <inline JSON object>, never a payload file; perf allows only
5714
+ frames and memory sample; artifacts lists this session's artifacts and takes no
5715
+ provider session; settings refuses permission accessibility, screen-recording
5716
+ and input-monitoring, which are permissions of the hosting Mac. Each command
5717
+ takes only the flags and input fields Stim lists for it, so a flag a newer
5718
+ agent-device adds is refused until Stim allows it. Host paths and launch inputs
5719
+ are refused: open refuses --metro-host, --metro-port, --bundle-url,
5720
+ --launch-url, --launch-args, --launch-console, --surface and --save-script.
5721
+ Stim's Metro bridge already points the app at this machine's Metro; a client
5722
+ address would let the hosted app reach any service the hosting Mac can.
5723
+ These are refused, each with its reason in the error: install, reinstall,
5724
+ install-from-source and uninstall (Stim installs the app and tracks it), boot,
5725
+ shutdown and close --shutdown (use stim stop), logs (use stim logs), trace,
5726
+ audio, doctor, prepare, replay, test, clipboard (a ${noun} can share the
5727
+ clipboard of the hosting Mac), hover, viewport, tv-remote and agent-device's
5728
+ client-side commands. Both machines need agent-device 0.21.30 or later; an
5729
+ older host reports driver: none.`;
5688
5730
  const lifecycle = {
5689
5731
  summary: "The full worktree -> start -> ios/android -> logs -> teardown flow, with sections for builds, devices and flags",
5690
5732
  preamble: () => `ENVIRONMENT LIFECYCLE
@@ -6203,6 +6245,13 @@ Unreadable android.host blocks only its slot; restore its recorded machine and
6203
6245
  session from the host before stopping that slot.
6204
6246
 
6205
6247
  --system-image and --device-profile select installed choices on the host.
6248
+ When no image on the host matches and the host's android.installImages is
6249
+ auto, the offer names the image to install; stim-server installs it with its
6250
+ own ANDROID_HOME and sdkmanager before it creates the AVD, the client prints
6251
+ \`image installing <package> on <mac>\` and waits for it like any other
6252
+ preparation. A host set to never, or one with unaccepted SDK licenses, no
6253
+ cmdline-tools or under 8 GB free refuses with STIM_HOSTING_REFUSED naming
6254
+ the command to run on the host.
6206
6255
  The build targets the offered ABI and --remote-build independently selects a
6207
6256
  compatible build worker. Stim builds before reserving, records the session as
6208
6257
  soon as it exists, then delivers one App.apk. The emulator boots headless;
@@ -6245,7 +6294,7 @@ arrive through local Metro.
6245
6294
  AGENT CONTROL
6246
6295
 
6247
6296
  Set hosting.agentDriver to agent-device on the hosting Mac. Both machines need
6248
- agent-device 0.21.22 or later. The host advertises hosted-android-agent and
6297
+ agent-device 0.21.30 or later. The host advertises hosted-android-agent and
6249
6298
  starts one loopback daemon per installed Android session. Its policy allows
6250
6299
  only the exact ledger-owned emulator serial and denies device shutdown.
6251
6300
  The host verifies the policy digest and android-instance backend before granting
@@ -6270,15 +6319,11 @@ The command shape is agent-device <command> --remote-config <file>. Open leases
6270
6319
  the emulator automatically with android-instance, the proxy provider and this
6271
6320
  session's tenant. devices is permitted for the client's open flow; inventory
6272
6321
  contains only this emulator. Never use its serial with a local agent-device.
6273
- Allowed commands are devices, open, close, snapshot, diff, wait, find, get, is,
6274
- click, fill, press, type, focus, scroll, screenshot, longpress, swipe, back, home,
6275
- orientation, appstate, alert, batch, record start and record stop. Stim installs;
6276
- install, reinstall, uninstall, boot, shutdown, close --shutdown, logs, uploads and
6277
- device-wide actions are refused. Other serials in commands, flags, inputs, nested
6278
- batches or lease requests are refused. Ambient client paths and owner fields are
6279
- stripped; the host pins platform, serial, tenant, runId, clientId, deviceKey and
6280
- backend. Host paths and launch inputs are refused. Screenshots use only remote
6281
- artifacts.
6322
+ ${HOSTED_COMMANDS("emulator")}
6323
+ Uploads and other serials in commands, flags, inputs, nested batches or lease
6324
+ requests are refused. Ambient client paths and owner fields are stripped; the
6325
+ host pins platform, serial, tenant, runId, clientId, deviceKey and backend.
6326
+ Screenshots use only remote artifacts.
6282
6327
 
6283
6328
  ${HOSTED_RECORDING("emulator")}
6284
6329
 
@@ -6550,7 +6595,7 @@ host gets an update note, uses uploads and shows logs already copied here.
6550
6595
  AGENT CONTROL
6551
6596
 
6552
6597
  On the hosting Mac, set hosting.agentDriver to agent-device. Both machines need
6553
- agent-device 0.21.20 or later (the policy and remote-config contract). The host
6598
+ agent-device 0.21.30 or later (the policy, command list and remote-config contract). The host
6554
6599
  starts one loopback daemon per installed iOS session under a child-aware
6555
6600
  ownership claim. Its daemon policy pins exactly that simulator UDID and denies
6556
6601
  shutdown. Stop, close, revocation, reinstall and graceful server close end its
@@ -6584,23 +6629,20 @@ and removes that slot's config after the host confirms stop or revocation.
6584
6629
  The host stops the session daemon and identity-checked agent-device runners
6585
6630
  targeting its exact simulator UDID before deleting the simulator, even without close.
6586
6631
 
6587
- Allowed: devices, open, close, snapshot, diff, wait, find, get, is, click, fill,
6588
- press, type, focus, scroll, screenshot, longpress, swipe, back, home, orientation,
6589
- appstate, alert, batch, record start and record stop. These inspect, interact
6590
- with or record the simulator and installed apps. devices lists only the
6632
+ ${HOSTED_COMMANDS("simulator")}
6633
+ These inspect, interact with or record the simulator and installed apps. devices lists only the
6591
6634
  session's simulator, filtered by the daemon policy. Its device claims are session-local and record / as the workspace;
6592
6635
  a host-side agent-device using the same simulator is not visible to the hosted daemon.
6593
6636
  Client device selectors are stripped and requests are pinned to iOS and that
6594
6637
  UDID; an explicitly named foreign UDID is refused. Selecting another device,
6595
- boot/shutdown/erase, installs, uninstall, uploads, push, logs, network,
6596
- perf, trace, clipboard and settings are refused. Stim installs; the agent cannot
6597
- enumerate other host devices or write host files. Ambient client fields (cwd,
6638
+ erase and uploads are refused. The agent cannot enumerate other host devices
6639
+ or write host files. Ambient client fields (cwd,
6598
6640
  stateDir, config and remoteConfig) are stripped, including inside batch steps.
6599
6641
  Host paths and launch inputs (--out, baseline, launchConsole, developerDir,
6600
6642
  installSource and similar fields) are refused, including inside batch steps.
6601
6643
  Only agent-device's generated screenshot temp artifact is accepted and returned
6602
6644
  to the client; arbitrary host screenshot destinations are refused. Runtime
6603
- hints are dropped and only reporting/artifact metadata passes through.
6645
+ hints are refused and only reporting/artifact metadata passes through.
6604
6646
 
6605
6647
  ${HOSTED_RECORDING("simulator")}
6606
6648
 
@@ -6942,6 +6984,16 @@ result as proof instead of requiring an unrelated screenshot.`
6942
6984
  is never touched: \`Reclaimed the environment; the working tree stays (it
6943
6985
  is the source checkout).\`
6944
6986
 
6987
+ A worktree deleted outside Stim stays registered. Pass its path to
6988
+ \`worktree remove\`: when the folder is gone from a mounted volume, the
6989
+ command drops the record of that path and of the projects registered under
6990
+ it, with the same \`device\`, \`lease\` and \`workspace\` lines, ending with
6991
+ \`Reclaimed the environment of the deleted folder (its folder is already
6992
+ gone).\` A path on a volume that is not mounted, or one that cannot be
6993
+ resolved, is kept and refused with the reason, since the folder may come
6994
+ back. A missing path with no registered project says \`No such worktree\`.
6995
+ \`stim status\` reports such a workspace as pathMissing.
6996
+
6945
6997
  \`gc\` names each slow step on stderr as it starts, in every mode; its
6946
6998
  report stays on stdout, and with \`--json\` stdout carries only the payload:
6947
6999
 
@@ -7201,8 +7253,9 @@ PREDICTING THE NEXT BUILD (--plan)
7201
7253
  not answer, ios.remote or android.remote set to eas or proxy, or auto that
7202
7254
  would use an EAS Simulator now (remote.easFallback), refuses with
7203
7255
  STIM_BAD_ARG. Without --eas-profile an Android plan also
7204
- refuses the experimental compiler CAS with STIM_BAD_ARG, and refuses with
7205
- STIM_NO_DEVICE when no system image is installed.
7256
+ refuses the experimental compiler CAS with STIM_BAD_ARG. With no system
7257
+ image installed it keys on the image a run would install, and refuses with
7258
+ STIM_NO_DEVICE when android.installImages is never.
7206
7259
 
7207
7260
  IOS SCHEME SELECTION
7208
7261
  Pass \`stim ios --scheme "App Staging"\` to select an exact shared Xcode
@@ -8236,7 +8289,14 @@ OPT-IN CONCURRENCY LIMITS (UNLIMITED BY DEFAULT)
8236
8289
  A name that is not INSTALLED on this machine refuses with STIM_BAD_ARG
8237
8290
  before anything is created, and the message lists the installed names, so a
8238
8291
  wrong guess is one command, not a created simulator. A blank value is the
8239
- same refusal.
8292
+ same refusal. The exception is an Android system image for this machine's
8293
+ ABI while android.installImages is auto (the default): \`stim android\`
8294
+ installs it with sdkmanager, printing an \`image\` line, then creates the
8295
+ AVD from it. The same applies when no image is installed at all, with
8296
+ system-images;android-36;google_apis;<host ABI>. See \`stim guide settings\`
8297
+ for the license, disk and locking rules. \`stim doctor\` reports a missing
8298
+ image as a note (android-system-image), and \`stim doctor --fix --platform
8299
+ android\` installs it right away.
8240
8300
 
8241
8301
  What counts as installed for \`--device-type\` is what an installed RUNTIME
8242
8302
  can create, not what \`xcrun simctl list devicetypes\` prints: that table
@@ -9618,6 +9678,13 @@ ORPHANED WORKSPACE DIRECTORIES
9618
9678
  it. A directory with a missing or unparseable workspace.json, or a root on
9619
9679
  an unmounted volume, is reported under Skipped and never deleted.
9620
9680
 
9681
+ DELETED WORKTREES STILL REGISTERED
9682
+ A worktree deleted outside Stim keeps its registry entry; \`stim status\`
9683
+ marks it pathMissing. \`gc --delete\` prunes every such entry whose folder is
9684
+ gone from a mounted volume. \`stim worktree remove <path>\` prunes one entry,
9685
+ and the projects registered under that path, the same way. Both keep an
9686
+ entry whose volume is not mounted, since the folder may come back.
9687
+
9621
9688
  TMPDIR LEFTOVERS
9622
9689
  \`gc\` without --cache reports recognized entries directly in the user's TMPDIR
9623
9690
  under "TMPDIR leftovers", with their count, size and a remedy: Stim temp
@@ -10350,9 +10417,30 @@ KEYS STIM READS
10350
10417
  from. Readable from the machine layer too, so one
10351
10418
  machine can default every workspace to an image; a
10352
10419
  project layer still wins. The \`--system-image\` flag
10353
- overrides this per invocation, and an id this SDK has
10354
- not installed is STIM_BAD_ARG with the installed ids
10355
- printed, naming the layer the value came from.
10420
+ overrides this per invocation. An id this SDK has not
10421
+ installed is installed first (android.installImages);
10422
+ with installImages never, or an id for another ABI,
10423
+ it is STIM_BAD_ARG with the installed ids printed,
10424
+ naming the layer the value came from.
10425
+ android.installImages auto (default) or never. With auto, when no installed
10426
+ system image matches the request, \`stim android\`
10427
+ installs the one android.systemImage or
10428
+ \`--system-image\` names, else
10429
+ system-images;android-36;google_apis;<host ABI>, with
10430
+ the SDK's own \`sdkmanager --install\` before it
10431
+ creates the owned AVD; a slot whose owned AVD
10432
+ finished a boot keeps it and installs nothing. It
10433
+ installs only images for
10434
+ this machine's ABI, never accepts an SDK license (an
10435
+ unaccepted one refuses and names \`sdkmanager
10436
+ --licenses\`), needs 8 GB free on the SDK volume and
10437
+ cmdline-tools/latest, and runs one install per SDK
10438
+ root and Stim home; a second run waits for it. never
10439
+ refuses with the \`sdkmanager --install\` line instead.
10440
+ For a hosted run the host's machine value decides,
10441
+ and stim-server installs into its own ANDROID_HOME.
10442
+ \`stim gc\` marks the images Stim installed
10443
+ (stimInstalled).
10356
10444
  android.deviceProfile e.g. "pixel_fold" -- the avdmanager hardware profile a
10357
10445
  new owned AVD is created with, spelled exactly as
10358
10446
  \`avdmanager list device -c\` prints it. Defaults to
@@ -11092,9 +11180,8 @@ shared daemon only when that agent-device can lease a single app (its
11092
11180
  notice, and no client is handed the Mac's desktop. STIM_AGENT_DEVICE_BIN in
11093
11181
  stim-server's environment names an agent-device binary to use instead of
11094
11182
  ~/.local/bin/agent-device. Hosted iOS uses one daemon per simulator, pinned by
11095
- its UDID policy; both machines need agent-device 0.21.20 or later. Hosted Android
11096
- uses one daemon per emulator, pinned by its serial policy, with agent-device
11097
- 0.21.22 or later on both machines. See guide lifecycle
11183
+ its UDID policy. Hosted Android uses one daemon per emulator, pinned by its
11184
+ serial policy. Both machines need agent-device 0.21.30 or later. See guide lifecycle
11098
11185
  hosted-ios. \`doctor\` on that Mac notes an installed hosted app that runs while
11099
11186
  the setting is \`none\`.
11100
11187
 
@@ -11123,10 +11210,15 @@ and no platform selection on a Mac, it also checks the macOS Xcode and SDK.
11123
11210
  A client with no Xcode and no simulator SDK, such as Linux or Windows, has no
11124
11211
  Xcode to match: the Mac's own Xcode, simulator SDK and CocoaPods are the
11125
11212
  build's toolchain, the client leaves pod install to it, and \`stim ios --remote
11126
- <mac> --remote-build <mac>\` runs the app on that Mac's hosted simulator. If
11127
- that pod install changes Podfile.lock or the Xcode project, the build fails
11128
- with fingerprint-mismatch; run pod install once on a Mac and commit the
11129
- result. A client with an Xcode still needs the same one.
11213
+ <mac> --remote-build <mac>\` runs the app on that Mac's hosted simulator. When
11214
+ that pod install, or a file it generates there, changes only fingerprint
11215
+ sources in the iOS project, the Mac builds and stores the app under its own
11216
+ fingerprint after pod install, and the client stores it under that key. The
11217
+ client's own fingerprint does not compute that key, so each run builds on the
11218
+ Mac again; a stale Podfile.lock is worth regenerating on a Mac and committing.
11219
+ Any other difference, such as the app config, fails with fingerprint-mismatch.
11220
+ A client with an Xcode still needs the same one, and there a worker pod install
11221
+ that changes the fingerprint fails with fingerprint-mismatch.
11130
11222
  Two machines build for each other when their Stim releases share a build
11131
11223
  compatibility version, which changes only when what a worker builds, how it
11132
11224
  builds, or the build messages change; their Stim builds can differ. A
@@ -11302,7 +11394,10 @@ worker's default: its offer lists \`jdks\`, and a build sent with the build-jdk
11302
11394
  feature runs with JAVA_HOME at the one of that major. A major no installed JDK
11303
11395
  has gets the install command for the worker's OS as doctor's fix. A nearby major
11304
11396
  never counts (Gradle, AGP and Kotlin support and the shared build cache assume
11305
- one JDK). Also, its Android SDK must hold the NDK, build-tools and
11397
+ one JDK). A client with no JDK sends no major, so the worker's default JDK is
11398
+ the build's JDK and doctor notes it; with no Android SDK either, \`stim android
11399
+ --remote <machine> --remote-build <machine>\` runs the app on that machine's
11400
+ hosted emulator. Also, its Android SDK must hold the NDK, build-tools and
11306
11401
  compile platform that the project's React Native version names in
11307
11402
  gradle/libs.versions.toml; Gradle and AGP come from the synced project. A
11308
11403
  package the SDK lacks is a note, not a blocker, when its offer reports the SDK
@@ -1,7 +1,7 @@
1
- import { c as throwIfCancelled } from "./exec-aULwtNly.mjs";
2
- import { c as call, l as connectHost } from "./hosted-client-Hs-fD4L3.mjs";
3
- import { a as requestHostedMetro } from "./metro-request-DODHNXCN.mjs";
4
- import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-Bh9IJ_t5.mjs";
1
+ import { d as throwIfCancelled } from "./exec-CGuDzt40.mjs";
2
+ import { l as call, u as connectHost } from "./hosted-client-D19Lv0tg.mjs";
3
+ import { a as requestHostedMetro } from "./metro-request-2LmFpC1z.mjs";
4
+ import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-BzXIy97W.mjs";
5
5
  //#region src/device-host/hosted-android.ts
6
6
  async function prepareHostedAndroid(machine, selectors, recorded, mode) {
7
7
  return await prepareHostedNative(machine, selectors, recorded, "android", false, mode);
@@ -1,7 +1,7 @@
1
- import { c as throwIfCancelled, o as cancellableSleep } from "./exec-aULwtNly.mjs";
2
- import { X as diagnoseConnectFailure, ct as resolveEndpoint } from "./config-D5qNWJEP.mjs";
3
- import { t as BuildConnection } from "./client-lDmA-5jx.mjs";
4
- import { g as configuredMachines } from "./selection-C4ZQz_ER.mjs";
1
+ import { d as throwIfCancelled, l as cancellableSleep } from "./exec-CGuDzt40.mjs";
2
+ import { K as resolveEndpoint, P as diagnoseConnectFailure } from "./config-BW0fAtoK.mjs";
3
+ import { t as BuildConnection } from "./client-0_Mnfz0a.mjs";
4
+ import { g as configuredMachines } from "./selection-xS50Mt0V.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { lstatSync, readFileSync, readdirSync, readlinkSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -14,6 +14,7 @@ const HOSTED_REQUEST_MARGIN_MS = 5e3;
14
14
  const workerBoundMs = (deadlineMs) => deadlineMs + hostedWorkerSettleMs();
15
15
  const SESSION_TIMEOUT_MS = hostedWorkerSettleMs() + workerBoundMs(DEVICE_HOST_LIMITS.logsMs) + 2 * workerBoundMs(DEVICE_HOST_LIMITS.stopMs) + HOSTED_POLL_MARGIN_MS;
16
16
  const PREPARE_TIMEOUT_MS = workerBoundMs(DEVICE_HOST_LIMITS.prepareMs) + HOSTED_POLL_MARGIN_MS;
17
+ const IMAGE_INSTALL_TIMEOUT_MS = workerBoundMs(DEVICE_HOST_LIMITS.imageInstallMs);
17
18
  const INSTALL_TIMEOUT_MS = workerBoundMs(DEVICE_HOST_LIMITS.prepareMs) + HOSTED_POLL_MARGIN_MS;
18
19
  const OFFER_TIMEOUT_MS = workerBoundMs(DEVICE_HOST_LIMITS.offerMs) + HOSTED_REQUEST_MARGIN_MS;
19
20
  const RESERVE_TIMEOUT_MS = HOSTED_PARKED_CANDIDATES * (workerBoundMs(DEVICE_HOST_LIMITS.offerMs) + workerBoundMs(DEVICE_HOST_LIMITS.stopMs)) + workerBoundMs(DEVICE_HOST_LIMITS.offerMs) + HOSTED_REQUEST_MARGIN_MS;
@@ -277,4 +278,4 @@ async function upload(host, ids, missing, content) {
277
278
  if (failure) throw failure;
278
279
  }
279
280
  //#endregion
280
- export { stoppedSession as _, SESSION_TIMEOUT_MS as a, call as c, hostConnector as d, hostedSession as f, sha256 as g, settle as h, RESERVE_TIMEOUT_MS as i, connectHost as l, requireHostedAppMode as m, OFFER_TIMEOUT_MS as n, attach as o, probeHostedSession as p, PREPARE_TIMEOUT_MS as r, bundleManifest as s, INSTALL_TIMEOUT_MS as t, heldNoLonger as u, unknownSession as v, upload as y };
281
+ export { sha256 as _, RESERVE_TIMEOUT_MS as a, upload as b, bundleManifest as c, heldNoLonger as d, hostConnector as f, settle as g, requireHostedAppMode as h, PREPARE_TIMEOUT_MS as i, call as l, probeHostedSession as m, INSTALL_TIMEOUT_MS as n, SESSION_TIMEOUT_MS as o, hostedSession as p, OFFER_TIMEOUT_MS as r, attach as s, IMAGE_INSTALL_TIMEOUT_MS as t, connectHost as u, stoppedSession as v, unknownSession as y };
@@ -1,11 +1,11 @@
1
- import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, k as workspaceLogsDir$1 } from "./workspace-state-3bF4TB8P.mjs";
3
- import { J as validateDeviceSlot, V as deviceSlotFileKey, at as parseMachine$1 } from "./config-D5qNWJEP.mjs";
4
- import { l as phaseLine } from "./command-output-CfPW1bKP.mjs";
5
- import { n as macosDir } from "./state-CiflgxTP.mjs";
6
- import { n as androidLogGroups, r as isAndroidCrashText } from "./android-BeeC15Ve.mjs";
1
+ import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
+ import { E as workspaceDir, k as workspaceLogsDir$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
+ import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
4
+ import { U as parseMachine$1, _t as validateDeviceSlot, ut as deviceSlotFileKey } from "./config-BW0fAtoK.mjs";
5
+ import { n as macosDir } from "./state-DSOUqO-o.mjs";
6
+ import { n as androidLogGroups, r as isAndroidCrashText } from "./android-B2DSKg-A.mjs";
7
7
  import { c as readNdjsonGenerations$1, i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
8
- import { c as call } from "./hosted-client-Hs-fD4L3.mjs";
8
+ import { l as call } from "./hosted-client-D19Lv0tg.mjs";
9
9
  import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { dirname, join } from "node:path";
11
11
  import { LOG_ROTATE_BYTES, ambientWrite, withDirLockAsync } from "@stim-cli/core";
@@ -1,8 +1,8 @@
1
- import { n as pullHostedNativeLogs, r as readHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-BteXG8rm.mjs";
2
- import { l as phaseLine } from "./command-output-CfPW1bKP.mjs";
3
- import { l as connectHost } from "./hosted-client-Hs-fD4L3.mjs";
4
- import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-BEIJRJ7P.mjs";
5
- import "./hosted-macos-B4byscei.mjs";
1
+ import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
2
+ import { n as pullHostedNativeLogs, r as readHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-D7anR6Dk.mjs";
3
+ import { u as connectHost } from "./hosted-client-D19Lv0tg.mjs";
4
+ import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-CWsBysyN.mjs";
5
+ import "./hosted-macos-D0DDQxvl.mjs";
6
6
  import { watch } from "node:fs";
7
7
  import { dirname, relative, resolve, sep } from "node:path";
8
8
  import { ambientWrite, configDir } from "@stim-cli/core";
@@ -1,9 +1,9 @@
1
- import { o as cancellableSleep } from "./exec-aULwtNly.mjs";
2
- import { a as agentAccess, i as closeAgentConnection, o as removeAgentAccess, t as pullHostedMacosLogs } from "./hosted-logs-BteXG8rm.mjs";
3
- import { l as phaseLine } from "./command-output-CfPW1bKP.mjs";
4
- import { n as macosDir } from "./state-CiflgxTP.mjs";
5
- import { st as runCancellationSignal } from "./toolchain-Bnm8vUCV.mjs";
6
- import { _ as stoppedSession, a as SESSION_TIMEOUT_MS, c as call, f as hostedSession, g as sha256, h as settle, i as RESERVE_TIMEOUT_MS, l as connectHost, o as attach, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as unknownSession, y as upload } from "./hosted-client-Hs-fD4L3.mjs";
1
+ import { l as cancellableSleep } from "./exec-CGuDzt40.mjs";
2
+ import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
3
+ import { a as agentAccess, i as closeAgentConnection, o as removeAgentAccess, t as pullHostedMacosLogs } from "./hosted-logs-D7anR6Dk.mjs";
4
+ import { n as macosDir } from "./state-DSOUqO-o.mjs";
5
+ import { st as runCancellationSignal } from "./toolchain-s5ZmG42Z.mjs";
6
+ import { _ as sha256, a as RESERVE_TIMEOUT_MS, b as upload, c as bundleManifest, d as heldNoLonger, g as settle, i as PREPARE_TIMEOUT_MS, l as call, n as INSTALL_TIMEOUT_MS, o as SESSION_TIMEOUT_MS, p as hostedSession, s as attach, u as connectHost, v as stoppedSession, y as unknownSession } from "./hosted-client-D19Lv0tg.mjs";
7
7
  import { randomUUID } from "node:crypto";
8
8
  import { join } from "node:path";
9
9
  import { ambientContext, ambientWrite } from "@stim-cli/core";
@@ -1,10 +1,11 @@
1
- import { o as cancellableSleep, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-3bF4TB8P.mjs";
3
- import { a as agentAccess, i as closeAgentConnection, n as pullHostedNativeLogs, o as removeAgentAccess } from "./hosted-logs-BteXG8rm.mjs";
4
- import { st as runCancellationSignal } from "./toolchain-Bnm8vUCV.mjs";
5
- import { _ as stoppedSession, a as SESSION_TIMEOUT_MS, c as call, f as hostedSession, g as sha256, h as settle, i as RESERVE_TIMEOUT_MS, l as connectHost, m as requireHostedAppMode, n as OFFER_TIMEOUT_MS, o as attach, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as unknownSession, y as upload } from "./hosted-client-Hs-fD4L3.mjs";
6
- import { a as requestHostedMetro, n as closeHostedMetro, o as requireHostedMetro, r as hostedAgentPort } from "./metro-request-DODHNXCN.mjs";
7
- import { s as writeHostedNative } from "./ios-state-BEIJRJ7P.mjs";
1
+ import { l as cancellableSleep, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
+ import { E as workspaceDir, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
+ import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
4
+ import { a as agentAccess, i as closeAgentConnection, n as pullHostedNativeLogs, o as removeAgentAccess } from "./hosted-logs-D7anR6Dk.mjs";
5
+ import { st as runCancellationSignal } from "./toolchain-s5ZmG42Z.mjs";
6
+ import { _ as sha256, a as RESERVE_TIMEOUT_MS, b as upload, c as bundleManifest, d as heldNoLonger, g as settle, h as requireHostedAppMode, i as PREPARE_TIMEOUT_MS, l as call, n as INSTALL_TIMEOUT_MS, o as SESSION_TIMEOUT_MS, p as hostedSession, r as OFFER_TIMEOUT_MS, s as attach, t as IMAGE_INSTALL_TIMEOUT_MS, u as connectHost, v as stoppedSession, y as unknownSession } from "./hosted-client-D19Lv0tg.mjs";
7
+ import { a as requestHostedMetro, n as closeHostedMetro, o as requireHostedMetro, r as hostedAgentPort } from "./metro-request-2LmFpC1z.mjs";
8
+ import { s as writeHostedNative } from "./ios-state-CWsBysyN.mjs";
8
9
  import { randomUUID } from "node:crypto";
9
10
  import { readFileSync } from "node:fs";
10
11
  import { join } from "node:path";
@@ -27,7 +28,7 @@ async function prepareHostedNative(machine, selectors, recorded, platform = "ios
27
28
  if (recorded) {
28
29
  let session = null;
29
30
  try {
30
- session = await settle(host, await attach(host, recorded.session, void 0, platform), ["preparing"], PREPARE_TIMEOUT_MS, platform, runCancellationSignal(ambientContext()));
31
+ session = await settle(host, await attach(host, recorded.session, void 0, platform), ["preparing"], platform === "android" ? PREPARE_TIMEOUT_MS + IMAGE_INSTALL_TIMEOUT_MS : PREPARE_TIMEOUT_MS, platform, runCancellationSignal(ambientContext()));
31
32
  session = await settle(host, session, ["stopping"], SESSION_TIMEOUT_MS, platform, runCancellationSignal(ambientContext()));
32
33
  } catch (error) {
33
34
  if (!heldNoLonger(error)) throw error;
@@ -60,10 +61,12 @@ async function prepareHostedNative(machine, selectors, recorded, platform = "ios
60
61
  if (!isJsonObject(offer.capacity) || offer.capacity.available === 0) throw new Error("No hosted device capacity is available.");
61
62
  const memoryRefusal = hostedMemoryRefusal(isJsonObject(offer.resources) ? offer.resources.memoryPressure : null);
62
63
  if (memoryRefusal) throw new Error(memoryRefusal);
64
+ const installImage = parsedOffer?.platform === "android" ? parsedOffer.installImage : void 0;
63
65
  return {
64
66
  host,
65
67
  choice,
66
- session: null
68
+ session: null,
69
+ ...installImage ? { installImage } : {}
67
70
  };
68
71
  } catch (error) {
69
72
  if (error instanceof Error && "code" in error && error.code === "STIM_BAD_ARG") throw error;
@@ -168,7 +171,8 @@ async function placeHostedNativeOnce(target, { root, slot, bundle, handoff, bund
168
171
  }
169
172
  };
170
173
  await reserved(placement);
171
- session = await settle(host, session, ["preparing"], PREPARE_TIMEOUT_MS, platform, runCancellationSignal(ambientContext()));
174
+ if (target.installImage && session.state === "preparing") note(phaseLine("image", `installing ${target.installImage} on ${host.machine}; the download can take several minutes`));
175
+ session = await settle(host, session, ["preparing"], PREPARE_TIMEOUT_MS + (target.installImage ? IMAGE_INSTALL_TIMEOUT_MS : 0), platform, runCancellationSignal(ambientContext()));
172
176
  if (session.state === "stopped") throw stoppedSession(host, session);
173
177
  if (session.state !== "ready") throw unknownSession(host, session);
174
178
  const device = platform === "ios" ? parseHostedDevice(session.device) : parseHostedAndroidDevice(session.device);
@@ -1,11 +1,11 @@
1
- import { k as workspaceLogsDir$1, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-3bF4TB8P.mjs";
2
- import { H as deviceSlotKey, v as loadConfig$1 } from "./config-D5qNWJEP.mjs";
3
- import { o as formatLongDuration } from "./command-output-CfPW1bKP.mjs";
1
+ import { k as workspaceLogsDir$1, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-BdZ-QgmB.mjs";
2
+ import { o as formatLongDuration } from "./command-output-DWI9tGPU.mjs";
3
+ import { dt as deviceSlotKey, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
4
4
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
5
- import { B as workspaceBuildInProgress, P as collectOwnedDeviceActivity, ht as teardownOwnedIosSim, pt as teardownOwnedAvd } from "./workspaces-C59v9bpD.mjs";
5
+ import { B as workspaceBuildInProgress, P as collectOwnedDeviceActivity, ht as teardownOwnedIosSim, pt as teardownOwnedAvd } from "./workspaces-B3ahAHZc.mjs";
6
6
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
7
- import { _ as workspaceDeviceLastUseAt } from "./activity-yjH7Q3zn.mjs";
8
- import { d as listAllIosSims } from "./ios-CdAV4-1E.mjs";
7
+ import { _ as workspaceDeviceLastUseAt } from "./activity-C8kBq9w0.mjs";
8
+ import { d as listAllIosSims } from "./ios-BdZdNsAj.mjs";
9
9
  import { join } from "node:path";
10
10
  import { LOG_ROTATE_BYTES } from "@stim-cli/core";
11
11
  import { DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, readDeviceIdleShutdowns } from "@stim-cli/core/state";
@@ -1,9 +1,9 @@
1
- import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-CfPW1bKP.mjs";
2
- import { xn as schemesFromInfoPlist, yn as pickDevClientScheme } from "./ccache-BrwGIxmV.mjs";
3
- import { f as podAction, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, s as iosConfigurationSetting, t as appNameFromPath, u as isReleaseConfiguration, v as resolveRuntime } from "./support-NxnD8QXd.mjs";
4
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DQfxW5Au.mjs";
5
- import { t as devClientScheme } from "./dev-client-eDZy6RoX.mjs";
6
- import { c as writeLastBuild, i as iosFacts, n as cacheDescription, o as lastBuildRecord } from "./ios-project-DDQlX_jX.mjs";
7
- import { d as replaceCollector, u as collectorEntry } from "./dependencies-DkZ8681S.mjs";
8
- import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-D3oK9-O4.mjs";
1
+ import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-DWI9tGPU.mjs";
2
+ import { xn as schemesFromInfoPlist, yn as pickDevClientScheme } from "./ccache-BXtzEL6M.mjs";
3
+ import { f as podAction, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, s as iosConfigurationSetting, t as appNameFromPath, u as isReleaseConfiguration, v as resolveRuntime } from "./support-D8OH0z98.mjs";
4
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-e1OU8gEN.mjs";
5
+ import { t as devClientScheme } from "./dev-client-ChsHwgrn.mjs";
6
+ import { c as writeLastBuild, i as iosFacts, n as cacheDescription, o as lastBuildRecord } from "./ios-project-BzfLigfh.mjs";
7
+ import { d as replaceCollector, u as collectorEntry } from "./dependencies-CgvBZbXD.mjs";
8
+ import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-dbXzjTxx.mjs";
9
9
  export { appNameFromPath, buildLogFile, cacheDescription, collectorEntry, iosCommand as default, devClientScheme, deviceLabel, ensureWorkspaceStorageSafely, formatDuration, iosConfigurationSetting, iosFacts, isReleaseConfiguration, lastBuildRecord, phaseLine, pickDevClientScheme, podAction, registerIos, replaceCollector, resolveConfiguration, resolveDeviceType, resolveRuntime, runIosOperation, schemesFromInfoPlist, shortHash, shortUdid, writeLastBuild };
@@ -1,10 +1,10 @@
1
- import { l as WorkspaceProcessCleanupError, n as isTimeoutError, o as cancellableSleep, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { F as formatBytes, v as loadConfig$1 } from "./config-D5qNWJEP.mjs";
1
+ import { f as WorkspaceProcessCleanupError, l as cancellableSleep, n as isTimeoutError, t as getExecutor } from "./exec-CGuDzt40.mjs";
3
2
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { n as runOperationFileQuiet, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
5
- import { i as stimDesktopInstalledAsync, n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-1XxET4S8.mjs";
6
- import { Ot as recordCreatedDeviceAsync, Tt as forgetCreatedDeviceAsync, pt as isStimOwnedSim } from "./android-DsEj2CCs.mjs";
7
- import { n as signedTailFor } from "./apk-signed-tail-B9Usseps.mjs";
3
+ import { rt as formatBytes, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
4
+ import { n as runOperationFileQuiet, t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
5
+ import { i as stimDesktopInstalledAsync, n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-_WTria-r.mjs";
6
+ import { Ot as recordCreatedDeviceAsync, Tt as forgetCreatedDeviceAsync, pt as isStimOwnedSim } from "./android-Iq0M2t2d.mjs";
7
+ import { n as signedTailFor } from "./apk-signed-tail-CPpA-3vu.mjs";
8
8
  import { createHash } from "node:crypto";
9
9
  import { closeSync, existsSync, lstatSync, mkdtempSync, openSync, readSync, readdirSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { tmpdir, totalmem } from "node:os";
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-aULwtNly.mjs";
1
+ import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
2
  //#region src/collector/ios.ts
3
3
  const MESSAGE_TYPE_LEVEL = {
4
4
  Debug: "debug",